CA-217862: Batch Updates: Fixed order of checks when setting the tooltip for disabled hosts

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2016-08-11 11:14:32 +01:00
parent 0ae3f6e2c4
commit 50e9504da7
2 changed files with 10 additions and 10 deletions

View File

@ -492,7 +492,7 @@ namespace XenAdmin.Core
} }
/// <summary> /// <summary>
/// Returns a XenServerVersion if all hosts of the pool has the same version /// Returns a XenServerVersion if all hosts of the pool have the same version
/// Returns null if it is unknown or they don't match /// Returns null if it is unknown or they don't match
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>

View File

@ -175,6 +175,15 @@ namespace XenAdmin.Wizards.PatchingWizard
if (IsInAutomaticMode) if (IsInAutomaticMode)
{ {
var pool = Helpers.GetPool(host.Connection);
if (pool != null && !pool.IsPoolFullyUpgraded) //partially upgraded pool is not supported
{
row.Enabled = false;
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_AUTO_UPDATE_NOT_SUPPORTED_PARTIALLY_UPGRADED;
return;
}
//check updgrade sequences //check updgrade sequences
Updates.UpgradeSequence us = Updates.GetUpgradeSequence(host.Connection, AutoDownloadedXenServerVersions); Updates.UpgradeSequence us = Updates.GetUpgradeSequence(host.Connection, AutoDownloadedXenServerVersions);
@ -195,15 +204,6 @@ namespace XenAdmin.Wizards.PatchingWizard
return; return;
} }
var pool = Helpers.GetPool(host.Connection);
if (pool != null && !pool.IsPoolFullyUpgraded) //partially upgraded pool is not supported
{
row.Enabled = false;
row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_AUTO_UPDATE_NOT_SUPPORTED_PARTIALLY_UPGRADED;
return;
}
//if there is a host missing from the upgrade sequence //if there is a host missing from the upgrade sequence
if (host.Connection.Cache.Hosts.Any(h => !us.Keys.Contains(h))) if (host.Connection.Cache.Hosts.Any(h => !us.Keys.Contains(h)))
{ {