CP-27188: Filter out the SR-IOV network when configuring IP address

Signed-off-by: Jisheng Xing <jisheng.xing@citrix.com>
This commit is contained in:
Jisheng Xing 2018-03-06 16:49:49 +00:00 committed by Cheng Zhang
parent b2df93222a
commit 35acc262ee
2 changed files with 8 additions and 1 deletions

View File

@ -287,7 +287,9 @@ namespace XenAdmin.Dialogs
if (!AllowManagementOnVLAN && (type == Type.PRIMARY || type == Type.PRIMARY_WITH_HA))
networks.RemoveAll(network=>network.IsVLAN());
networks.RemoveAll(network => network.IsSriov());
NetworkComboBox.Items.AddRange(networks.ToArray());
SquelchNetworkComboBoxChange = true;

View File

@ -293,6 +293,11 @@ namespace XenAPI
return Connection.ResolveAll(PIFs).Find(pif => pif.VLAN >= 0) != null;
}
public bool IsSriov()
{
return Connection.ResolveAll(PIFs).Find(pif => pif.IsSrIovLogicalPIF()) != null;
}
#region IEquatable<Network> Members