Renamed UpdateType NewRetail to Legacy.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2018-10-26 15:22:08 +01:00 committed by Mihaela Stoica
parent fc98eed16b
commit 8b107c86e8
5 changed files with 11 additions and 11 deletions

View File

@ -111,7 +111,7 @@ namespace XenAdmin.Wizards.PatchingWizard
var wizardMode = PatchingWizard_SelectPatchPage.WizardMode; var wizardMode = PatchingWizard_SelectPatchPage.WizardMode;
var wizardIsInAutomatedUpdatesMode = wizardMode == WizardMode.AutomatedUpdates; var wizardIsInAutomatedUpdatesMode = wizardMode == WizardMode.AutomatedUpdates;
var updateType = wizardIsInAutomatedUpdatesMode ? UpdateType.NewRetail : PatchingWizard_SelectPatchPage.SelectedUpdateType; var updateType = wizardIsInAutomatedUpdatesMode ? UpdateType.Legacy : PatchingWizard_SelectPatchPage.SelectedUpdateType;
var newPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedNewPatch; var newPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedNewPatch;
var existPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedExistingPatch; var existPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedExistingPatch;
var alertPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedUpdateAlert; var alertPatch = wizardIsInAutomatedUpdatesMode ? null : PatchingWizard_SelectPatchPage.SelectedUpdateAlert;
@ -186,7 +186,7 @@ namespace XenAdmin.Wizards.PatchingWizard
} }
else if (prevPageType == typeof(PatchingWizard_UploadPage)) else if (prevPageType == typeof(PatchingWizard_UploadPage))
{ {
if (PatchingWizard_SelectPatchPage.SelectedUpdateType == UpdateType.NewRetail) if (PatchingWizard_SelectPatchPage.SelectedUpdateType == UpdateType.Legacy)
{ {
PatchingWizard_SelectPatchPage.SelectedUpdateType = UpdateType.Existing; PatchingWizard_SelectPatchPage.SelectedUpdateType = UpdateType.Existing;
PatchingWizard_SelectPatchPage.SelectedExistingPatch = PatchingWizard_UploadPage.Patch; PatchingWizard_SelectPatchPage.SelectedExistingPatch = PatchingWizard_UploadPage.Patch;

View File

@ -87,7 +87,7 @@ namespace XenAdmin.Wizards.PatchingWizard
switch (SelectedUpdateType) switch (SelectedUpdateType)
{ {
case UpdateType.NewRetail: case UpdateType.Legacy:
case UpdateType.Existing: case UpdateType.Existing:
ManualTextInstructions = ModePoolPatch(out someHostMayRequireRestart); ManualTextInstructions = ModePoolPatch(out someHostMayRequireRestart);
automaticDisabled = anyPoolForbidsAutostart && someHostMayRequireRestart; automaticDisabled = anyPoolForbidsAutostart && someHostMayRequireRestart;

View File

@ -248,7 +248,7 @@ namespace XenAdmin.Wizards.PatchingWizard
} }
else //legacy format else //legacy format
{ {
SelectedUpdateType = UpdateType.NewRetail; SelectedUpdateType = UpdateType.Legacy;
} }
} }
else else
@ -256,7 +256,7 @@ namespace XenAdmin.Wizards.PatchingWizard
if (WizardHelpers.IsValidFile(fileName)) if (WizardHelpers.IsValidFile(fileName))
{ {
if (fileName.EndsWith("." + Branding.Update)) if (fileName.EndsWith("." + Branding.Update))
SelectedUpdateType = UpdateType.NewRetail; SelectedUpdateType = UpdateType.Legacy;
else if (fileName.EndsWith("." + Branding.UpdateIso)) else if (fileName.EndsWith("." + Branding.UpdateIso))
SelectedUpdateType = UpdateType.ISO; SelectedUpdateType = UpdateType.ISO;
else else
@ -465,13 +465,13 @@ namespace XenAdmin.Wizards.PatchingWizard
{ {
if (downloadUpdateRadioButton.Checked) if (downloadUpdateRadioButton.Checked)
{ {
return SelectedUpdateType == UpdateType.NewRetail || SelectedUpdateType == UpdateType.ISO return SelectedUpdateType == UpdateType.Legacy || SelectedUpdateType == UpdateType.ISO
? ((PatchGridViewRow) dataGridViewPatches.SelectedRows[0]).PathPatch ? ((PatchGridViewRow) dataGridViewPatches.SelectedRows[0]).PathPatch
: null; : null;
} }
else if (selectFromDiskRadioButton.Checked) else if (selectFromDiskRadioButton.Checked)
{ {
return SelectedUpdateType == UpdateType.NewRetail || SelectedUpdateType == UpdateType.ISO return SelectedUpdateType == UpdateType.Legacy || SelectedUpdateType == UpdateType.ISO
? WizardHelpers.IsValidFile(unzippedUpdateFilePath) && ? WizardHelpers.IsValidFile(unzippedUpdateFilePath) &&
Path.GetExtension(FilePath).ToLowerInvariant().Equals(".zip") Path.GetExtension(FilePath).ToLowerInvariant().Equals(".zip")
? unzippedUpdateFilePath ? unzippedUpdateFilePath
@ -762,5 +762,5 @@ namespace XenAdmin.Wizards.PatchingWizard
#endregion #endregion
} }
public enum UpdateType { NewRetail, Existing, ISO} public enum UpdateType { Legacy, Existing, ISO}
} }

View File

@ -265,7 +265,7 @@ namespace XenAdmin.Wizards.PatchingWizard
switch (SelectedUpdateType) switch (SelectedUpdateType)
{ {
case UpdateType.NewRetail: case UpdateType.Legacy:
case UpdateType.Existing: case UpdateType.Existing:
if (Helpers.ElyOrGreater(host)) if (Helpers.ElyOrGreater(host))
{ {

View File

@ -204,7 +204,7 @@ namespace XenAdmin.Wizards.PatchingWizard
AsyncAction action = null; AsyncAction action = null;
switch (SelectedUpdateType) switch (SelectedUpdateType)
{ {
case UpdateType.NewRetail: case UpdateType.Legacy:
if (CanUploadUpdateOnHost(SelectedNewPatchPath, selectedServer)) if (CanUploadUpdateOnHost(SelectedNewPatchPath, selectedServer))
{ {
bool deleteFileOnCancel = AllDownloadedPatches.ContainsValue(SelectedNewPatchPath); bool deleteFileOnCancel = AllDownloadedPatches.ContainsValue(SelectedNewPatchPath);
@ -295,7 +295,7 @@ namespace XenAdmin.Wizards.PatchingWizard
AsyncAction action = null; AsyncAction action = null;
switch (SelectedUpdateType) switch (SelectedUpdateType)
{ {
case UpdateType.NewRetail: case UpdateType.Legacy:
if (CanUploadUpdateOnHost(SelectedNewPatchPath, master)) if (CanUploadUpdateOnHost(SelectedNewPatchPath, master))
action = new CheckDiskSpaceForPatchUploadAction(master, SelectedNewPatchPath, true); action = new CheckDiskSpaceForPatchUploadAction(master, SelectedNewPatchPath, true);
break; break;