Re: [dbus PATCH 15/15] Implement StorageVolCreateXMLFrom method for StoragePool Interface

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

 



On Tue, Jun 12, 2018 at 11:00:28AM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
data/org.libvirt.StoragePool.xml |  9 +++++++++
src/storagepool.c                | 41 ++++++++++++++++++++++++++++++++++++++++
tests/test_storage.py            | 21 ++++++++++++++++++++
3 files changed, 71 insertions(+)

diff --git a/data/org.libvirt.StoragePool.xml b/data/org.libvirt.StoragePool.xml
index 161ade5..0a324e6 100644
--- a/data/org.libvirt.StoragePool.xml
+++ b/data/org.libvirt.StoragePool.xml
@@ -75,6 +75,15 @@
      <arg name="flags" type="u" direction="in"/>
      <arg name="storageVol" type="o" direction="out"/>
    </method>
+    <method name="StorageVolCreateXMLFrom">
+      <annotation name="org.gtk.GDBus.DocString"
+        value="See https://libvirt.org/html/libvirt-libvirt-storage.html#virStorageVolCreateXMLFrom
+               Call with @key argument set to the key of the storage volume to be cloned."/>
+      <arg name="xml" type="s" direction="in"/>
+      <arg name="key" type="s" direction="in"/>
+      <arg name="flags" type="u" direction="in"/>
+      <arg name="storageVol" type="o" direction="out"/>
+    </method>
    <method name="StorageVolLookupByName">
      <annotation name="org.gtk.GDBus.DocString"
        value="See https://libvirt.org/html/libvirt-libvirt-storage.html#virStorageVolLookupByName"/>
diff --git a/src/storagepool.c b/src/storagepool.c
index 55077ed..854ca7d 100644
--- a/src/storagepool.c
+++ b/src/storagepool.c
@@ -401,6 +401,46 @@ virtDBusStoragePoolStorageVolCreateXML(GVariant *inArgs,
    *outArgs = g_variant_new("(o)", path);
}

+static void
+virtDBusStoragePoolStorageVolCreateXMLFrom(GVariant *inArgs,
+                                           GUnixFDList *inFDs G_GNUC_UNUSED,
+                                           const gchar *objectPath,
+                                           gpointer userData,
+                                           GVariant **outArgs,
+                                           GUnixFDList **outFDs G_GNUC_UNUSED,
+                                           GError **error)
+{
+    virtDBusConnect *connect = userData;
+    g_autoptr(virStoragePool) storagePool = NULL;
+    g_autoptr(virStorageVol) storageVol = NULL;
+    g_autoptr(virStorageVol) storageVolOld = NULL;
+    gchar *key;

const

+    gchar *xml;

const

+    guint flags;
+    g_autofree gchar *path = NULL;
+

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: Digital signature

--
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