From nobody Mon Apr 29 04:39:25 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 1634292496192602.6881238597585; Fri, 15 Oct 2021 03:08:16 -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-573-GM2Taa3VM-qC4CBY3vzJ6g-1; Fri, 15 Oct 2021 06:08:13 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD01F10A8E01; Fri, 15 Oct 2021 10:08:08 +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 9DE051002D67; Fri, 15 Oct 2021 10:08:08 +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 339CA4EA2A; Fri, 15 Oct 2021 10:08:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19FA86u8003617 for ; Fri, 15 Oct 2021 06:08:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1413540D1B98; Fri, 15 Oct 2021 10:08:06 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0FC6F40C1256 for ; Fri, 15 Oct 2021 10:08:06 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 EB414899EC5 for ; Fri, 15 Oct 2021 10:08:05 +0000 (UTC) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-FRP7fBybMwS30_8rp23gEg-1; Fri, 15 Oct 2021 06:08:04 -0400 Received: by mail-pl1-f170.google.com with SMTP id v20so6079262plo.7 for ; Fri, 15 Oct 2021 03:08:04 -0700 (PDT) Received: from zhanglei-dev.zelin.local ([2a09:bac0:23::815:bc4]) by smtp.gmail.com with ESMTPSA id c25sm4613388pfn.159.2021.10.15.03.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 03:08:03 -0700 (PDT) X-MC-Unique: GM2Taa3VM-qC4CBY3vzJ6g-1 X-MC-Unique: FRP7fBybMwS30_8rp23gEg-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=QnjIYzeOn1KhL35oBWz6RbNTn23ez1TkuQlDcq4aKtc=; b=W+S1ETI6XMP8qAb+qQyrnYvX3MybpdYnEB8hN2jKWKDQ3EOeQpA/J0DYEEH39baml9 dBEZmaqyvPjekdZfNoGCsfmkG4QwiV0ZVK7kV/hq3W/fepLsCJ3L10VNcUWiZozm3zlo wfZT79hCH+FHFFM+PZt1kTNIAIIbNWhH/C70odRNaxijt04aNUaf4l4Zi9ZNx+o+NBYQ UbQ4KrpIvj3DuJHB7agaixlw/LIVMhLae9BMkoNRJD5YKg+O5gq1p1KFTg3QI+CYupjG Z+d3gVEcy06OUmFqGqu4JJAmwqL1bC+Wue5yFwCAtJFpryMzficTmendyMiZiPqJgiK0 qDCg== X-Gm-Message-State: AOAM533kJ3gHrg74UswEBvu6/9XPp4iJSdHhrWMR81EoMXYDuIoLGYsp g9LP2EVwLeYSMAE4TED2kcoKWoaMG4yx+33DnETUsw== X-Google-Smtp-Source: ABdhPJz49077FjOikFxVaTEBUCCMQ3a17gomEG23Yvlvs6kCCVRFCWjqhiKAsj0+smh6Bb+ZYQTuHw== X-Received: by 2002:a17:90b:4a51:: with SMTP id lb17mr12507938pjb.41.1634292483203; Fri, 15 Oct 2021 03:08:03 -0700 (PDT) From: zhanglei To: zhanglei@smartx.com, libvir-list@redhat.com Subject: [libvirt PATCH v4 1/5] domain: add interface information to 'virDomainGetGuestInfo' Date: Fri, 15 Oct 2021 18:07:47 +0800 Message-Id: <20211015100751.1492806-2-zhanglei@smartx.com> In-Reply-To: <20211015100751.1492806-1-zhanglei@smartx.com> References: <20211015100751.1492806-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.84 on 10.11.54.2 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.84 on 10.5.11.22 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: 1634292497899100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: zhanglei Reviewed-by: J=C3=A1n Tomko --- 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 eaafcc6b29..2f017c5b68 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -5098,6 +5098,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 Mon Apr 29 04:39:25 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 1634292512707950.2486550239345; Fri, 15 Oct 2021 03:08:32 -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-137-yUfc7hIDN8S5Neyj8VLkSw-1; Fri, 15 Oct 2021 06:08:24 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FA0010A8E00; Fri, 15 Oct 2021 10:08:19 +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 493501002D67; Fri, 15 Oct 2021 10:08:19 +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 182961806D03; Fri, 15 Oct 2021 10:08:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19FA87Jj003627 for ; Fri, 15 Oct 2021 06:08:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 74F3A40CFD11; Fri, 15 Oct 2021 10:08:07 +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 6FF7440CFD0D for ; Fri, 15 Oct 2021 10:08:07 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 58C3B80231F for ; Fri, 15 Oct 2021 10:08:07 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-535-GxsbveneNi6Kmbx8tNm2hw-1; Fri, 15 Oct 2021 06:08:05 -0400 Received: by mail-pl1-f176.google.com with SMTP id v20so6079294plo.7 for ; Fri, 15 Oct 2021 03:08:05 -0700 (PDT) Received: from zhanglei-dev.zelin.local ([2a09:bac0:23::815:bc4]) by smtp.gmail.com with ESMTPSA id c25sm4613388pfn.159.2021.10.15.03.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 03:08:04 -0700 (PDT) X-MC-Unique: yUfc7hIDN8S5Neyj8VLkSw-1 X-MC-Unique: GxsbveneNi6Kmbx8tNm2hw-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=oA9puj7Lj4MmlIdR1LZCQGkfr9o0/8pu3bONbtuKCXQ=; b=kYF56wjfl/8xw/NeiOvJ95wvP7+nMgMLGfQj3esyLCH7cgrdR6WcvQ++s0vmmF4vRC EhkTdw4jqSRDRLTfj7La/lKiT28kXyi/bh6/SSy9h6fE1CsSeOSqVR5p8HPfdEM99IVq AAflrLTMBI8EgBWPV87/J5m/g2FJMLGCHdGxsb+yKqe0H310rz2USK95zb4heQ/UC6NG jaRkbrlqbRkfRWbwuYXDw7YpILKiZDN5imH8QoWeEbofEzBacW8MikMzjAPfh77xRqxG kegBC/du6stnIsLf+OrCGIyZ8eLUnRXXSfxDMtQf0EpcTqd50pvzCqjsqXT4vg1P92Y5 mNsg== X-Gm-Message-State: AOAM532q4Q4DNrfNFKxi23fVJuhObSgLUu8QUwn+9U4qL8eRrjjdQJ/o cSDHmBBYhDhebbQXN/eub8XgYmCBqytZE+txKzCeqg== X-Google-Smtp-Source: ABdhPJyJwTbisVj99Q6wdDn/k09RAHP9fCLnH+3wqaeu8BifjilUxvVLLfhGdRcCrTrlU0EBm5XKPg== X-Received: by 2002:a17:903:22c9:b0:13e:ed56:70e2 with SMTP id y9-20020a17090322c900b0013eed5670e2mr10206889plg.19.1634292484520; Fri, 15 Oct 2021 03:08:04 -0700 (PDT) From: zhanglei To: zhanglei@smartx.com, libvir-list@redhat.com Subject: [libvirt PATCH v4 2/5] virsh: add interface information to guestinfo command Date: Fri, 15 Oct 2021 18:07:48 +0800 Message-Id: <20211015100751.1492806-3-zhanglei@smartx.com> In-Reply-To: <20211015100751.1492806-1-zhanglei@smartx.com> References: <20211015100751.1492806-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.84 on 10.11.54.1 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.84 on 10.5.11.22 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: 1634292513715100002 Content-Type: text/plain; charset="utf-8" The new parameter group returns information about network interfaces Signed-off-by: zhanglei Reviewed-by: J=C3=A1n Tomko --- 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 4c5341d00d..1c60eae607 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 dbddefb4a5..bce03b3de5 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -13999,6 +13999,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 @@ -14024,6 +14028,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 Mon Apr 29 04:39:25 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 1634292512664814.6536603290177; Fri, 15 Oct 2021 03:08:32 -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-10-4FuDcIITOJOfDQaJY-mh4Q-1; Fri, 15 Oct 2021 06:08:27 -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 7ED5710A8E0B; Fri, 15 Oct 2021 10:08:22 +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 5E447ADCB; Fri, 15 Oct 2021 10:08:22 +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 2C5B04EA37; Fri, 15 Oct 2021 10:08:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19FA89dj003638 for ; Fri, 15 Oct 2021 06:08:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id ECA9D40CFD13; Fri, 15 Oct 2021 10:08:08 +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 E6ACA40CFD0D for ; Fri, 15 Oct 2021 10:08:08 +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 D0A5E802814 for ; Fri, 15 Oct 2021 10:08:08 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-mQl6ZqkwNsez5kUmq_ldLg-1; Fri, 15 Oct 2021 06:08:07 -0400 Received: by mail-pg1-f181.google.com with SMTP id r2so8131342pgl.10 for ; Fri, 15 Oct 2021 03:08:06 -0700 (PDT) Received: from zhanglei-dev.zelin.local ([2a09:bac0:23::815:bc4]) by smtp.gmail.com with ESMTPSA id c25sm4613388pfn.159.2021.10.15.03.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 03:08:05 -0700 (PDT) X-MC-Unique: 4FuDcIITOJOfDQaJY-mh4Q-1 X-MC-Unique: mQl6ZqkwNsez5kUmq_ldLg-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=vhCaiTRCib+G/hiST51k6WHN8AK8hjuMz4b+VPOyTvo=; b=o+tvxyb6RkvHEb7TWFHG8IHYmtu2CGLdpbUxEM/tiAOyW8xjr4I2CFcNX+grQToloX tlTdKgRWSQ5z/AEzpqJIsmDFIUlvcFvZPN4gvw3QrDi73/sh0opMKG5ob8C0ZNQPi9ro i/qsn8llLhtcz+QRg6Euj3Rl/5XBcutZo3uIksbNvyZo53fG1cPhnotQKLeXDA8ddOyX Lbm21cCJ+fvRxFTW2YzsAUW2DrM4eGSpij2SVLz3smpeUe9suFEeEYXcsFHbWL0mhli7 2JX+NxjEBWn0l45vmFcxfPhVkC3VedPVaSiEDlVa/cAvHbMhhYr/6uT8AhwmF0ykbnUf jASQ== X-Gm-Message-State: AOAM530bS0O38cJ+c0KxvIS/D54hd07kJNhCVA0KRH2wUZpAH7FrVJsH jTQ4npWkbBiuaxMPYw2KzCdPuvI3emXNBPXZ0O1M/Q== X-Google-Smtp-Source: ABdhPJzZ5zkzPgc26zEeUv2vd4MNdQVHWywE6F0v8bZU15Og6lDWPwjq6CmYJomTSNWD8SMroQ1a3w== X-Received: by 2002:a65:62d1:: with SMTP id m17mr8389575pgv.370.1634292485861; Fri, 15 Oct 2021 03:08:05 -0700 (PDT) From: zhanglei To: zhanglei@smartx.com, libvir-list@redhat.com Subject: [libvirt PATCH v4 3/5] qemu: refactor 'qemuAgentGetInterfaces' Date: Fri, 15 Oct 2021 18:07:49 +0800 Message-Id: <20211015100751.1492806-4-zhanglei@smartx.com> In-Reply-To: <20211015100751.1492806-1-zhanglei@smartx.com> References: <20211015100751.1492806-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.84 on 10.11.54.1 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: 1634292513700100001 Content-Type: text/plain; charset="utf-8" Add report_unsupported parameter to qemuAgentGetInterfaces Signed-off-by: zhanglei Reviewed-by: J=C3=A1n Tomko --- 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 2b759f5719..7e058a9309 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19090,7 +19090,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 Mon Apr 29 04:39:25 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 1634292515013910.3721831292635; Fri, 15 Oct 2021 03:08:35 -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-184-On3NpIGfO8GBAy5YQrv9yQ-1; Fri, 15 Oct 2021 06:08:30 -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 7623519253C4; Fri, 15 Oct 2021 10:08:25 +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 589D87086C; Fri, 15 Oct 2021 10:08:25 +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 EF6344EA3B; Fri, 15 Oct 2021 10:08:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19FA8CAN003654 for ; Fri, 15 Oct 2021 06:08:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9A8F8404727A; Fri, 15 Oct 2021 10:08:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96DB24047272 for ; Fri, 15 Oct 2021 10:08:12 +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 7F52F1875068 for ; Fri, 15 Oct 2021 10:08:12 +0000 (UTC) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-xhigwR3aObys1sfRyomjlQ-1; Fri, 15 Oct 2021 06:08:08 -0400 Received: by mail-pj1-f46.google.com with SMTP id e5-20020a17090a804500b001a116ad95caso1351583pjw.2 for ; Fri, 15 Oct 2021 03:08:08 -0700 (PDT) Received: from zhanglei-dev.zelin.local ([2a09:bac0:23::815:bc4]) by smtp.gmail.com with ESMTPSA id c25sm4613388pfn.159.2021.10.15.03.08.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 03:08:07 -0700 (PDT) X-MC-Unique: On3NpIGfO8GBAy5YQrv9yQ-1 X-MC-Unique: xhigwR3aObys1sfRyomjlQ-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=Mp1N1ltLpZuxzxCi+lzRZzaBSAM3rNaJ0mipaMiWFRw=; b=W/Ett6fSprP6EMvE4Los8rpBOCWIWKnJuXhFrhkIm8wCq7sgVBuGAt8VheGh+30dPD D2uJee7fAK9U9jcoqD8SuFlExqaMSDKci/jsQ2OhX4spTpdi7XeknXArIws62hx5IKQA eynECWbLIKvhB2JhhrTxMk40PNE1ROrhbL6xFmFj94RGCZnX86q2Ai6bSbt40sCNVqMt VGViN8kr4ojKIna4uYVB+hD74aGndi8GIC+ZcNGCVWSm/2UiexjofdZx1kVPpsUPCyNC i2RNfoXBg7giMzlcLxcEro24Z0Hsl+PbRE/+pUeMwACY3FzTagsy9qoBLzqwaG1bd1Pi l/9A== X-Gm-Message-State: AOAM531VYv1LyQhzDjeT+pRDmV1PN17X2Sowk/jdc0ty3NA4kg562uGP LTq6kGh8B2JE3hnyeA1Le4rWGXqWKGPt0ryjJn5sGw== X-Google-Smtp-Source: ABdhPJxXawCK3PS1IBdsJAwHeYN6ENpLR4WKJJARhNSvpFOl6hhz7ndx7z1Q/fe5HcYVsDAG1EHgKA== X-Received: by 2002:a17:903:22d0:b0:13f:507:6414 with SMTP id y16-20020a17090322d000b0013f05076414mr10271493plg.69.1634292487261; Fri, 15 Oct 2021 03:08:07 -0700 (PDT) From: zhanglei To: zhanglei@smartx.com, libvir-list@redhat.com Subject: [libvirt PATCH v4 4/5] qemu: add guest interface information in 'qemuDomainGetGuestInfo' Date: Fri, 15 Oct 2021 18:07:50 +0800 Message-Id: <20211015100751.1492806-5-zhanglei@smartx.com> In-Reply-To: <20211015100751.1492806-1-zhanglei@smartx.com> References: <20211015100751.1492806-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.84 on 10.11.54.2 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: 1634292515676100005 Content-Type: text/plain; charset="utf-8" Support return guest interface information from guest agent Signed-off-by: zhanglei Reviewed-by: J=C3=A1n Tomko --- 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 7e058a9309..0688964195 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20036,7 +20036,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, @@ -20235,6 +20236,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, @@ -20256,6 +20322,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); @@ -20321,6 +20389,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 @@ -20343,6 +20420,10 @@ qemuDomainGetGuestInfo(virDomainPtr dom, qemuDomainObjEndJob(driver, vm); } =20 + if (nifaces > 0) { + virDomainInterfaceFormatParams(ifaces, nifaces, params, nparams, &= maxparams); + } + ret =3D 0; =20 cleanup: @@ -20352,6 +20433,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 Mon Apr 29 04:39:25 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 1634292504686506.82299388348736; Fri, 15 Oct 2021 03:08:24 -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-240-Fqp-PzPGOz2D7XzHg-Y1lg-1; Fri, 15 Oct 2021 06:08:22 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E12119253C0; Fri, 15 Oct 2021 10:08:17 +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 2F75710013D7; Fri, 15 Oct 2021 10:08:17 +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 E58C54EA31; Fri, 15 Oct 2021 10:08:15 +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 19FA8EFx003661 for ; Fri, 15 Oct 2021 06:08:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 721C12026D6A; Fri, 15 Oct 2021 10:08:14 +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 6D6702026D60 for ; Fri, 15 Oct 2021 10:08:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 4E334800883 for ; Fri, 15 Oct 2021 10:08:11 +0000 (UTC) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-c6WhdjjyPc2I7ZKDti-v0g-1; Fri, 15 Oct 2021 06:08:09 -0400 Received: by mail-pj1-f47.google.com with SMTP id ls14-20020a17090b350e00b001a00e2251c8so6885586pjb.4 for ; Fri, 15 Oct 2021 03:08:09 -0700 (PDT) Received: from zhanglei-dev.zelin.local ([2a09:bac0:23::815:bc4]) by smtp.gmail.com with ESMTPSA id c25sm4613388pfn.159.2021.10.15.03.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 03:08:08 -0700 (PDT) X-MC-Unique: Fqp-PzPGOz2D7XzHg-Y1lg-1 X-MC-Unique: c6WhdjjyPc2I7ZKDti-v0g-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=aNVRTbYM8QEKSh53yc8f2z4qe7SjXtB7gRPPMlc7WOY=; b=nGLZ+Dx0g1Q4AyvwW6ToWf5+oVNjs7iFdVHw5q0d/mMTM4sDNa+qCZUSX4Bt+0qVGG vPN8Ub8bKsp1azKVk1Fwz2cAten3nUz0GMRlOEq5O2d1MunYeuY6lcbPK+pzaf6fNZ6b ircb4/xNzaLuUrPCpd9wotQ+rWUrwlXo5NB/ZrmMe7797/xKZoZeBTZJl3ryoRsUwJBf 33H5QtVBwX7K6S2IGd370xTX/iG5fNvT69dCkmWQsRuNEOaR3TbkQe8WT1oC4gbM5CsO SrSYI0YRtYCE74q8PiNwpo574T1/+wb2/g9nk+GhR5pLtXGOSsPkX+hQkyaxRNIXHT6j Ym8w== X-Gm-Message-State: AOAM531r9Z0keytu68AW/hN/70QQyrJaPVaNR2zeAD3gG+l8TNUqhkUv LAcNRVCoTM9uwRDcFyU/p3nIPRrx7Z+hbVUfLpmWow== X-Google-Smtp-Source: ABdhPJz/YxMCY8P3BodYNA+DpgjUQ23euxU1Ur3AFcAQ6Q/8CBDzriJTgiScx9vsnagJMlimT4XFzg== X-Received: by 2002:a17:902:ea09:b0:13f:ac2:c5ae with SMTP id s9-20020a170902ea0900b0013f0ac2c5aemr10136013plg.3.1634292488600; Fri, 15 Oct 2021 03:08:08 -0700 (PDT) From: zhanglei To: zhanglei@smartx.com, libvir-list@redhat.com Subject: [libvirt PATCH v4 5/5] NEWS: add guest interface information in 'virDomainGetGuestInfo' Date: Fri, 15 Oct 2021 18:07:51 +0800 Message-Id: <20211015100751.1492806-6-zhanglei@smartx.com> In-Reply-To: <20211015100751.1492806-1-zhanglei@smartx.com> References: <20211015100751.1492806-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.84 on 10.5.11.22 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: 1634292506495100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: zhanglei Reviewed-by: J=C3=A1n Tomko --- NEWS.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index ae678bffc4..0d343bf33c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -42,6 +42,11 @@ v7.9.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