CA-213563: VM policy cannot be changed to snapshot with

quiesce after installing vss tools

Enabling snapshot policy type to be changed to quiesce from
other snapshot policy types if the selected VMs are
quiesce snapshot capable.

Signed-off-by: Sharath Babu <sharath.babu@citrix.com>
This commit is contained in:
Sharath Babu 2016-10-24 05:59:01 +05:30
parent 9bade951b9
commit 6b64efb9a6
2 changed files with 41 additions and 0 deletions

View File

@ -465,6 +465,14 @@ namespace XenAdmin.Dialogs
private void verticalTabs_SelectedIndexChanged(object sender, EventArgs e)
{
var snapshotTypePageSpecific = verticalTabs.SelectedItem as NewPolicySnapshotTypePageSpecific<VMSS>;
if (snapshotTypePageSpecific != null)
{
newPolicyVMSSTypePage1.ToggleQuiesceCheckBox(newVMSSVMsPage1.SelectedVMs);
return;
}
var selectedPage = verticalTabs.SelectedItem as NewPolicyArchivePage;
if (selectedPage != null)
{

View File

@ -164,6 +164,39 @@ namespace XenAdmin.Wizards.NewPolicyWizard
}
}
public void ToggleQuiesceCheckBox(List <VM> SelectedVMs)
{
switch (BackupType)
{
case policy_backup_type.snapshot:
quiesceCheckBox.Enabled = true;
quiesceCheckBox.Checked = false;
break;
case policy_backup_type.snapshot_with_quiesce:
quiesceCheckBox.Enabled = true;
quiesceCheckBox.Checked = true;
break;
case policy_backup_type.checkpoint:
quiesceCheckBox.Enabled = true;
quiesceCheckBox.Checked = false;
break;
}
foreach (VM vm in SelectedVMs)
{
if (!vm.allowed_operations.Contains(vm_operations.snapshot_with_quiesce) || Helpers.FeatureForbidden(vm, Host.RestrictVss))
{
quiesceCheckBox.Enabled = false;
quiesceCheckBox.Checked = false;
break;
}
}
}
private void RefreshTab(IVMPolicy policy)
{
/* when a policy does not have any VMs, irrespective of