mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #1242 from mcintyre94/CA-223486
[CA-223486] Storage Link Status validation is wrongly included in Precheck During RPU
This commit is contained in:
commit
27f31431ca
@ -138,6 +138,12 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
get { return "Upgradeprechecks"; }
|
||||
}
|
||||
|
||||
private static bool HostNeedsLicenseCheck(Host host)
|
||||
{
|
||||
var edition = Host.GetEdition(host.edition);
|
||||
return edition != Host.Edition.EnterpriseXD && edition != Host.Edition.XenDesktop;
|
||||
}
|
||||
|
||||
protected override List<KeyValuePair<string, List<Check>>> GenerateChecks(Pool_patch patch)
|
||||
{
|
||||
List<KeyValuePair<string, List<Check>>> checks = new List<KeyValuePair<string, List<Check>>>();
|
||||
@ -197,24 +203,29 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
}
|
||||
}
|
||||
|
||||
//iSL (StorageLink) check
|
||||
//iSL (StorageLink) check - CA-223486: only for pre-Creedence
|
||||
var preCreedenceServers = SelectedServers.Where(h => !Helpers.CreedenceOrGreater(h)).ToList();
|
||||
if (preCreedenceServers.Any())
|
||||
{
|
||||
checks.Add(new KeyValuePair<string, List<Check>>(Messages.CHECKING_STORAGELINK_STATUS, new List<Check>()));
|
||||
checkGroup = checks[checks.Count - 1].Value;
|
||||
foreach (Host host in SelectedServers)
|
||||
foreach (Host host in preCreedenceServers)
|
||||
{
|
||||
checkGroup.Add(new HostHasUnsupportedStorageLinkSRCheck(host));
|
||||
}
|
||||
}
|
||||
|
||||
//Upgrading to Clearwater and above - license changes warning and deprecations
|
||||
if(SelectedServers.Any(h=> !Helpers.ClearwaterOrGreater(h)))
|
||||
var preClearwaterServers = SelectedServers.Where(h => !Helpers.ClearwaterOrGreater(h)).ToList();
|
||||
if(preClearwaterServers.Any())
|
||||
{
|
||||
//License changes
|
||||
if (SelectedServers.Any(h => Host.GetEdition(h.edition) != Host.Edition.EnterpriseXD &&
|
||||
Host.GetEdition(h.edition) != Host.Edition.XenDesktop))
|
||||
var hostsNeedingLicenseCheck = preClearwaterServers.Where(HostNeedsLicenseCheck).ToList();
|
||||
if (hostsNeedingLicenseCheck.Any())
|
||||
{
|
||||
checks.Add(new KeyValuePair<string, List<Check>>(Messages.CHECKING_LICENSING_STATUS, new List<Check>()));
|
||||
checks.Add(new KeyValuePair<string, List<Check>>(Messages.CHECKING_LICENSING_STATUS,
|
||||
new List<Check>()));
|
||||
checkGroup = checks[checks.Count - 1].Value;
|
||||
foreach (Host host in SelectedServers)
|
||||
foreach (Host host in hostsNeedingLicenseCheck)
|
||||
{
|
||||
checkGroup.Add(new UpgradingFromTampaAndOlderCheck(host));
|
||||
}
|
||||
@ -223,7 +234,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
//WSS removal
|
||||
checks.Add(new KeyValuePair<string, List<Check>>(Messages.CHECKING_WSS_STATUS, new List<Check>()));
|
||||
checkGroup = checks[checks.Count - 1].Value;
|
||||
foreach (Host host in SelectedServers)
|
||||
foreach (Host host in preClearwaterServers)
|
||||
{
|
||||
checkGroup.Add(new HostHasWssCheck(host));
|
||||
}
|
||||
@ -231,11 +242,10 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
//VMP[RP]removal
|
||||
checks.Add(new KeyValuePair<string, List<Check>>(Messages.CHECKING_VMPR_STATUS, new List<Check>()));
|
||||
checkGroup = checks[checks.Count - 1].Value;
|
||||
foreach (Host host in SelectedServers)
|
||||
foreach (Host host in preClearwaterServers)
|
||||
{
|
||||
checkGroup.Add(new VmprActivatedCheck(host));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//SafeToUpgradeCheck - in automatic mode only
|
||||
|
Loading…
Reference in New Issue
Block a user