mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
virDomain: interface: add virDomainNetDefIsOvsport
Tell whether a port definition is an ovs managed virtual port Signed-off-by: Jinsheng Zhang <zhangjl02@inspur.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
11fcf054e6
commit
b9cbf5587e
@ -29107,6 +29107,17 @@ virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check whether the port is an ovs managed port */
|
||||||
|
bool
|
||||||
|
virDomainNetDefIsOvsport(const virDomainNetDef *net)
|
||||||
|
{
|
||||||
|
const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net);
|
||||||
|
virDomainNetType actualType = virDomainNetGetActualType(net);
|
||||||
|
|
||||||
|
return (actualType == VIR_DOMAIN_NET_TYPE_BRIDGE) && vport &&
|
||||||
|
vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH;
|
||||||
|
}
|
||||||
|
|
||||||
const virNetDevBandwidth *
|
const virNetDevBandwidth *
|
||||||
virDomainNetGetActualBandwidth(const virDomainNetDef *iface)
|
virDomainNetGetActualBandwidth(const virDomainNetDef *iface)
|
||||||
{
|
{
|
||||||
|
@ -3612,6 +3612,8 @@ int virDomainNetGetActualDirectMode(const virDomainNetDef *iface);
|
|||||||
virDomainHostdevDef *virDomainNetGetActualHostdev(virDomainNetDef *iface);
|
virDomainHostdevDef *virDomainNetGetActualHostdev(virDomainNetDef *iface);
|
||||||
const virNetDevVPortProfile *
|
const virNetDevVPortProfile *
|
||||||
virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface);
|
virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface);
|
||||||
|
bool
|
||||||
|
virDomainNetDefIsOvsport(const virDomainNetDef *net);
|
||||||
const virNetDevBandwidth *
|
const virNetDevBandwidth *
|
||||||
virDomainNetGetActualBandwidth(const virDomainNetDef *iface);
|
virDomainNetGetActualBandwidth(const virDomainNetDef *iface);
|
||||||
const virNetDevVlan *virDomainNetGetActualVlan(const virDomainNetDef *iface);
|
const virNetDevVlan *virDomainNetGetActualVlan(const virDomainNetDef *iface);
|
||||||
|
@ -519,6 +519,7 @@ virDomainNetDefActualFromNetworkPort;
|
|||||||
virDomainNetDefActualToNetworkPort;
|
virDomainNetDefActualToNetworkPort;
|
||||||
virDomainNetDefFormat;
|
virDomainNetDefFormat;
|
||||||
virDomainNetDefFree;
|
virDomainNetDefFree;
|
||||||
|
virDomainNetDefIsOvsport;
|
||||||
virDomainNetDefNew;
|
virDomainNetDefNew;
|
||||||
virDomainNetDefToNetworkPort;
|
virDomainNetDefToNetworkPort;
|
||||||
virDomainNetDHCPInterfaces;
|
virDomainNetDHCPInterfaces;
|
||||||
|
Loading…
Reference in New Issue
Block a user