From nobody Mon Feb 9 16:02:06 2026 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605895983; cv=none; d=zohomail.com; s=zohoarc; b=Om0YTv34t76pStp8+HpticKZ6bX1r3DhI3CuKeGbk1EZdtqYwP1zTwOV5lH1B4GVxDk/gsTBF+aJw0OwNrZQANiLHHXxMKodIAu9ztg+nYA6y7b1dI5c6601lkJqu19gb4X3r9udIIqqwpVbWsDg2ZLENKf7FPkTfAM3TtMFfp8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605895983; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u8Za+2Q3OtDTDxZTY9sceZXshM62D0m+KCOwtrklSgk=; b=GSozkcvkpID6S/IHAU4yKC0mfTin062LGdHSaktWE0yIEGWRBlu+K0oHoPpjMboszEtBI2CGinwdEj/INK6k+ZoHHBOoJSer0Lq1AHiWFvw2gzBRssDi0NJW7Rkky9Uo40NhzEEhCKjZ6Y0Fw2HUWEdUONd3U7NQsuzu1yZVoTo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= 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 1605895983525769.479958426588; Fri, 20 Nov 2020 10:13:03 -0800 (PST) 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-464-wUjnJRX2N2OX4FMnQAxFag-1; Fri, 20 Nov 2020 13:11:12 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 82A061876528; Fri, 20 Nov 2020 18:11:06 +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 5E3A8189A4; Fri, 20 Nov 2020 18:11:06 +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 EBDD21809CA2; Fri, 20 Nov 2020 18:11:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKIB5Ho010646 for ; Fri, 20 Nov 2020 13:11:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1C58560C62; Fri, 20 Nov 2020 18:11:05 +0000 (UTC) Received: from localhost (unknown [10.36.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED48960C5F; Fri, 20 Nov 2020 18:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605895982; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u8Za+2Q3OtDTDxZTY9sceZXshM62D0m+KCOwtrklSgk=; b=PjTBlbgO8HK7myQjcVbNv4WHahPtVW+NlvM+Fh+3ayt8DVclgHQfAYZAZvkIF7/MoToUjH 7SNlym/w5Xs0YjW7IxEcp2uQoLq+M1WBauhMCDzub+aGe69WfPl6Xs+H+yjQ5gOgypfWvs QJJ8Abxj24f9zRCMk6QBNmFHV5sF3lo= X-MC-Unique: wUjnJRX2N2OX4FMnQAxFag-1 From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Subject: [libvirt PATCH 7/9] domain: add disk informations to virDomainGetGuestInfo Date: Fri, 20 Nov 2020 22:09:46 +0400 Message-Id: <20201120180948.203254-8-marcandre.lureau@redhat.com> In-Reply-To: <20201120180948.203254-1-marcandre.lureau@redhat.com> References: <20201120180948.203254-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Michal=20Pr=C3=ADvozn=C3=ADk?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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.11 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index d81157ccaf..60fa8c6719 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -5070,6 +5070,7 @@ typedef enum { VIR_DOMAIN_GUEST_INFO_TIMEZONE =3D (1 << 2), /* return timezone inform= ation */ 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 = */ } virDomainGuestInfoTypes; =20 int virDomainGetGuestInfo(virDomainPtr domain, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 63d4954e68..c837ecbcc3 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -12341,6 +12341,23 @@ virDomainSetVcpu(virDomainPtr domain, * "fs..disk..serial" - the serial number of the disk * "fs..disk..device" - the device node of the disk * + * VIR_DOMAIN_GUEST_INFO_DISKS: + * Returns information about the disks within the domain. The typed + * parameter keys are in this format: + * + * "disks.count" - the number of disks defined on this domain + * as an unsigned int + * "disks..name" - device node (Linux) or device UNC (Windows) + * "disks..partition" - whether this is a partition or disk + * "disks..dependencies.count" - the number of device dependenci= es + * e.g. for LVs of the LVM this will + * hold the list of PVs, for LUKS encrypted volume th= is will + * contain the disk where the volume is placed. (Linu= x) + * "disks..dependencies..name" - a dependency + * "disks..alias" - the device alias of the disk (e.g. sda) + * "disks..guest_alias" - optional alias assigned to the disk, o= n Linux + * this is a name assigned by device mapper + * * VIR_DOMAIN_GUEST_INFO_HOSTNAME: * Returns information about the hostname of the domain. The typed * parameter keys are in this format: --=20 2.29.0