CA-164819: On board VGA appears on GPU list

-We used to check host.RestrictVgpu instead of checking the API version when populating the dropdown on the GPU Settings page. This is not sufficient anymore as it depends on the license too, so changed the code to check version (vGPU was introduced in Clearwater SP1).
This commit is contained in:
Gabor Apati-Nagy 2015-03-25 17:04:45 +00:00
parent 23319daeba
commit 2e6276272a

View File

@ -210,7 +210,8 @@ namespace XenAdmin.SettingsPanels
}
}
gpu_groups = Helpers.FeatureForbidden(Connection, Host.RestrictVgpu)
// vGPU was introduced in Clearwater SP1
gpu_groups = !Helpers.ClearwaterSp1OrGreater(Connection) //We used to check host.RestrictVgpu here (instead of checking the API version); this is not correct anymore, because vGPU is a licensed feature.
? Connection.Cache.GPU_groups
: Connection.Cache.GPU_groups.Where(g => g.PGPUs.Count > 0 && g.supported_VGPU_types.Count != 0).ToArray();
//not showing empty groups