mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Merge pull request #1799 from jijiang/master
CA-267553: Fix offline XC showing up to date bug
This commit is contained in:
commit
d2c80cddbc
@ -866,7 +866,7 @@ namespace XenAdmin.Core
|
||||
return alert;
|
||||
}
|
||||
|
||||
private static List<XenServerVersion> GetServerVersions(Host host, List<XenServerVersion> xenServerVersions)
|
||||
public static List<XenServerVersion> GetServerVersions(Host host, List<XenServerVersion> xenServerVersions)
|
||||
{
|
||||
var serverVersions = xenServerVersions.FindAll(version =>
|
||||
{
|
||||
|
@ -461,28 +461,7 @@ namespace XenAdmin.TabPages
|
||||
|
||||
private bool VersionFoundInUpdatesXml(IXenConnection connection)
|
||||
{
|
||||
if (connection == null)
|
||||
return false;
|
||||
|
||||
List<Host> hosts = connection.Cache.Hosts.ToList();
|
||||
|
||||
foreach (Host host in hosts)
|
||||
{
|
||||
var hostVersions = Updates.XenServerVersions.FindAll(version =>
|
||||
{
|
||||
if (version.BuildNumber != string.Empty)
|
||||
return (host.BuildNumberRaw() == version.BuildNumber);
|
||||
|
||||
return Helpers.HostProductVersionWithOEM(host) == version.VersionAndOEM
|
||||
|| (version.Oem != null && Helpers.OEMName(host).StartsWith(version.Oem)
|
||||
&& Helpers.HostProductVersion(host) == version.Version.ToString());
|
||||
});
|
||||
|
||||
if (hostVersions.Count == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return connection.Cache.Hosts.All(h => Updates.GetServerVersions(h, Updates.XenServerVersions).Count > 0);
|
||||
}
|
||||
|
||||
private void RebuildHostView()
|
||||
|
Loading…
Reference in New Issue
Block a user