Merge pull request #921 from GaborApatiNagy/CA-202374

CA-202374: XC greyed out 'Install Tools' menu for imported VM from Cream
This commit is contained in:
Mihaela Stoica 2016-04-04 17:55:01 +01:00
commit 772c921b3d

View File

@ -424,6 +424,18 @@ namespace XenAPI
get { return HVM_boot_policy != ""; } get { return HVM_boot_policy != ""; }
} }
public bool HasStaticIP
{
get
{
var metrics = Connection.Resolve(this.guest_metrics);
if (metrics == null)
return false;
return 0 != IntKey(metrics.other, "feature-static-ip-setting", 0);
}
}
public bool HasRDP public bool HasRDP
{ {
get get
@ -818,7 +830,9 @@ namespace XenAPI
{ {
Debug.Assert(HasNewVirtualisationStates); Debug.Assert(HasNewVirtualisationStates);
var flags = HasRDP ? VirtualisationStatus.MANAGEMENT_INSTALLED : 0; var flags = HasStaticIP
? VirtualisationStatus.MANAGEMENT_INSTALLED
: 0;
var vm_guest_metrics = Connection.Resolve(guest_metrics); var vm_guest_metrics = Connection.Resolve(guest_metrics);
if (vm_guest_metrics != null && vm_guest_metrics.storage_paths_optimized && vm_guest_metrics.network_paths_optimized) if (vm_guest_metrics != null && vm_guest_metrics.storage_paths_optimized && vm_guest_metrics.network_paths_optimized)