mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #759 from MihaelaStoica/CA-161457
CA-161457: Hide network if PIF.managed==false
This commit is contained in:
commit
6db5d1ea37
@ -151,12 +151,12 @@ namespace XenAPI
|
||||
if (IsGuestInstallerNetwork)
|
||||
return false;
|
||||
|
||||
if (showHiddenVMs)
|
||||
return true;
|
||||
|
||||
if (!ShowAllPifs(showHiddenVMs))
|
||||
return false;
|
||||
|
||||
if (showHiddenVMs)
|
||||
return true;
|
||||
|
||||
if (IsSlave)
|
||||
return false;
|
||||
|
||||
|
@ -160,7 +160,7 @@ namespace XenAPI
|
||||
|
||||
public override bool Show(bool showHiddenVMs)
|
||||
{
|
||||
return showHiddenVMs || !IsHidden;
|
||||
return IsManaged && (showHiddenVMs || !IsHidden);
|
||||
}
|
||||
|
||||
public override bool IsHidden
|
||||
@ -171,6 +171,19 @@ namespace XenAPI
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the interface is managed by xapi.
|
||||
/// Note that this is the same as PIF.managed property for Clearwater SP1 and later hosts.
|
||||
/// And it is always true for older hosts, where the managed property is not available.
|
||||
/// </summary>
|
||||
public bool IsManaged
|
||||
{
|
||||
get
|
||||
{
|
||||
return Helpers.ClearwaterSp1OrGreater(Connection) ? managed : true;
|
||||
}
|
||||
}
|
||||
|
||||
// Whether this PIF is a management interface in the XenCenter sense.
|
||||
// Note that this is not the same as PIF.management, which only includes
|
||||
// the primary management interface. We also want all interfaces with an
|
||||
|
Loading…
Reference in New Issue
Block a user