Merge pull request #1205 from GaborApatiNagy/CAR-2245_CP-19266_2

CP-19266 & other changes
This commit is contained in:
Mihaela Stoica 2016-10-13 15:08:38 +01:00 committed by GitHub
commit 9398837c38
4 changed files with 8 additions and 19 deletions

View File

@ -392,7 +392,7 @@ namespace XenAdmin.Core
// 1. patch is not already installed
if (elyOrGreater && appliedUpdates.Any(update => string.Equals(update.uuid, serverPatch.Uuid, StringComparison.OrdinalIgnoreCase)))
return false;
else if (appliedPatches.Any(patch => string.Equals(patch.uuid, serverPatch.Uuid, StringComparison.OrdinalIgnoreCase)))
else if (!elyOrGreater && appliedPatches.Any(patch => string.Equals(patch.uuid, serverPatch.Uuid, StringComparison.OrdinalIgnoreCase)))
return false;
// 2. the host has all the required patches installed
@ -400,7 +400,7 @@ namespace XenAdmin.Core
!serverPatch.RequiredPatches
.All(requiredPatchUuid =>
elyOrGreater && appliedUpdates.Any(update => string.Equals(update.uuid, requiredPatchUuid, StringComparison.OrdinalIgnoreCase))
|| appliedPatches.Any(patch => string.Equals(patch.uuid, requiredPatchUuid, StringComparison.OrdinalIgnoreCase))
|| !elyOrGreater && appliedPatches.Any(patch => string.Equals(patch.uuid, requiredPatchUuid, StringComparison.OrdinalIgnoreCase))
)
)
return false;
@ -410,7 +410,7 @@ namespace XenAdmin.Core
serverPatch.ConflictingPatches
.Any(conflictingPatchUuid =>
elyOrGreater && appliedUpdates.Any(update => string.Equals(update.uuid, conflictingPatchUuid, StringComparison.OrdinalIgnoreCase))
|| appliedPatches.Any(patch => string.Equals(patch.uuid, conflictingPatchUuid, StringComparison.OrdinalIgnoreCase))
|| !elyOrGreater && appliedPatches.Any(patch => string.Equals(patch.uuid, conflictingPatchUuid, StringComparison.OrdinalIgnoreCase))
)
)
return false;

View File

@ -188,6 +188,7 @@ namespace XenAdmin.Wizards.PatchingWizard
PatchingWizard_PatchingPage.Patch = PatchingWizard_UploadPage.Patch;
}
PatchingWizard_PrecheckPage.PoolUpdate = PatchingWizard_UploadPage.PoolUpdate;
PatchingWizard_PatchingPage.PoolUpdate = PatchingWizard_UploadPage.PoolUpdate;
PatchingWizard_ModePage.PoolUpdate = PatchingWizard_UploadPage.PoolUpdate;
PatchingWizard_PatchingPage.SuppPackVdis = PatchingWizard_UploadPage.SuppPackVdis;

View File

@ -501,18 +501,6 @@ namespace XenAdmin.Wizards.PatchingWizard
#endregion
private bool AllServersElyOrGreater()
{
foreach (var server in SelectedServers)
{
if (!Helpers.ElyOrGreater(server.Connection))
{
return false;
}
}
return true;
}
private void FinishedWithErrors(Exception exception)
{
labelTitle.Text = string.Format(Messages.UPDATE_WAS_NOT_COMPLETED, GetUpdateName());

View File

@ -132,8 +132,8 @@ namespace XenAdmin.Wizards.PatchingWizard
string patchName = null;
if (Patch != null)
patchName = Patch.Name;
if (Pool_update != null)
patchName = Pool_update.Name;
if (PoolUpdate != null)
patchName = PoolUpdate.Name;
labelPrechecksFirstLine.Text = patchName != null
? string.Format(Messages.PATCHINGWIZARD_PRECHECKPAGE_FIRSTLINE, patchName)
@ -163,7 +163,7 @@ namespace XenAdmin.Wizards.PatchingWizard
if (Patch != null)
_worker.RunWorkerAsync(Patch);
else
_worker.RunWorkerAsync(Pool_update);
_worker.RunWorkerAsync(PoolUpdate);
}
private void _worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
@ -518,7 +518,7 @@ namespace XenAdmin.Wizards.PatchingWizard
public UpdateType SelectedUpdateType { private get; set; }
public Pool_patch Patch { private get; set; }
public Pool_update Pool_update { private get; set; }
public Pool_update PoolUpdate { private get; set; }
internal enum PreCheckResult { OK, Warning, Failed }