mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
CP-15408: Add license restriction for VM migration
Cherry picked from cream-indigo: CP-14848: XenCenter: Implement license restriction for migration Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
parent
2b03930baa
commit
ea690581d0
@ -89,6 +89,10 @@ namespace XenAdmin.Commands
|
||||
|
||||
private static bool CanExecute(VM vm)
|
||||
{
|
||||
if (vm.Connection != null && vm.Connection.IsConnected)
|
||||
if (Helpers.FeatureForbidden(vm.Connection, Host.RestrictInterPoolMigrate))
|
||||
return false;
|
||||
|
||||
if (vm != null && !vm.is_a_template && !vm.Locked)
|
||||
{
|
||||
if(Helpers.TampaOrGreater(vm.Connection))
|
||||
|
@ -426,6 +426,16 @@ namespace XenAPI
|
||||
return h._RestrictExportResourceData;
|
||||
}
|
||||
|
||||
private bool _RestrictInterPoolMigrate
|
||||
{
|
||||
get { return BoolKeyPreferTrue(license_params, "restrict_xen_motion"); }
|
||||
}
|
||||
|
||||
public static bool RestrictInterPoolMigrate(Host h)
|
||||
{
|
||||
return h._RestrictInterPoolMigrate;
|
||||
}
|
||||
|
||||
private bool _RestrictReadCaching
|
||||
{
|
||||
get { return BoolKeyPreferTrue(license_params, "restrict_read_caching"); }
|
||||
|
Loading…
Reference in New Issue
Block a user