[dbus PATCH 3/9] Add Domain prefix to DefineXML method, tests and related functions.

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

 



This method is domain specific and should be clear from the naming,
so that we can later define *DefineXML methods for other entities.

Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
 data/org.libvirt.Connect.xml |  2 +-
 src/connect.c                | 16 ++++++++--------
 test/test_connect.py         |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index c29076d..715aeef 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -20,7 +20,7 @@
       <arg name="flags" type="u" direction="in"/>
       <arg name="domain" type="o" direction="out"/>
     </method>
-    <method name="DefineXML">
+    <method name="DomainDefineXML">
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDefineXML"/>
       <arg name="xml" type="s" direction="in"/>
diff --git a/src/connect.c b/src/connect.c
index 3715d25..9931c8f 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -179,13 +179,13 @@ virtDBusConnectDomainCreateXML(GVariant *inArgs,
 }
 
 static void
-virtDBusConnectDefineXML(GVariant *inArgs,
-                         GUnixFDList *inFDs G_GNUC_UNUSED,
-                         const gchar *objectPath G_GNUC_UNUSED,
-                         gpointer userData,
-                         GVariant **outArgs,
-                         GUnixFDList **outFDs G_GNUC_UNUSED,
-                         GError **error)
+virtDBusConnectDomainDefineXML(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(virDomain) domain = NULL;
@@ -394,7 +394,7 @@ static virtDBusGDBusPropertyTable virtDBusConnectPropertyTable[] = {
 static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = {
     { "ListDomains", virtDBusConnectListDomains },
     { "DomainCreateXML", virtDBusConnectDomainCreateXML },
-    { "DefineXML", virtDBusConnectDefineXML },
+    { "DomainDefineXML", virtDBusConnectDomainDefineXML },
     { "DomainLookupByID", virtDBusDomainLookupByID },
     { "DomainLookupByName", virtDBusDomainLookupByName },
     { "DomainLookupByUUID", virtDBusDomainLookupByUUID },
diff --git a/test/test_connect.py b/test/test_connect.py
index 2b2031d..394f812 100755
--- a/test/test_connect.py
+++ b/test/test_connect.py
@@ -40,14 +40,14 @@ class TestConnect(libvirttest.BaseTestClass):
 
         self.main_loop()
 
-    def test_define(self):
+    def test_comnect_domain_define_xml(self):
         def domain_defined(path, _event):
             assert isinstance(path, dbus.ObjectPath)
             self.loop.quit()
 
         self.connect.connect_to_signal('DomainEvent', domain_defined, arg1='Defined')
 
-        path = self.connect.DefineXML(self.minimal_domain_xml)
+        path = self.connect.DomainDefineXML(self.minimal_domain_xml)
         assert isinstance(path, dbus.ObjectPath)
 
         self.main_loop()
-- 
2.15.0

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