From nobody Fri Apr 26 01:26:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1631620186240158.67010958835044; Tue, 14 Sep 2021 04:49:46 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-NWXK4MjEMaGo40H9656xgQ-1; Tue, 14 Sep 2021 07:49:44 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1A35B8F9823; Tue, 14 Sep 2021 11:48:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF02377F29; Tue, 14 Sep 2021 11:48:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9E4511805986; Tue, 14 Sep 2021 11:48:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EBmXch032242 for ; Tue, 14 Sep 2021 07:48:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22FE521449B6; Tue, 14 Sep 2021 11:48:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C9D021449B4 for ; Tue, 14 Sep 2021 11:48:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0E0EB8001EA for ; Tue, 14 Sep 2021 11:48:30 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-125-ta6-bfwbNem6aNvS1j6HyA-1; Tue, 14 Sep 2021 07:48:27 -0400 Received: by mail-pj1-f41.google.com with SMTP id v19so5988959pjh.2 for ; Tue, 14 Sep 2021 04:48:27 -0700 (PDT) Received: from fedora.zelin.local ([106.161.68.221]) by smtp.gmail.com with ESMTPSA id k22sm10330883pfi.149.2021.09.14.04.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 04:48:26 -0700 (PDT) X-MC-Unique: NWXK4MjEMaGo40H9656xgQ-1 X-MC-Unique: ta6-bfwbNem6aNvS1j6HyA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9kqnzedlGR4NYMZt4EeCduA/R+apfKolbS6oNL+vhVw=; b=WQIYo/mf3+ZfiRl0tLSAl++ca9uky8su7nPaJUpbtqbi/iDgH00o753SfW6o9UaJTI TEDILlgWn+oa3RWEl1ZVT8Wp/XkpFYUIpenyuU0m2DZ3HiPOYOyblNL3D43J5uabYAWy oxRZe5PyKj87ByQHRHcXmWoxw4yud4ynvp5ee8sfytWsTAfY5sl6KolvCIy3fzwjw6dX gmM/H5WYvTtqe0GptxyHR9WJ4yJubLPdmuxuRxALIaFt/4gVv66OVOYRguByiCwTP2PO XR2AQ/iO0yDfDEWamZHDpbsSKK8R4G7eDui5//aQ/keNBKeF9aETHSwarCrx1c6pOmfM XCeg== X-Gm-Message-State: AOAM530wq2OvpK50zAkycJf5Pm7yPCqRjwmV2DO093OBcRhwwLJWkbZ8 IfEh3l9c0sFJttrhYUEltdc6KT/VxFYQVgbCkMeYB8p9 X-Google-Smtp-Source: ABdhPJwTDtROVDgW7ah2Zfp0okt4uwctA/iZE7eMd5A6AiAg3yqdEmk4gPefeMT5cQaY6SgY31yk9w== X-Received: by 2002:a17:90b:3810:: with SMTP id mq16mr71280pjb.0.1631620106255; Tue, 14 Sep 2021 04:48:26 -0700 (PDT) From: zhanglei To: libvir-list@redhat.com, zhanglei@smartx.com Subject: [libvirt PATCH v3 1/5] domain: add interface information to 'virDomainGetGuestInfo' Date: Tue, 14 Sep 2021 19:47:06 +0800 Message-Id: <20210914114710.270816-2-zhanglei@smartx.com> In-Reply-To: <20210914114710.270816-1-zhanglei@smartx.com> References: <20210914114710.270816-1-zhanglei@smartx.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631620186696100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: zhanglei --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 7ef8ac51e5..b088847725 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -5074,6 +5074,7 @@ typedef enum { VIR_DOMAIN_GUEST_INFO_HOSTNAME =3D (1 << 3), /* return hostname inform= ation */ VIR_DOMAIN_GUEST_INFO_FILESYSTEM =3D (1 << 4), /* return filesystem in= formation */ VIR_DOMAIN_GUEST_INFO_DISKS =3D (1 << 5), /* return disks information = */ + VIR_DOMAIN_GUEST_INFO_INTERFACES =3D (1 << 6), /* return interfaces in= formation */ } virDomainGuestInfoTypes; =20 int virDomainGetGuestInfo(virDomainPtr domain, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 57baef6889..fdc0780ae0 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -12579,6 +12579,18 @@ virDomainSetVcpu(virDomainPtr domain, * * "hostname" - the hostname of the domain * + * VIR_DOMAIN_GUEST_INFO_INTERFACES: + * Returns information about the interfaces within the domain. the typed + * parameter keys are in this format: + * + * "if.count" - the number of interfaces defined on this domain + * "if..name" - name in the guest (e.g. ``eth0``) for interface = + * "if..hwaddr" - hardware address in the guest for interface + * "if..addr.count - the number of IP addresses of interface + * "if..addr..type" - the IP address type of addr (= e.g. ipv4) + * "if..addr..addr" - the IP address of addr + * "if..addr..prefix" - the prefix of IP address of addr <= num1> + * * Using 0 for @types returns all information groups supported by the given * hypervisor. * --=20 2.31.1 From nobody Fri Apr 26 01:26:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1631620177606198.4112664549607; Tue, 14 Sep 2021 04:49:37 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-596-X3YDs_ZdMBCYTXNngStfDQ-1; Tue, 14 Sep 2021 07:49:34 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F6D18BAF49; Tue, 14 Sep 2021 11:48:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F41267A5CE; Tue, 14 Sep 2021 11:48:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A11921805989; Tue, 14 Sep 2021 11:48:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EBmZjI032288 for ; Tue, 14 Sep 2021 07:48:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id C67FD202F348; Tue, 14 Sep 2021 11:48:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1C71203B7B0 for ; Tue, 14 Sep 2021 11:48:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9396D800883 for ; Tue, 14 Sep 2021 11:48:30 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-481-LDqzJxCLNU6G9ogBwoL1Wg-1; Tue, 14 Sep 2021 07:48:29 -0400 Received: by mail-pj1-f52.google.com with SMTP id v19so5989000pjh.2 for ; Tue, 14 Sep 2021 04:48:28 -0700 (PDT) Received: from fedora.zelin.local ([106.161.68.221]) by smtp.gmail.com with ESMTPSA id k22sm10330883pfi.149.2021.09.14.04.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 04:48:27 -0700 (PDT) X-MC-Unique: X3YDs_ZdMBCYTXNngStfDQ-1 X-MC-Unique: LDqzJxCLNU6G9ogBwoL1Wg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5R3hECBKQJiek5Sokq4yl9VHZlFCUP+l73PwRoWeweI=; b=uyOXecei4LF8cxHJnMjfb3/OUCTcSaQwOligXZBGoVlssd0tvVJQjCOsI8zfa1XH1k h9TOSxPMAxk+qnYG83TexyHrbsDljGz3xwDdILuehzcGDXnHo9PawG5u0TIM1cp1Ib5B IE6VpKDj6HGTHwXEqfssZpsuj5/0G2//ZIzZY9qdfVBdgHlr4VbrucurbFSssr0aknXe fBJYuGnPBOvnAw1SVlHpBODXet5JwS3ZnooENV7WRulqXBPlk+VB1DqBnPXb96vUf94a PUROc1veKTb6B81TVTsFq9D2eQQAHutWtRJwDg8fQiqO4tKXUo65o9vBQcDZy5POics5 7JXQ== X-Gm-Message-State: AOAM530bHjod8HgTNJslfl3rinl3qxilUKCxT5uR6WAj90m8QIN2HmwO JfC9MO/kL6oiRdnRX7S0FIML8lZ3kbSZGblQcO5xVRSz X-Google-Smtp-Source: ABdhPJyT8FCZ84xp/bn0hzlPmYq/3cXEH/oKzOj07iqmG30vJLB7SgRf6lCJeFR3dLrr3c75Lqtd3w== X-Received: by 2002:a17:90a:cb14:: with SMTP id z20mr1645857pjt.230.1631620107763; Tue, 14 Sep 2021 04:48:27 -0700 (PDT) From: zhanglei To: libvir-list@redhat.com, zhanglei@smartx.com Subject: [libvirt PATCH v3 2/5] virsh: add interface information to guestinfo command Date: Tue, 14 Sep 2021 19:47:07 +0800 Message-Id: <20210914114710.270816-3-zhanglei@smartx.com> In-Reply-To: <20210914114710.270816-1-zhanglei@smartx.com> References: <20210914114710.270816-1-zhanglei@smartx.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631620177930100001 Content-Type: text/plain; charset="utf-8" The new parameter group returns information about network interfaces Signed-off-by: zhanglei --- docs/manpages/virsh.rst | 12 ++++++++++-- src/libvirt-domain.c | 2 +- tools/virsh-domain.c | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 9561b3f59d..5310baab10 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2700,7 +2700,7 @@ guestinfo :: =20 guestinfo domain [--user] [--os] [--timezone] [--hostname] [--filesyste= m] - [--disk] + [--disk] [--interface] =20 Print information about the guest from the point of view of the guest agen= t. Note that this command requires a guest agent to be configured and running= in @@ -2711,7 +2711,7 @@ are supported by the guest agent. You can limit the t= ypes of information that are returned by specifying one or more flags. If a requested information type is not supported, the processes will provide an exit code of 1. Available information types flags are *--user*, *--os*, -*--timezone*, *--hostname*, *--filesystem* and *--disk*. +*--timezone*, *--hostname*, *--filesystem*, *--disk* and *--interface*. =20 Note that depending on the hypervisor type and the version of the guest ag= ent running within the domain, not all of the following information may be @@ -2779,6 +2779,14 @@ returned: * ``disk..alias`` - the device alias of the disk (e.g. sda) * ``disk..guest_alias`` - optional alias assigned to the disk =20 +*--interface* returns: +* ``if.count`` - the number of interfaces defined on this domain +* ``if..name`` - name in the guest (e.g. ``eth0``) for interface +* ``if..hwaddr`` - hardware address in the guest for interface +* ``if..addr.count`` - the number of IP addresses of interface +* ``if..addr..type`` - the IP address type of addr (e.g.= ipv4) +* ``if..addr..addr`` - the IP address of addr +* ``if..addr..prefix`` - the prefix of IP address of addr =20 guestvcpus ---------- diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fdc0780ae0..ce7cafde36 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -12580,7 +12580,7 @@ virDomainSetVcpu(virDomainPtr domain, * "hostname" - the hostname of the domain * * VIR_DOMAIN_GUEST_INFO_INTERFACES: - * Returns information about the interfaces within the domain. the typed + * Returns information about the interfaces within the domain. The typed * parameter keys are in this format: * * "if.count" - the number of interfaces defined on this domain diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e5bd1fdd75..5ba5bd6b8c 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13829,6 +13829,10 @@ static const vshCmdOptDef opts_guestinfo[] =3D { .type =3D VSH_OT_BOOL, .help =3D N_("report disk information"), }, + {.name =3D "interface", + .type =3D VSH_OT_BOOL, + .help =3D N_("report interface information"), + }, {.name =3D NULL} }; =20 @@ -13854,6 +13858,8 @@ cmdGuestInfo(vshControl *ctl, const vshCmd *cmd) types |=3D VIR_DOMAIN_GUEST_INFO_FILESYSTEM; if (vshCommandOptBool(cmd, "disk")) types |=3D VIR_DOMAIN_GUEST_INFO_DISKS; + if (vshCommandOptBool(cmd, "interface")) + types |=3D VIR_DOMAIN_GUEST_INFO_INTERFACES; =20 if (!(dom =3D virshCommandOptDomain(ctl, cmd, NULL))) return false; --=20 2.31.1 From nobody Fri Apr 26 01:26:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1631620151138585.4710646949638; Tue, 14 Sep 2021 04:49:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-ZgvRmOjxOSmAsqAQ0Rr30A-1; Tue, 14 Sep 2021 07:49:08 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C802F8B9EB6; Tue, 14 Sep 2021 11:48:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0724180FDE; Tue, 14 Sep 2021 11:48:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 73D894E58E; Tue, 14 Sep 2021 11:48:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EBmXTH032243 for ; Tue, 14 Sep 2021 07:48:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 475AB203B7AC; Tue, 14 Sep 2021 11:48:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4341A2038BBA for ; Tue, 14 Sep 2021 11:48:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25581811E76 for ; Tue, 14 Sep 2021 11:48:32 +0000 (UTC) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-553-XhevVgCwOtWTe5mgDMj-OQ-1; Tue, 14 Sep 2021 07:48:30 -0400 Received: by mail-pg1-f170.google.com with SMTP id f129so12460903pgc.1 for ; Tue, 14 Sep 2021 04:48:30 -0700 (PDT) Received: from fedora.zelin.local ([106.161.68.221]) by smtp.gmail.com with ESMTPSA id k22sm10330883pfi.149.2021.09.14.04.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 04:48:29 -0700 (PDT) X-MC-Unique: ZgvRmOjxOSmAsqAQ0Rr30A-1 X-MC-Unique: XhevVgCwOtWTe5mgDMj-OQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=85bNVl2eN/p2UQFFHOfG3yUWONQ7iI8ljIueSG0Xmtw=; b=JoACtSHszQew4OwoEYomipkUkHZm+zHaGoqtBXVmmfk82OyjEpyYQfCCgZ4WU3jHFi XTMD28cgYS4Ejj1ClhDxYaBxQp523Fy/N9f4Yn3sZ53+xX8ziUWCFUPN51N6CZaZLKiO 7q0yr71tgOWjQUMTRy87qYJyhUathS4T1iZx/fX4wuJJDnIs0xVjQEnUrk9CJ3qDEzQO vPvn9nMoRr6R1AQaqY9DM2N5O0oS9zW3wV9cy8JWfAFgfHhXBhwRCzNWrpGPdgFirTXD b/en0qTA/Cl3ID8EyHjiJHmlyMGkS6F+daYZXEJyIYnFtR6tzu7GoFyEtAROmKfikTU3 jUww== X-Gm-Message-State: AOAM532NQHVDoeMKIbXtUAb7HW3Ib40TLlNKYRo0Tf6BvYao29huEIDe mCEiQoXA06Zs/BqAlPX9Y4jecKUQ88Y023hMo0g9RJsP X-Google-Smtp-Source: ABdhPJy8VblosVdVdXsbftC4MgtxK65IDxph4Ekz+i/kSAYbkaHg6P5wX+XAdp51SnFtK5iKaPnmQA== X-Received: by 2002:a63:1902:: with SMTP id z2mr15271542pgl.312.1631620109352; Tue, 14 Sep 2021 04:48:29 -0700 (PDT) From: zhanglei To: libvir-list@redhat.com, zhanglei@smartx.com Subject: [libvirt PATCH v3 3/5] qemu: refactor 'qemuAgentGetInterfaces' Date: Tue, 14 Sep 2021 19:47:08 +0800 Message-Id: <20210914114710.270816-4-zhanglei@smartx.com> In-Reply-To: <20210914114710.270816-1-zhanglei@smartx.com> References: <20210914114710.270816-1-zhanglei@smartx.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631620152780100001 Content-Type: text/plain; charset="utf-8" Add report_unsupported parameter to qemuAgentGetInterfaces Signed-off-by: zhanglei --- src/qemu/qemu_agent.c | 9 ++++++--- src/qemu/qemu_agent.h | 3 ++- src/qemu/qemu_driver.c | 2 +- tests/qemuagenttest.c | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 5f421be6f6..a7f943e0dc 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -2245,17 +2245,20 @@ qemuAgentGetAllInterfaceAddresses(virDomainInterfac= ePtr **ifaces_ret, */ int qemuAgentGetInterfaces(qemuAgent *agent, - virDomainInterfacePtr **ifaces) + virDomainInterfacePtr **ifaces, + bool report_unsupported) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; virJSONValue *ret_array =3D NULL; + int rc; =20 if (!(cmd =3D qemuAgentMakeCommand("guest-network-get-interfaces", NUL= L))) return -1; =20 - if (qemuAgentCommand(agent, cmd, &reply, agent->timeout) < 0) - return -1; + if ((rc =3D qemuAgentCommandFull(agent, cmd, &reply, agent->timeout, + report_unsupported)) < 0) + return rc; =20 if (!(ret_array =3D virJSONValueObjectGetArray(reply, "return"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_agent.h b/src/qemu/qemu_agent.h index 81b45b8e5d..94eab9de9f 100644 --- a/src/qemu/qemu_agent.h +++ b/src/qemu/qemu_agent.h @@ -151,7 +151,8 @@ int qemuAgentSetTime(qemuAgent *mon, bool sync); =20 int qemuAgentGetInterfaces(qemuAgent *mon, - virDomainInterfacePtr **ifaces); + virDomainInterfacePtr **ifaces, + bool report_unsupported); =20 int qemuAgentSetUserPassword(qemuAgent *mon, const char *user, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index dfc27572c4..5071faab5e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18950,7 +18950,7 @@ qemuDomainInterfaceAddresses(virDomainPtr dom, goto endjob; =20 agent =3D qemuDomainObjEnterAgent(vm); - ret =3D qemuAgentGetInterfaces(agent, ifaces); + ret =3D qemuAgentGetInterfaces(agent, ifaces, true); qemuDomainObjExitAgent(vm, agent); =20 endjob: diff --git a/tests/qemuagenttest.c b/tests/qemuagenttest.c index bef6dfd152..8fb3da7fef 100644 --- a/tests/qemuagenttest.c +++ b/tests/qemuagenttest.c @@ -907,7 +907,7 @@ testQemuAgentGetInterfaces(const void *data) goto cleanup; =20 if ((ifaces_count =3D qemuAgentGetInterfaces(qemuMonitorTestGetAgent(t= est), - &ifaces)) < 0) + &ifaces, true)) < 0) goto cleanup; =20 if (ifaces_count !=3D 4) { --=20 2.31.1 From nobody Fri Apr 26 01:26:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1631620184865923.1287246020142; Tue, 14 Sep 2021 04:49:44 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-cMOuQgGGMiW1bPyHTjEfLA-1; Tue, 14 Sep 2021 07:49:41 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 116FA8AEF99; Tue, 14 Sep 2021 11:48:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D590C83BE9; Tue, 14 Sep 2021 11:48:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9AA6F4EA2F; Tue, 14 Sep 2021 11:48:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EBmY56032248 for ; Tue, 14 Sep 2021 07:48:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CBFB21449B3; Tue, 14 Sep 2021 11:48:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3780320283B2 for ; Tue, 14 Sep 2021 11:48:34 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 20D32811E81 for ; Tue, 14 Sep 2021 11:48:34 +0000 (UTC) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-506-VefpLEtDN-aQY6yjaa-Jww-1; Tue, 14 Sep 2021 07:48:32 -0400 Received: by mail-pj1-f65.google.com with SMTP id g13-20020a17090a3c8d00b00196286963b9so1906371pjc.3 for ; Tue, 14 Sep 2021 04:48:31 -0700 (PDT) Received: from fedora.zelin.local ([106.161.68.221]) by smtp.gmail.com with ESMTPSA id k22sm10330883pfi.149.2021.09.14.04.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 04:48:30 -0700 (PDT) X-MC-Unique: cMOuQgGGMiW1bPyHTjEfLA-1 X-MC-Unique: VefpLEtDN-aQY6yjaa-Jww-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kJ4vwu7IlAZq1qwgJEMaT8jrBQk+plrZ5rcrslUl1Q0=; b=mdv/OVAUk89E1PCTHhOqCc6qV1xXFX0zf4SF4EmOcQI6Elu3njPaevMvmz+B7w5rrD iMY3rn6GlJhiWu6mcUQJUol8Z5cbtjwQ/2wNX1HW/QhEn813SoXjdvkDe2UuN7q42ebr xQJJp6okoraoK+v2Ilz08WCOvxCxPiPVcbP8QMjngCtBjPsWddYyJMdZi6JQaGvNo1Se TrO/APNpZKGSm4G5KRDEQq6lfciklNnEBQujYRcRYcV0ToS2J2lDP+GSybVUsC+zIc5k 5nFS+wIuzTYIfJmfLXaE2TmF6wfPYD/RIfnBdkqiHjV8M5DGqtV4cOGnDjL161eMx+zy QHug== X-Gm-Message-State: AOAM530W/djKHVZoLLjbEe4zZvsjdM0I5udIxGgHYi2RdFuBPHG1QJpP F/nwH+09PItwNzbUt/lxWgz9r6glXCpM5/og6bb8R3vr X-Google-Smtp-Source: ABdhPJwV8ymm4Q3FUap0ROfKX9QPg2u76RHlLGo/L+OJxBJjLa6YTZJtYWvRFWcCY/kg31dNY6Fykw== X-Received: by 2002:a17:903:102:b0:13a:66a8:f28 with SMTP id y2-20020a170903010200b0013a66a80f28mr14740440plc.62.1631620110850; Tue, 14 Sep 2021 04:48:30 -0700 (PDT) From: zhanglei To: libvir-list@redhat.com, zhanglei@smartx.com Subject: [libvirt PATCH v3 4/5] qemu: add guest interface information in 'qemuDomainGetGuestInfo' Date: Tue, 14 Sep 2021 19:47:09 +0800 Message-Id: <20210914114710.270816-5-zhanglei@smartx.com> In-Reply-To: <20210914114710.270816-1-zhanglei@smartx.com> References: <20210914114710.270816-1-zhanglei@smartx.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631620186547100001 Content-Type: text/plain; charset="utf-8" Support return guest interface information from guest agent Signed-off-by: zhanglei --- src/qemu/qemu_driver.c | 88 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5071faab5e..38a12d18b6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19896,7 +19896,8 @@ static const unsigned int qemuDomainGetGuestInfoSup= portedTypes =3D VIR_DOMAIN_GUEST_INFO_TIMEZONE | VIR_DOMAIN_GUEST_INFO_HOSTNAME | VIR_DOMAIN_GUEST_INFO_FILESYSTEM | - VIR_DOMAIN_GUEST_INFO_DISKS; + VIR_DOMAIN_GUEST_INFO_DISKS | + VIR_DOMAIN_GUEST_INFO_INTERFACES; =20 static int qemuDomainGetGuestInfoCheckSupport(unsigned int types, @@ -20095,6 +20096,71 @@ qemuAgentFSInfoFormatParams(qemuAgentFSInfo **fsin= fo, } } =20 +static void +virDomainInterfaceFormatParams(virDomainInterfacePtr *ifaces, + int nifaces, + virTypedParameterPtr *params, + int *nparams, int * maxparams) +{ + size_t i; + size_t j; + const char *type =3D NULL; + + if (virTypedParamsAddUInt(params, nparams, maxparams, + "if.count", nifaces) < 0) + return; + + for (i =3D 0; i < nifaces; i++) { + char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.name", i); + if (virTypedParamsAddString(params, nparams, maxparams, + param_name, ifaces[i]->name) < 0) + return; + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.hwaddr", i); + if (virTypedParamsAddString(params, nparams, maxparams, + param_name, ifaces[i]->hwaddr) < 0) + return; + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.addr.count", i); + if (virTypedParamsAddUInt(params, nparams, maxparams, + param_name, ifaces[i]->naddrs) < 0) + return; + + for (j =3D 0; j < ifaces[i]->naddrs; j++) { + switch (ifaces[i]->addrs[j].type) { + case VIR_IP_ADDR_TYPE_IPV4: + type =3D "ipv4"; + break; + case VIR_IP_ADDR_TYPE_IPV6: + type =3D "ipv6"; + break; + } + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.addr.%zu.type", i, j); + if (virTypedParamsAddString(params, nparams, maxparams, + param_name, type) < 0) + return; + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.addr.%zu.addr", i, j); + if (virTypedParamsAddString(params, nparams, maxparams, + param_name, ifaces[i]->addrs[j].ad= dr) < 0) + return; + + g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, + "if.%zu.addr.%zu.prefix", i, j); + if (virTypedParamsAddUInt(params, nparams, maxparams, + param_name, ifaces[i]->addrs[j].pref= ix) < 0) + return; + } + } +} =20 static int qemuDomainGetGuestInfo(virDomainPtr dom, @@ -20116,6 +20182,8 @@ qemuDomainGetGuestInfo(virDomainPtr dom, qemuAgentFSInfo **agentfsinfo =3D NULL; size_t ndisks =3D 0; qemuAgentDiskInfo **agentdiskinfo =3D NULL; + virDomainInterfacePtr *ifaces =3D NULL; + size_t nifaces =3D 0; size_t i; =20 virCheckFlags(0, -1); @@ -20181,6 +20249,15 @@ qemuDomainGetGuestInfo(virDomainPtr dom, } } =20 + if (supportedTypes & VIR_DOMAIN_GUEST_INFO_INTERFACES) { + rc =3D qemuAgentGetInterfaces(agent, &ifaces, report_unsupported); + if (rc =3D=3D -1) { + goto exitagent; + } else if (rc >=3D 0) { + nifaces =3D rc; + } + } + qemuDomainObjExitAgent(vm, agent); qemuDomainObjEndAgentJob(vm); =20 @@ -20203,6 +20280,10 @@ qemuDomainGetGuestInfo(virDomainPtr dom, qemuDomainObjEndJob(driver, vm); } =20 + if (nifaces > 0) { + virDomainInterfaceFormatParams(ifaces, nifaces, params, nparams, &= maxparams); + } + ret =3D 0; =20 cleanup: @@ -20212,6 +20293,11 @@ qemuDomainGetGuestInfo(virDomainPtr dom, for (i =3D 0; i < ndisks; i++) qemuAgentDiskInfoFree(agentdiskinfo[i]); g_free(agentdiskinfo); + if (ifaces && nifaces > 0) { + for (i =3D 0; i < nifaces; i++) + virDomainInterfaceFree(ifaces[i]); + } + g_free(ifaces); =20 virDomainObjEndAPI(&vm); return ret; --=20 2.31.1 From nobody Fri Apr 26 01:26:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1631620163782805.4097027444074; Tue, 14 Sep 2021 04:49:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-565-hVysdtNePqK1-N5rLot2SQ-1; Tue, 14 Sep 2021 07:49:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C41D44655D; Tue, 14 Sep 2021 11:48:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0F917883D; Tue, 14 Sep 2021 11:48:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4E12A4E9F4; Tue, 14 Sep 2021 11:48:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18EBmZoQ032281 for ; Tue, 14 Sep 2021 07:48:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D9BF21449B3; Tue, 14 Sep 2021 11:48:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 887CE20283B2 for ; Tue, 14 Sep 2021 11:48:35 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71C12101A529 for ; Tue, 14 Sep 2021 11:48:35 +0000 (UTC) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-392-6eXKlEykOICkTUr6mkoiWg-1; Tue, 14 Sep 2021 07:48:33 -0400 Received: by mail-pg1-f175.google.com with SMTP id g184so12451720pgc.6 for ; Tue, 14 Sep 2021 04:48:33 -0700 (PDT) Received: from fedora.zelin.local ([106.161.68.221]) by smtp.gmail.com with ESMTPSA id k22sm10330883pfi.149.2021.09.14.04.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 04:48:32 -0700 (PDT) X-MC-Unique: hVysdtNePqK1-N5rLot2SQ-1 X-MC-Unique: 6eXKlEykOICkTUr6mkoiWg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O6CmrMJaFQFWJs2bq0w3HmCEyNu66ocJUDJ4ijq0/tM=; b=e10DmcifqMGrvgTb7e/LeS9dm067rO+UBEQ6f7Lt1La1YaDPR2DjKbYSkNL7nT+WrV jTh/VVpmsk/nQo4xSrxnkNd6vO7o7D7r90/1SL+DUfKmBmeb21r6t+4RflphzzEnSW/Y FLYe47n4/fGyRA5G6bb68PggNLH9ycvgYGVyH6yfbPIJDwW9sFFlEzElQp+rHodkFlF1 gJ1JHPkDVfBXDfwro0JQ/Va/l/rp25EwrbHMRBfhvSEyMcFyDuTuF/Ulz2kScnG/EtJx s4wfWgavN8AkCiGo/YuQ5KuuAb349M042Nhf7peS5yFLkueKGmMUs6k6OdIMCyxGhuWc AmOA== X-Gm-Message-State: AOAM532x0nDJF5wa2Tc/Tc15WEqYv7JQ6wowCLqDeoVTTPBocNNCL7ob rCczTmMYrzr7ygLiFcQ3j4lAayymIAVo2pNZ1AvImkIx X-Google-Smtp-Source: ABdhPJxMNmHxRHwyIB5Vi5oti6DvFowSn2+0sof2qjWjnshF5w/Th8CF2FtHVdzy+jarUdC8I13SNA== X-Received: by 2002:a62:3841:0:b0:433:8f1a:9c with SMTP id f62-20020a623841000000b004338f1a009cmr4392435pfa.40.1631620112321; Tue, 14 Sep 2021 04:48:32 -0700 (PDT) From: zhanglei To: libvir-list@redhat.com, zhanglei@smartx.com Subject: [libvirt PATCH v3 5/5] NEWS: add guest interface information in 'virDomainGetGuestInfo' Date: Tue, 14 Sep 2021 19:47:10 +0800 Message-Id: <20210914114710.270816-6-zhanglei@smartx.com> In-Reply-To: <20210914114710.270816-1-zhanglei@smartx.com> References: <20210914114710.270816-1-zhanglei@smartx.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1631620164376100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: zhanglei --- NEWS.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4521499db7..050f22afee 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,11 @@ v7.8.0 (unreleased) =20 * **Improvements** =20 + * qemu: Report guest interface information in ``virDomainGetGuestInfo`` + + Libvirt is now able to report interface information from the guest's + perspective (using guest agent). + * **Bug fixes** =20 =20 --=20 2.31.1