[dbus PATCH 07/10] virtDBusDomainUndefine: Use virDomainUndefineFlags instead of virDomainUndefine

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

 



Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
 data/org.libvirt.Domain.xml | 4 +++-
 src/domain.c                | 5 ++++-
 test/test_domain.py         | 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index 3afee78..05d0c9c 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -37,7 +37,9 @@
     <method name="CreateWithFlags">
       <arg name="flags" type="u" direction="in"/>
     </method>
-    <method name="Undefine"/>
+    <method name="Undefine">
+      <arg name="flags" type="u" direction="in"/>
+    </method>
     <signal name="DeviceAdded">
       <arg name="device" type="s"/>
     </signal>
diff --git a/src/domain.c b/src/domain.c
index 6b1779a..635af6a 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -434,12 +434,15 @@ virtDBusDomainUndefine(GVariant *inArgs G_GNUC_UNUSED,
 {
     virtDBusConnect *connect = userData;
     g_autoptr(virDomain) domain = NULL;
+    guint flags;
+
+    g_variant_get(inArgs, "(u)", &flags);
 
     domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
     if (!domain)
         return;
 
-    if (virDomainUndefine(domain) < 0)
+    if (virDomainUndefineFlags(domain, flags) < 0)
         virtDBusUtilSetLastVirtError(error);
 }
 
diff --git a/test/test_domain.py b/test/test_domain.py
index bf0f149..cad1da5 100755
--- a/test/test_domain.py
+++ b/test/test_domain.py
@@ -35,7 +35,7 @@ class TestDomain(libvirttest.BaseTestClass):
         domain.ShutdownFlags(0)
         domain.CreateWithFlags(0)
         domain.Destroy()
-        domain.Undefine()
+        domain.Undefine(0)
 
     def test_shutdown(self):
         def domain_stopped(name, path):
@@ -63,7 +63,7 @@ class TestDomain(libvirttest.BaseTestClass):
 
         _, domain = self.domain()
         domain.ShutdownFlags(0)
-        domain.Undefine()
+        domain.Undefine(0)
 
         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