Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
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 8208374..187f604 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -37,7 +37,9 @@
<method name="Create">
<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 b5f80f8..fd6609c 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -435,12 +435,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 0291159..8cd0d6a 100755
--- a/test/test_domain.py
+++ b/test/test_domain.py
@@ -35,7 +35,7 @@ class TestDomain(libvirttest.BaseTestClass):
domain.Shutdown(0)
domain.Create(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.Shutdown(0)
- domain.Undefine()
+ domain.Undefine(0)
self.main_loop()
--
2.15.0