Aggiunta remote rebootlog + nuova vers...

This commit is contained in:
Samuele E. Locatelli
2017-11-14 11:48:12 +01:00
parent 6ebd7ab7a5
commit d7200e2ab7
3 changed files with 48 additions and 5 deletions
+34
View File
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -1008,6 +1009,39 @@ namespace IOB_WIN
}
}
/// <summary>
/// URL per segnalazione reboot...
/// </summary>
public string urlReboot
{
get
{
string answ = "";
try
{
answ = string.Format(@"{0}{1}{2}{3}&mac={4}", currIobConf.serverData.MPIP, currIobConf.serverData.MPURL, currIobConf.serverData.CMDREBO, currIobConf.codIOB, GetMACAddress());
}
catch
{
answ = string.Format(@"{0}{1}{2}{3}", currIobConf.serverData.MPIP, currIobConf.serverData.MPURL, currIobConf.serverData.CMDREBO, currIobConf.codIOB);
}
return answ;
}
}
public string GetMACAddress()
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
String sMacAddress = string.Empty;
foreach (NetworkInterface adapter in nics)
{
if (sMacAddress == String.Empty)// only return MAC Address from first card
{
IPInterfaceProperties properties = adapter.GetIPProperties();
sMacAddress = adapter.GetPhysicalAddress().ToString();
}
}
return sMacAddress;
}
/// <summary>
/// Fornisce URL INPUT per i parametri richiesti
/// </summary>
/// <param name="queueVal">valore salvato in coda formato dtEve#valore#counter</param>
+11 -2
View File
@@ -68,7 +68,7 @@ namespace IOB_WIN
/// </summary>
public tipoAdapter tipoScelto = tipoAdapter.DEMO;
/// <summary>
/// URLK stringa di UPDATE...
/// URL stringa di UPDATE...
/// </summary>
protected string updateUrl
{
@@ -558,7 +558,7 @@ namespace IOB_WIN
}
catch (Exception exc)
{
lg.Error(string.Format("EXCEPTIO in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
lg.Error(string.Format("EXCEPTION in fase di lettura OPTPAR: {0}{1}", Environment.NewLine, exc));
}
}
// inizializzio conf IOB
@@ -584,6 +584,15 @@ namespace IOB_WIN
avviaAdapter();
displayTaskAndLog("Auto Started!");
}
try
{
// segnalo reboot (programma)...
iobObj.callUrl(iobObj.urlReboot);
}
catch (Exception exc)
{
lg.Error(string.Format("EXCEPTION in fase di chaimata URL di reboot:{0}{1}", Environment.NewLine, exc));
}
}
/// <summary>
Vendored
+3 -3
View File
@@ -14,9 +14,9 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=163']) {
env.versionNumber = VersionNumber(versionNumberString : '1.14.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
// env.versionNumber = VersionNumber(versionNumberString : '1.14.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
withEnv(['NEXT_BUILD_NUMBER=170']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.14.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.14.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'
}
}