mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #761 from MihaelaStoica/CA-191315
CA-191315: Storage motion from XenCenter should no longer be blocked …
This commit is contained in:
commit
c9c0862a0f
@ -57,7 +57,7 @@ namespace XenAdmin.Commands
|
|||||||
|
|
||||||
protected override void AddAdditionalMenuItems(SelectedItemCollection selection)
|
protected override void AddAdditionalMenuItems(SelectedItemCollection selection)
|
||||||
{
|
{
|
||||||
if (selection.ToList().All(item => Helpers.TampaOrGreater(item.Connection)))
|
if (selection.ToList().All(item => Helpers.TampaOrGreater(item.Connection) && !Helpers.CrossPoolMigrationRestrictedWithWlb(item.Connection)))
|
||||||
{
|
{
|
||||||
VMOperationCommand cmd = new CrossPoolMigrateCommand(Command.MainWindowCommandInterface, selection);
|
VMOperationCommand cmd = new CrossPoolMigrateCommand(Command.MainWindowCommandInterface, selection);
|
||||||
DropDownItems.Add(new ToolStripSeparator());
|
DropDownItems.Add(new ToolStripSeparator());
|
||||||
|
@ -162,6 +162,8 @@ namespace XenAdmin.Commands
|
|||||||
base.DropDownItems.Insert(hostMenuItems.IndexOf(menuItem) + 1, menuItem);
|
base.DropDownItems.Insert(hostMenuItems.IndexOf(menuItem) + 1, menuItem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Program.Invoke(Program.MainWindow, () => AddAdditionalMenuItems(selection));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnableAppropriateHostsNoWlb(Session session)
|
private void EnableAppropriateHostsNoWlb(Session session)
|
||||||
|
@ -114,7 +114,7 @@ namespace XenAdmin.Commands
|
|||||||
return !failureFound &&
|
return !failureFound &&
|
||||||
vm.allowed_operations != null &&
|
vm.allowed_operations != null &&
|
||||||
vm.allowed_operations.Contains(vm_operations.migrate_send) &&
|
vm.allowed_operations.Contains(vm_operations.migrate_send) &&
|
||||||
!Helpers.WlbEnabledAndConfigured(vm.Connection) &&
|
!Helpers.CrossPoolMigrationRestrictedWithWlb(vm.Connection) &&
|
||||||
vm.SRs.ToList().All(sr=> sr != null && !sr.HBALunPerVDI) &&
|
vm.SRs.ToList().All(sr=> sr != null && !sr.HBALunPerVDI) &&
|
||||||
(preselectedHost == null || vm.Connection.Resolve(vm.resident_on) != preselectedHost); //Not the same as the pre-selected host
|
(preselectedHost == null || vm.Connection.Resolve(vm.resident_on) != preselectedHost); //Not the same as the pre-selected host
|
||||||
}
|
}
|
||||||
|
@ -58,9 +58,9 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard.Filters
|
|||||||
bool targetWlb = false;
|
bool targetWlb = false;
|
||||||
|
|
||||||
if(ItemToFilterOn != null)
|
if(ItemToFilterOn != null)
|
||||||
targetWlb = Helpers.WlbEnabledAndConfigured(ItemToFilterOn.Connection);
|
targetWlb = Helpers.CrossPoolMigrationRestrictedWithWlb(ItemToFilterOn.Connection);
|
||||||
|
|
||||||
bool sourceWlb = preSelectedVMs.Any(vm => Helpers.WlbEnabledAndConfigured(vm.Connection));
|
bool sourceWlb = preSelectedVMs.Any(vm => Helpers.CrossPoolMigrationRestrictedWithWlb(vm.Connection));
|
||||||
|
|
||||||
reason = targetWlb ? Messages.CPM_WLB_ENABLED_ON_HOST_FAILURE_REASON : Messages.CPM_WLB_ENABLED_ON_VM_FAILURE_REASON;
|
reason = targetWlb ? Messages.CPM_WLB_ENABLED_ON_HOST_FAILURE_REASON : Messages.CPM_WLB_ENABLED_ON_VM_FAILURE_REASON;
|
||||||
|
|
||||||
|
@ -491,6 +491,11 @@ namespace XenAdmin.Core
|
|||||||
return (p != null && !String.IsNullOrEmpty(p.wlb_url));
|
return (p != null && !String.IsNullOrEmpty(p.wlb_url));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool CrossPoolMigrationRestrictedWithWlb(IXenConnection conn)
|
||||||
|
{
|
||||||
|
return WlbEnabledAndConfigured(conn) && !DundeeOrGreater(conn);
|
||||||
|
}
|
||||||
|
|
||||||
#region AllocationBoundsStructAndMethods
|
#region AllocationBoundsStructAndMethods
|
||||||
public struct AllocationBounds
|
public struct AllocationBounds
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user