From nobody Mon Feb 9 14:14:54 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1552358511243808.9176340097977; Mon, 11 Mar 2019 19:41:51 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 57A1137E85; Tue, 12 Mar 2019 02:41:49 +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 29CF2579A3; Tue, 12 Mar 2019 02:41:49 +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 E3710181A138; Tue, 12 Mar 2019 02:41:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2C2ci7B014257 for ; Mon, 11 Mar 2019 22:38:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB013648AD; Tue, 12 Mar 2019 02:38:44 +0000 (UTC) Received: from blue.redhat.com (ovpn-118-35.phx2.redhat.com [10.3.118.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A6DA648AB; Tue, 12 Mar 2019 02:38:44 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Mon, 11 Mar 2019 21:38:35 -0500 Message-Id: <20190312023839.11069-5-eblake@redhat.com> In-Reply-To: <20190312023839.11069-1-eblake@redhat.com> References: <20190312023839.11069-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: nsoffer@redhat.com, jtomko@redhat.com Subject: [libvirt] [PATCH v4 4/8] remote: Wire up snapshot bulk dumpxml/import 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 12 Mar 2019 02:41:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Typical copy-and-paste addition. Fortunately, the generator handles this one without needing manual overrides. Signed-off-by: Eric Blake Reviewed-by: J=C3=A1n Tomko --- src/remote/remote_driver.c | 6 ++++-- src/remote/remote_protocol.x | 38 ++++++++++++++++++++++++++++++++++-- src/remote_protocol-structs | 17 ++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index eabe7a3823..51b2a6a448 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2,7 +2,7 @@ * remote_driver.c: driver to provide access to libvirtd running * on a remote machine * - * Copyright (C) 2007-2015 Red Hat, Inc. + * Copyright (C) 2007-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -8516,7 +8516,9 @@ static virHypervisorDriver hypervisor_driver =3D { .connectCompareHypervisorCPU =3D remoteConnectCompareHypervisorCPU, /*= 4.4.0 */ .connectBaselineHypervisorCPU =3D remoteConnectBaselineHypervisorCPU, = /* 4.4.0 */ .nodeGetSEVInfo =3D remoteNodeGetSEVInfo, /* 4.5.0 */ - .domainGetLaunchSecurityInfo =3D remoteDomainGetLaunchSecurityInfo /* = 4.5.0 */ + .domainGetLaunchSecurityInfo =3D remoteDomainGetLaunchSecurityInfo, /*= 4.5.0 */ + .domainGetSnapshotsXMLDesc =3D remoteDomainGetSnapshotsXMLDesc, /* 5.2= .0 */ + .domainImportSnapshotsXML =3D remoteDomainImportSnapshotsXML, /* 5.2.0= */ }; static virNetworkDriver network_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 74be4b37d0..c585ec10ef 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -3,7 +3,7 @@ * remote_internal driver and libvirtd. This protocol is * internal and may change at any time. * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2019 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -3573,6 +3573,26 @@ struct remote_connect_get_storage_pool_capabilities_= ret { remote_nonnull_string capabilities; }; +struct remote_domain_get_snapshots_xml_desc_args { + remote_nonnull_domain domain; + unsigned int flags; +}; + +struct remote_domain_get_snapshots_xml_desc_ret { + remote_nonnull_string xml; +}; + +struct remote_domain_import_snapshots_xml_args { + remote_nonnull_domain dom; + remote_nonnull_string xml; + unsigned int flags; +}; + +struct remote_domain_import_snapshots_xml_ret { + int result; +}; + + /*----- Protocol. -----*/ /* Define the program number, protocol version and procedure numbers here.= */ @@ -6342,5 +6362,19 @@ enum remote_procedure { * @generate: both * @acl: connect:read */ - REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403 + REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403, + + /** + * @generate: both + * @priority: high + * @acl: domain:read + * @acl: domain:read_secure:VIR_DOMAIN_GET_SNAPSHOTS_XML_SECURE + */ + REMOTE_PROC_DOMAIN_GET_SNAPSHOTS_XML_DESC =3D 404, + + /** + * @generate: both + * @acl: domain:snapshot + */ + REMOTE_PROC_DOMAIN_IMPORT_SNAPSHOTS_XML =3D 405 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 768189c573..b783d43a42 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2981,6 +2981,21 @@ struct remote_connect_get_storage_pool_capabilities_= args { struct remote_connect_get_storage_pool_capabilities_ret { remote_nonnull_string capabilities; }; +struct remote_domain_get_snapshots_xml_desc_args { + remote_nonnull_domain domain; + u_int flags; +}; +struct remote_domain_get_snapshots_xml_desc_ret { + remote_nonnull_string xml; +}; +struct remote_domain_import_snapshots_xml_args { + remote_nonnull_domain dom; + remote_nonnull_string xml; + u_int flags; +}; +struct remote_domain_import_snapshots_xml_ret { + int result; +}; enum remote_procedure { REMOTE_PROC_CONNECT_OPEN =3D 1, REMOTE_PROC_CONNECT_CLOSE =3D 2, @@ -3385,4 +3400,6 @@ enum remote_procedure { REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS =3D 401, REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS =3D 402, REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES =3D 403, + REMOTE_PROC_DOMAIN_GET_SNAPSHOTS_XML_DESC =3D 404, + REMOTE_PROC_DOMAIN_IMPORT_SNAPSHOTS_XML =3D 405, }; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list