Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Domain.xml | 4 +++-
src/domain.c | 5 ++++-
test/test_domain.py | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index 94a0e40..0f6743d 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -34,7 +34,9 @@
<method name="Reset">
<arg name="flags" type="u" direction="in"/>
</method>
- <method name="Create"/>
+ <method name="Create">
+ <arg name="flags" type="u" direction="in"/>
+ </method>
<method name="Undefine"/>
<signal name="DeviceAdded">
<arg name="device" type="s"/>
diff --git a/src/domain.c b/src/domain.c
index d6da98d..fee7f47 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -411,12 +411,15 @@ virtDBusDomainCreate(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 (virDomainCreate(domain) < 0)
+ if (virDomainCreateWithFlags(domain, flags) < 0)
virtDBusUtilSetLastVirtError(error);
}
diff --git a/test/test_domain.py b/test/test_domain.py
index c0ffc3f..ae722fd 100755
--- a/test/test_domain.py
+++ b/test/test_domain.py
@@ -33,7 +33,7 @@ class TestDomain(libvirttest.BaseTestClass):
domain.Reboot(0)
domain.ShutdownFlags(0)
- domain.Create()
+ domain.Create(0)
domain.Destroy()
domain.Undefine()
--
2.15.0