[libvirt PATCH v2 1/4] domain: add interface information to 'virDomainGetGuestInfo'

Peter Krempa pkrempa at redhat.com
Tue Sep 14 08:28:17 UTC 2021


On Tue, Sep 14, 2021 at 15:56:42 +0800, zhanglei wrote:

We usually ask for commit message, e.g.:

"The new parameter group returns information about network interfaces".

> Signed-off-by: zhanglei <zhanglei at smartx.com>
> ---
>  include/libvirt/libvirt-domain.h |  1 +
>  src/libvirt-domain.c             | 13 +++++++++++++
>  2 files changed, 14 insertions(+)

[...]

>  int virDomainGetGuestInfo(virDomainPtr domain,
> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index 57baef6889..b4d88f55d4 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -12579,6 +12579,19 @@ virDomainSetVcpu(virDomainPtr domain,
>   *
>   *      "hostname" - the hostname of the domain
>   *
> + * VIR_DOMAIN_GUEST_INFO_INTERFACES:
> + *  Returns information about the interfaces within the domain. the typed

The second sentence should start with a capital letter.

> + *  parameter keys are in this format:
> + *
> + *      "if.count" - the number of interfaces defined on this domain
> + *                    as an unsigned int

Here it mentions the type of the field ...

> + *      "if.<num>.name" - interface name in the guest
> + *      "if.<num>.hwaddr" -  hardware address of interface
> + *      "if.<num>.addr.count - the number of ip addresses of interface
> + *      "if.<num>.addr.<num>.type" - the type of ip address(e.g. ipv4)
> + *      "if.<num>.addr.<num>.addr" - the ip address
> + *      "if.<num>.addr.<num>.prefix" - the number of bits of ip address prefix

... but neither of these do.

> + *
>   * Using 0 for @types returns all information groups supported by the given
>   * hypervisor.
>   *
> -- 
> 2.31.1
> 




More information about the libvir-list mailing list