mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #1521 from MihaelaStoica/CA-248471
CA-248471: XenCenter offers passthrough on unlicensed hosts even when…
This commit is contained in:
commit
b332082d43
@ -200,7 +200,10 @@ namespace XenAdmin.SettingsPanels
|
||||
var vgpuGroup = Connection.Resolve(vgpu.GPU_group);
|
||||
|
||||
if (Helpers.FeatureForbidden(Connection, Host.RestrictVgpu) || !vm.CanHaveVGpu)
|
||||
currentGpuTuple = new GpuTuple(vgpuGroup, null, null);
|
||||
{
|
||||
if (vgpuGroup.HasPassthrough)
|
||||
currentGpuTuple = new GpuTuple(vgpuGroup, null, null); //GPU pass-through item
|
||||
}
|
||||
else
|
||||
{
|
||||
VGPU_type vgpuType = Connection.Resolve(vgpu.type);
|
||||
@ -251,7 +254,8 @@ namespace XenAdmin.SettingsPanels
|
||||
{
|
||||
if (Helpers.FeatureForbidden(Connection, Host.RestrictVgpu) || !vm.CanHaveVGpu)
|
||||
{
|
||||
comboBoxGpus.Items.Add(new GpuTuple(gpu_group, null, null)); //GPU pass-through item
|
||||
if (gpu_group.HasPassthrough)
|
||||
comboBoxGpus.Items.Add(new GpuTuple(gpu_group, null, null)); //GPU pass-through item
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -63,6 +63,14 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Has at least one supported_VGPU_type that is passthrough
|
||||
/// </summary>
|
||||
public bool HasPassthrough
|
||||
{
|
||||
get { return Connection.ResolveAll(supported_VGPU_types).Any(supportedType => supportedType.IsPassthrough); }
|
||||
}
|
||||
|
||||
|
||||
#region IEquatable<GPU_group> Members
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user