Re: [dbus PATCH 08/15] Implement StorageVolLookupByKey method for Connect Interface

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

 



On Tue, Jun 12, 2018 at 11:00:21AM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
data/org.libvirt.Connect.xml |  6 ++++++
src/connect.c                | 30 ++++++++++++++++++++++++++++++
tests/test_connect.py        | 14 ++++++++++++++
3 files changed, 50 insertions(+)

diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index f41acd2..d3871b3 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -308,6 +308,12 @@
      <arg name="uuid" type="s" direction="in"/>
      <arg name="storagePool" type="o" direction="out"/>
    </method>
+    <method name="StorageVolLookupByKey">
+      <annotation name="org.gtk.GDBus.DocString"
+        value="See https://libvirt.org/html/libvirt-libvirt-storage.html#virStorageVolLookupByKey"/>
+      <arg name="key" type="s" direction="in"/>
+      <arg name="storageVol" type="o" direction="out"/>
+    </method>
    <signal name="DomainEvent">
      <annotation name="org.gtk.GDBus.DocString"
        value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventCallback"/>
diff --git a/src/connect.c b/src/connect.c
index 1090e3e..c526808 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -1544,6 +1544,35 @@ virtDBusConnectStoragePoolLookupByUUID(GVariant *inArgs,
    *outArgs = g_variant_new("(o)", path);
}

+static void
+virtDBusConnectStorageVolLookupByKey(GVariant *inArgs,
+                                     GUnixFDList *inFDs G_GNUC_UNUSED,
+                                     const gchar *objectPath G_GNUC_UNUSED,
+                                     gpointer userData,
+                                     GVariant **outArgs,
+                                     GUnixFDList **outFDs G_GNUC_UNUSED,
+                                     GError **error)
+{
+    virtDBusConnect *connect = userData;
+    g_autoptr(virStorageVol) storageVol = NULL;
+    g_autofree gchar *path = NULL;
+    const gchar *key;
+
+    g_variant_get(inArgs, "(s)", &key);

&s

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