On Thu, May 23, 2019 at 11:59:59AM -0400, Laine Stump wrote:
On 5/14/19 11:48 AM, Daniel P. Berrangé wrote:
> Introduce a new virNetworPort object that will present an attachment to
> a virtual network from a VM.
>
> Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
> ---
> include/libvirt/libvirt-network.h | 122 ++++++++
> include/libvirt/virterror.h | 3 +
> src/datatypes.c | 60 ++++
> src/datatypes.h | 41 +++
> src/driver-network.h | 41 +++
> src/libvirt-network.c | 444 ++++++++++++++++++++++++++++++
> src/libvirt_private.syms | 2 +
> src/libvirt_public.syms | 15 +
> src/util/virerror.c | 9 +
> 9 files changed, 737 insertions(+)
>
> diff --git a/include/libvirt/libvirt-network.h b/include/libvirt/libvirt-network.h
> index 5115251fbe..97eceef754 100644
> --- a/include/libvirt/libvirt-network.h
> +++ b/include/libvirt/libvirt-network.h
> @@ -46,6 +46,22 @@ typedef struct _virNetwork virNetwork;
> */
> typedef virNetwork *virNetworkPtr;
> +/**
> + * virNetworkPort:
> + *
> + * a virNetworkPort is a private structure representing a virtual network
> + * port
> + */
> +typedef struct _virNetworkPort virNetworkPort;
> +
> +/**
> + * virNetworkPortPtr:
> + *
> + * a virNetworkPortPtr is pointer to a virNetworkPort private structure,
> + * this is the type used to reference a virtual network port in the API.
> + */
> +typedef virNetworkPort *virNetworkPortPtr;
> +
> /*
> * Get connection from network.
> */
> @@ -333,4 +349,110 @@ int virConnectNetworkEventRegisterAny(virConnectPtr conn,
> int virConnectNetworkEventDeregisterAny(virConnectPtr conn,
> int callbackID);
> +
> +virNetworkPortPtr
> +virNetworkPortLookupByUUID(virNetworkPtr net,
> + const unsigned char *uuid);
> +
> +virNetworkPortPtr
> +virNetworkPortLookupByUUIDString(virNetworkPtr net,
> + const char *uuidstr);
> +
> +typedef enum {
> + VIR_NETWORK_PORT_CREATE_RECLAIM = (1 << 0), /* reclaim existing used
resources */
> +} virNetworkPortCreateFlags;
> +
> +virNetworkPortPtr
> +virNetworkPortCreateXML(virNetworkPtr net,
> + const char *xmldesc,
> + unsigned int flags);
So this is used as a replacement for both the Allocate and the Notify
functions that are currently there (via the RECLAIM flag).
Yes, exactly
> diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
> index dbce3336d5..c629528fbd 100644
> --- a/src/libvirt_public.syms
> +++ b/src/libvirt_public.syms
> @@ -819,4 +819,19 @@ LIBVIRT_5.2.0 {
> virConnectGetStoragePoolCapabilities;
> } LIBVIRT_4.10.0;
> +LIBVIRT_5.3.0 {
This needs to be 5.4.0, right?
I'll make it 5.5.0 since I'm going away and so won't be back before
5.5.0 opens.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|