aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-06-14 13:11:17 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-06-14 13:11:17 +0300
commit039ed91b201069d1658824b608935a20a98fd686 (patch)
tree0e4a9d62f833a9ecf5124863dff7212527d27156 /Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore
parenta1fec1f151489dc6034ca4a3c43110d9d20138c4 (diff)
downloadTango-039ed91b201069d1658824b608935a20a98fd686.tar.gz
Tango-039ed91b201069d1658824b608935a20a98fd686.zip
Sort job rmls list on PPC.
Update all volumes on RML switch. Backup/Restore validation using machine id instead of SN. Fixed liquid quantities display string on color conversion hive.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs5
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/DefaultBackupManager.cs8
2 files changed, 11 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
index c687377a6..8468ce8fb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
@@ -35,6 +35,11 @@ namespace Tango.PPC.Common.BackupRestore
public String MachineSerialNumber { get; set; }
/// <summary>
+ /// Gets or sets the machine unique identifier.
+ /// </summary>
+ public String MachineGuid { get; set; }
+
+ /// <summary>
/// Gets or sets the application version.
/// </summary>
public String ApplicationVersion { get; set; }
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/DefaultBackupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/DefaultBackupManager.cs
index 1462e1490..9e7e49790 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/DefaultBackupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/DefaultBackupManager.cs
@@ -68,6 +68,7 @@ namespace Tango.PPC.Common.BackupRestore
backupFile.Settings = settings;
backupFile.Name = name;
backupFile.MachineSerialNumber = _machineProvider.Machine.SerialNumber;
+ backupFile.MachineGuid = _machineProvider.Machine.Guid;
backupFile.ApplicationVersion = _applicationManager.Version.ToString();
//Firmware
@@ -282,9 +283,12 @@ namespace Tango.PPC.Common.BackupRestore
}
//Validate Machine Serial Number
- if (backupFile.Settings.Mode == BackupMode.Full && backupFile.MachineSerialNumber != _machineProvider.Machine.SerialNumber)
+ if (backupFile.MachineGuid != null)
{
- throw new InvalidOperationException($"The specified backup file targets machine '{backupFile.MachineSerialNumber}'. Cannot perform the restore operation.");
+ if (backupFile.Settings.Mode == BackupMode.Full && backupFile.MachineGuid != _machineProvider.Machine.Guid)
+ {
+ throw new InvalidOperationException($"The specified backup file targets machine '{backupFile.MachineSerialNumber}'. Cannot perform the restore operation.");
+ }
}
//Validate Machine State