From nobody Mon Feb 9 08:34:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509353551954922.5540404466939; Mon, 30 Oct 2017 01:52:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 324295D3; Mon, 30 Oct 2017 08:52:30 +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 12F6490F5D; Mon, 30 Oct 2017 08:52:30 +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 CE4146EF24; Mon, 30 Oct 2017 08:52:29 +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 v9U8qLAb001047 for ; Mon, 30 Oct 2017 04:52:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7C6008B6DD; Mon, 30 Oct 2017 08:52:21 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 758718B6DC for ; Mon, 30 Oct 2017 08:52:18 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1C18A356D4 for ; Mon, 30 Oct 2017 08:52:17 +0000 (UTC) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9U8ns7P133345 for ; Mon, 30 Oct 2017 04:52:16 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2dx03ujn61-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 30 Oct 2017 04:52:15 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Oct 2017 08:52:14 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 30 Oct 2017 08:52:13 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9U8qDG730933234; Mon, 30 Oct 2017 08:52:13 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 87A3252041; Mon, 30 Oct 2017 07:46:16 +0000 (GMT) Received: from powerkvmpok002.pok.stglabs.ibm.com (unknown [9.114.13.10]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 234015203F; Mon, 30 Oct 2017 07:46:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 324295D3 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 324295D3 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1C18A356D4 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=kmp@linux.vnet.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1C18A356D4 From: Kothapally Madhu Pavan To: libvir-list@redhat.com Date: Mon, 30 Oct 2017 14:21:53 +0530 In-Reply-To: <1509353516-52208-1-git-send-email-kmp@linux.vnet.ibm.com> References: <1509353516-52208-1-git-send-email-kmp@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17103008-0040-0000-0000-000003E855DE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17103008-0041-0000-0000-000025EAD2B3 Message-Id: <1509353516-52208-5-git-send-email-kmp@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-30_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710300126 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 205 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 30 Oct 2017 08:52:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 30 Oct 2017 08:52:17 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'kmp@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -3.5 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Kothapally Madhu Pavan , jdenemar@redhat.com Subject: [libvirt] [PATCH 4/7] virsh: Dump inactive XML configuration of snapshot using snapshot-dumpxml 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 30 Oct 2017 08:52:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Now, snapshot-dumpxml will display inactive XML configuration of snapshot along with active XML configuration. When --active-only flag is used the inactive XML configuration will not be displayed. Signed-off-by: Kothapally Madhu Pavan --- tools/virsh-snapshot.c | 7 +++++++ tools/virsh.pod | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 24cd4ab..4b0a18d 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -1667,6 +1667,10 @@ static const vshCmdOptDef opts_snapshot_dumpxml[] = =3D { .type =3D VSH_OT_BOOL, .help =3D N_("include security sensitive information in XML dump") }, + {.name =3D "active-only", + .type =3D VSH_OT_BOOL, + .help =3D N_("dump only active XML configuration and avoid inactive X= ML") + }, {.name =3D NULL} }; =20 @@ -1683,6 +1687,9 @@ cmdSnapshotDumpXML(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptBool(cmd, "security-info")) flags |=3D VIR_DOMAIN_XML_SECURE; =20 + if (vshCommandOptBool(cmd, "active-only")) + flags |=3D VIR_DOMAIN_XML_ACTIVE_ONLY; + if (vshCommandOptStringReq(ctl, cmd, "snapshotname", &name) < 0) return false; =20 diff --git a/tools/virsh.pod b/tools/virsh.pod index 69cc423..f899da7 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -4489,11 +4489,31 @@ is specified, the list will be filtered to snapshot= s that use external files for disk images or memory state. =20 =3Ditem B I I [I<--security-info>] +[I<--active-only>] =20 Output the snapshot XML for the domain's snapshot named I. Using I<--security-info> will also include security sensitive information. Use B to easily access the XML of the current snapshot. =20 +If I<--active-only> is specified, only active XML configuration of the +snapshot is displayed. Otherwise, both active and inactive XML +configuration of the snapshot will be displayed. + +When both active and inactive XML snapshot configurations are displayed, +as inactive XML configuration will have same structure as active XML +it is embedded within tag as shown below: + + + .... + .... + + + .... + .... + + + + =3Ditem B I {I | I<--current>} =20 Output the name of the parent snapshot, if any, for the given --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list