[PATCH v4 4/8] remote: Wire up snapshot bulk dumpxml/import

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Typical copy-and-paste addition. Fortunately, the generator handles
this one without needing manual overrides.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 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 = {
     .connectCompareHypervisorCPU = remoteConnectCompareHypervisorCPU, /* 4.4.0 */
     .connectBaselineHypervisorCPU = remoteConnectBaselineHypervisorCPU, /* 4.4.0 */
     .nodeGetSEVInfo = remoteNodeGetSEVInfo, /* 4.5.0 */
-    .domainGetLaunchSecurityInfo = remoteDomainGetLaunchSecurityInfo /* 4.5.0 */
+    .domainGetLaunchSecurityInfo = remoteDomainGetLaunchSecurityInfo, /* 4.5.0 */
+    .domainGetSnapshotsXMLDesc = remoteDomainGetSnapshotsXMLDesc, /* 5.2.0 */
+    .domainImportSnapshotsXML = remoteDomainImportSnapshotsXML, /* 5.2.0 */
 };

 static virNetworkDriver network_driver = {
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 = 403
+    REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES = 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 = 404,
+
+    /**
+     * @generate: both
+     * @acl: domain:snapshot
+     */
+    REMOTE_PROC_DOMAIN_IMPORT_SNAPSHOTS_XML = 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 = 1,
         REMOTE_PROC_CONNECT_CLOSE = 2,
@@ -3385,4 +3400,6 @@ enum remote_procedure {
         REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS = 401,
         REMOTE_PROC_DOMAIN_SET_IOTHREAD_PARAMS = 402,
         REMOTE_PROC_CONNECT_GET_STORAGE_POOL_CAPABILITIES = 403,
+        REMOTE_PROC_DOMAIN_GET_SNAPSHOTS_XML_DESC = 404,
+        REMOTE_PROC_DOMAIN_IMPORT_SNAPSHOTS_XML = 405,
 };
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux