mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CP-21178: Extend metadata on XenServerVersion
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
parent
3bb3f558c0
commit
e97fbc8f2e
@ -237,6 +237,7 @@ namespace XenAdmin.Actions
|
||||
string url = "";
|
||||
string timestamp = "";
|
||||
string buildNumber = "";
|
||||
string patchUuid = "";
|
||||
|
||||
foreach (XmlAttribute attrib in version.Attributes)
|
||||
{
|
||||
@ -254,6 +255,8 @@ namespace XenAdmin.Actions
|
||||
timestamp = attrib.Value;
|
||||
else if (attrib.Name == "build-number")
|
||||
buildNumber = attrib.Value;
|
||||
else if (attrib.Name == "patch-uuid")
|
||||
patchUuid = attrib.Value;
|
||||
}
|
||||
|
||||
List<XenServerPatch> patches = new List<XenServerPatch>();
|
||||
@ -289,7 +292,7 @@ namespace XenAdmin.Actions
|
||||
}
|
||||
|
||||
XenServerVersions.Add(new XenServerVersion(version_oem, name, is_latest, is_latest_cr, url, patches, minimalPatches, timestamp,
|
||||
buildNumber));
|
||||
buildNumber, patchUuid));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ namespace XenAdmin.Core
|
||||
public string Url;
|
||||
public string Oem;
|
||||
public List<XenServerPatch> Patches;
|
||||
public string PatchUuid;
|
||||
|
||||
/// <summary>
|
||||
/// A host of this version is considered up-to-date when it has all the patches in this list installed on it
|
||||
@ -68,8 +69,9 @@ namespace XenAdmin.Core
|
||||
/// <param name="minimumPatches">can be null (see <paramref name="MinimalPatches"/></param>
|
||||
/// <param name="timestamp"></param>
|
||||
/// <param name="buildNumber"></param>
|
||||
/// <param name="patch-uuid"></param>
|
||||
public XenServerVersion(string version_oem, string name, bool latest, bool latestCr, string url, List<XenServerPatch> patches, List<XenServerPatch> minimumPatches,
|
||||
string timestamp, string buildNumber)
|
||||
string timestamp, string buildNumber, string patchUuid)
|
||||
{
|
||||
ParseVersion(version_oem);
|
||||
Name = name;
|
||||
@ -82,6 +84,7 @@ namespace XenAdmin.Core
|
||||
MinimalPatches = minimumPatches;
|
||||
DateTime.TryParse(timestamp, out TimeStamp);
|
||||
BuildNumber = buildNumber;
|
||||
PatchUuid = patchUuid;
|
||||
}
|
||||
|
||||
private void ParseVersion(string version_oem)
|
||||
@ -109,7 +112,13 @@ namespace XenAdmin.Core
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsVersionAvailableAsAnUpdate
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.IsNullOrEmpty(PatchUuid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user