[libvirt] [dbus PATCH v2 0/8] Properties/Methods for Connect Interface

Plus some minor fixes. Changes from v1: * Cabalitities property rewritten as method as dnb suggested. * Added documentation on Secure and Encrypted properties as discussed. Katerina Koukiou (8): Implement GetCapabilities method for connect Interface Implement Hostname property for Connect Interface Implement LibVersion property for Connect Interface Implement Encrypted property for Connect Interface Implement Secure property for Connect Interface Implement GetSysinfo method for connect Interface All functions in src/connect.c should have virtDBusConnect prefix Removing G_GNUC_UNUSED in cases where the parameter is used data/org.libvirt.Connect.xml | 29 ++++++ src/connect.c | 209 ++++++++++++++++++++++++++++++++++--------- src/domain.c | 10 +-- test/test_connect.py | 11 +++ 4 files changed, 214 insertions(+), 45 deletions(-) -- 2.15.0

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 23 +++++++++++++++++++++++ test/test_connect.py | 3 +++ 3 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index e36b7f6..91faa73 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -44,6 +44,11 @@ <arg name="uuid" type="s" direction="in"/> <arg name="domain" type="o" direction="out"/> </method> + <method name="GetCapabilities"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCapabilities"/> + <arg name="capabilities" type="s" direction="out"/> + </method> <method name="ListNetworks"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks"/> diff --git a/src/connect.c b/src/connect.c index ce9055a..6c2f910 100644 --- a/src/connect.c +++ b/src/connect.c @@ -109,6 +109,28 @@ virtDBusConnectGetVersion(const gchar *objectPath G_GNUC_UNUSED, *value = g_variant_new("t", hvVer); } +static void +virtDBusConnectGetCapabilities(GVariant *inArgs G_GNUC_UNUSED, + 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_autofree gchar *capabilities = NULL; + + if (!virtDBusConnectOpen(connect, error)) + return; + + capabilities = virConnectGetCapabilities(connect->connection); + if (!capabilities) + return virtDBusUtilSetLastVirtError(error); + + *outArgs = g_variant_new("(s)", capabilities); +} + static void virtDBusConnectListDomains(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -454,6 +476,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = { { "DomainLookupByID", virtDBusDomainLookupByID }, { "DomainLookupByName", virtDBusDomainLookupByName }, { "DomainLookupByUUID", virtDBusDomainLookupByUUID }, + { "GetCapabilities", virtDBusConnectGetCapabilities }, { "ListNetworks", virtDBusConnectListNetworks }, { "NetworkCreateXML", virtDBusConnectNetworkCreateXML }, { "NetworkDefineXML", virtDBusConnectNetworkDefineXML }, diff --git a/test/test_connect.py b/test/test_connect.py index c411eeb..0571cae 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -100,6 +100,9 @@ class TestConnect(libvirttest.BaseTestClass): # ensure the path exists by calling Introspect on it network.Introspect(dbus_interface=dbus.INTROSPECTABLE_IFACE) + def test_connect_get_capabilities(self): + assert isinstance(self.connect.GetCapabilities(), dbus.String) + def test_connect_network_create_xml(self): def network_started(path, _event): assert isinstance(path, dbus.ObjectPath) -- 2.15.0

On Mon, Apr 09, 2018 at 04:00:51PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 23 +++++++++++++++++++++++ test/test_connect.py | 3 +++ 3 files changed, 31 insertions(+)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 4 ++++ src/connect.c | 20 ++++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 25 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 91faa73..d754235 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -3,6 +3,10 @@ <node name="/org/libvirt/connect"> <interface name="org.libvirt.Connect"> + <property name="Hostname" type="s" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetHostname"/> + </property> <property name="Version" type="t" access="read"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetVersion"/> diff --git a/src/connect.c b/src/connect.c index 6c2f910..27de019 100644 --- a/src/connect.c +++ b/src/connect.c @@ -91,6 +91,25 @@ virtDBusConnectOpen(virtDBusConnect *connect, return TRUE; } +static void +virtDBusConnectGetHostname(const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **value, + GError **error) +{ + virtDBusConnect *connect = userData; + g_autofree gchar * hostname = NULL; + + if (!virtDBusConnectOpen(connect, error)) + return; + + hostname = virConnectGetHostname(connect->connection); + if (!hostname) + return virtDBusUtilSetLastVirtError(error); + + *value = g_variant_new("s", hostname); +} + static void virtDBusConnectGetVersion(const gchar *objectPath G_GNUC_UNUSED, gpointer userData, @@ -465,6 +484,7 @@ virtDBusNetworkLookupByUUID(GVariant *inArgs, } static virtDBusGDBusPropertyTable virtDBusConnectPropertyTable[] = { + { "Hostname", virtDBusConnectGetHostname, NULL }, { "Version", virtDBusConnectGetVersion, NULL }, { 0 } }; diff --git a/test/test_connect.py b/test/test_connect.py index 0571cae..05d7bd8 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -81,6 +81,7 @@ class TestConnect(libvirttest.BaseTestClass): assert original_path == path @pytest.mark.parametrize("property_name,expected_type", [ + ("Hostname", dbus.String), ("Version", dbus.UInt64), ]) def test_connect_properties_return_type(self, property_name, expected_type): -- 2.15.0

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 4 ++++ src/connect.c | 19 +++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 24 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index d754235..0e5c7e2 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -7,6 +7,10 @@ <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetHostname"/> </property> + <property name="LibVersion" type="t" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetLibVersion"/> + </property> <property name="Version" type="t" access="read"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetVersion"/> diff --git a/src/connect.c b/src/connect.c index 27de019..78ed971 100644 --- a/src/connect.c +++ b/src/connect.c @@ -110,6 +110,24 @@ virtDBusConnectGetHostname(const gchar *objectPath G_GNUC_UNUSED, *value = g_variant_new("s", hostname); } +static void +virtDBusConnectGetLibVersion(const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **value, + GError **error) +{ + virtDBusConnect *connect = userData; + gulong libVer; + + if (!virtDBusConnectOpen(connect, error)) + return; + + if (virConnectGetLibVersion(connect->connection, &libVer) < 0) + return virtDBusUtilSetLastVirtError(error); + + *value = g_variant_new("t", libVer); +} + static void virtDBusConnectGetVersion(const gchar *objectPath G_GNUC_UNUSED, gpointer userData, @@ -485,6 +503,7 @@ virtDBusNetworkLookupByUUID(GVariant *inArgs, static virtDBusGDBusPropertyTable virtDBusConnectPropertyTable[] = { { "Hostname", virtDBusConnectGetHostname, NULL }, + { "LibVersion", virtDBusConnectGetLibVersion, NULL }, { "Version", virtDBusConnectGetVersion, NULL }, { 0 } }; diff --git a/test/test_connect.py b/test/test_connect.py index 05d7bd8..d24cba5 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -82,6 +82,7 @@ class TestConnect(libvirttest.BaseTestClass): @pytest.mark.parametrize("property_name,expected_type", [ ("Hostname", dbus.String), + ("LibVersion", dbus.UInt64), ("Version", dbus.UInt64), ]) def test_connect_properties_return_type(self, property_name, expected_type): -- 2.15.0

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 20 ++++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 26 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 0e5c7e2..84eadb0 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -3,6 +3,11 @@ <node name="/org/libvirt/connect"> <interface name="org.libvirt.Connect"> + <property name="Encrypted" type="b" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsEncrypted + Note that monitoring of traffic on the dbus message bus is out of the scope of this property"/> + </property> <property name="Hostname" type="s" access="read"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetHostname"/> diff --git a/src/connect.c b/src/connect.c index 78ed971..8335e51 100644 --- a/src/connect.c +++ b/src/connect.c @@ -91,6 +91,25 @@ virtDBusConnectOpen(virtDBusConnect *connect, return TRUE; } +static void +virtDBusConnectGetEncrypted(const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **value, + GError **error) +{ + virtDBusConnect *connect = userData; + gint encrypted; + + if (!virtDBusConnectOpen(connect, error)) + return; + + encrypted = virConnectIsEncrypted(connect->connection); + if (encrypted < 0) + return virtDBusUtilSetLastVirtError(error); + + *value = g_variant_new("b", !!encrypted); +} + static void virtDBusConnectGetHostname(const gchar *objectPath G_GNUC_UNUSED, gpointer userData, @@ -502,6 +521,7 @@ virtDBusNetworkLookupByUUID(GVariant *inArgs, } static virtDBusGDBusPropertyTable virtDBusConnectPropertyTable[] = { + { "Encrypted", virtDBusConnectGetEncrypted, NULL }, { "Hostname", virtDBusConnectGetHostname, NULL }, { "LibVersion", virtDBusConnectGetLibVersion, NULL }, { "Version", virtDBusConnectGetVersion, NULL }, diff --git a/test/test_connect.py b/test/test_connect.py index d24cba5..58bc267 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -81,6 +81,7 @@ class TestConnect(libvirttest.BaseTestClass): assert original_path == path @pytest.mark.parametrize("property_name,expected_type", [ + ("Encrypted", dbus.Boolean), ("Hostname", dbus.String), ("LibVersion", dbus.UInt64), ("Version", dbus.UInt64), -- 2.15.0

On Mon, Apr 09, 2018 at 04:00:54PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 20 ++++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 26 insertions(+)
diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 0e5c7e2..84eadb0 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -3,6 +3,11 @@
<node name="/org/libvirt/connect"> <interface name="org.libvirt.Connect"> + <property name="Encrypted" type="b" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsEncrypted + Note that monitoring of traffic on the dbus message bus is out of the scope of this property"/>
s/dbus/D-Bus/ Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 20 ++++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 26 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 84eadb0..10bd6d2 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -16,6 +16,11 @@ <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetLibVersion"/> </property> + <property name="Secure" type="b" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsSecure + Note that monitoring of traffic on the dbus message bus is out of the scope of this property"/> + </property> <property name="Version" type="t" access="read"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetVersion"/> diff --git a/src/connect.c b/src/connect.c index 8335e51..dab6f34 100644 --- a/src/connect.c +++ b/src/connect.c @@ -147,6 +147,25 @@ virtDBusConnectGetLibVersion(const gchar *objectPath G_GNUC_UNUSED, *value = g_variant_new("t", libVer); } +static void +virtDBusConnectGetSecure(const gchar *objectPath G_GNUC_UNUSED, + gpointer userData, + GVariant **value, + GError **error) +{ + virtDBusConnect *connect = userData; + gint secure; + + if (!virtDBusConnectOpen(connect, error)) + return; + + secure = virConnectIsEncrypted(connect->connection); + if (secure < 0) + return virtDBusUtilSetLastVirtError(error); + + *value = g_variant_new("b", !!secure); +} + static void virtDBusConnectGetVersion(const gchar *objectPath G_GNUC_UNUSED, gpointer userData, @@ -524,6 +543,7 @@ static virtDBusGDBusPropertyTable virtDBusConnectPropertyTable[] = { { "Encrypted", virtDBusConnectGetEncrypted, NULL }, { "Hostname", virtDBusConnectGetHostname, NULL }, { "LibVersion", virtDBusConnectGetLibVersion, NULL }, + { "Secure", virtDBusConnectGetSecure, NULL }, { "Version", virtDBusConnectGetVersion, NULL }, { 0 } }; diff --git a/test/test_connect.py b/test/test_connect.py index 58bc267..6baa6df 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -84,6 +84,7 @@ class TestConnect(libvirttest.BaseTestClass): ("Encrypted", dbus.Boolean), ("Hostname", dbus.String), ("LibVersion", dbus.UInt64), + ("Secure", dbus.Boolean), ("Version", dbus.UInt64), ]) def test_connect_properties_return_type(self, property_name, expected_type): -- 2.15.0

On Mon, Apr 09, 2018 at 04:00:55PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 5 +++++ src/connect.c | 20 ++++++++++++++++++++ test/test_connect.py | 1 + 3 files changed, 26 insertions(+)
diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 84eadb0..10bd6d2 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -16,6 +16,11 @@ <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetLibVersion"/> </property> + <property name="Secure" type="b" access="read"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsSecure + Note that monitoring of traffic on the dbus message bus is out of the scope of this property"/>
s/dbus/D-Bus/ Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- data/org.libvirt.Connect.xml | 6 ++++++ src/connect.c | 27 +++++++++++++++++++++++++++ test/test_connect.py | 4 ++++ 3 files changed, 37 insertions(+) diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml index 10bd6d2..efbec8e 100644 --- a/data/org.libvirt.Connect.xml +++ b/data/org.libvirt.Connect.xml @@ -67,6 +67,12 @@ value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCapabilities"/> <arg name="capabilities" type="s" direction="out"/> </method> + <method name="GetSysinfo"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetSysinfo"/> + <arg name="flags" type="u" direction="in"/> + <arg name="sysinfo" type="s" direction="out"/> + </method> <method name="ListNetworks"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks"/> diff --git a/src/connect.c b/src/connect.c index dab6f34..eb4c74d 100644 --- a/src/connect.c +++ b/src/connect.c @@ -387,6 +387,32 @@ virtDBusDomainLookupByUUID(GVariant *inArgs, *outArgs = g_variant_new("(o)", path); } +static void +virtDBusConnectGetSysinfo(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; + guint flags; + g_autofree gchar *sysinfo = NULL; + + g_variant_get(inArgs, "(u)", &flags); + + if (!virtDBusConnectOpen(connect, error)) + return; + + sysinfo = virConnectGetSysinfo(connect->connection, flags); + if (!sysinfo) + return virtDBusUtilSetLastVirtError(error); + + *outArgs = g_variant_new("(s)", sysinfo); +} + static void virtDBusConnectListNetworks(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -556,6 +582,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = { { "DomainLookupByName", virtDBusDomainLookupByName }, { "DomainLookupByUUID", virtDBusDomainLookupByUUID }, { "GetCapabilities", virtDBusConnectGetCapabilities }, + { "GetSysinfo", virtDBusConnectGetSysinfo }, { "ListNetworks", virtDBusConnectListNetworks }, { "NetworkCreateXML", virtDBusConnectNetworkCreateXML }, { "NetworkDefineXML", virtDBusConnectNetworkDefineXML }, diff --git a/test/test_connect.py b/test/test_connect.py index 6baa6df..8948947 100755 --- a/test/test_connect.py +++ b/test/test_connect.py @@ -92,6 +92,10 @@ class TestConnect(libvirttest.BaseTestClass): props = obj.GetAll('org.libvirt.Connect', dbus_interface=dbus.PROPERTIES_IFACE) assert isinstance(props[property_name], expected_type) + def test_connect_get_sysinfo(self): + sysinfo = self.connect.GetSysinfo(0) + assert isinstance(sysinfo, dbus.String) + def test_list_networks(self): networks = self.connect.ListNetworks(0) assert isinstance(networks, dbus.Array) -- 2.15.0

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- src/connect.c | 80 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/connect.c b/src/connect.c index eb4c74d..9820de5 100644 --- a/src/connect.c +++ b/src/connect.c @@ -304,13 +304,13 @@ virtDBusConnectDomainDefineXML(GVariant *inArgs, } static void -virtDBusDomainLookupByID(GVariant *inArgs, - GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, - gpointer userData, - GVariant **outArgs, - GUnixFDList **outFDs G_GNUC_UNUSED, - GError **error) +virtDBusConnectDomainLookupByID(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; @@ -332,13 +332,13 @@ virtDBusDomainLookupByID(GVariant *inArgs, } static void -virtDBusDomainLookupByName(GVariant *inArgs, - GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, - gpointer userData, - GVariant **outArgs, - GUnixFDList **outFDs G_GNUC_UNUSED, - GError **error) +virtDBusConnectDomainLookupByName(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; @@ -360,13 +360,13 @@ virtDBusDomainLookupByName(GVariant *inArgs, } static void -virtDBusDomainLookupByUUID(GVariant *inArgs, - GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, - gpointer userData, - GVariant **outArgs, - GUnixFDList **outFDs G_GNUC_UNUSED, - GError **error) +virtDBusConnectDomainLookupByUUID(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; @@ -510,13 +510,13 @@ virtDBusConnectNetworkDefineXML(GVariant *inArgs, } static void -virtDBusNetworkLookupByName(GVariant *inArgs, - GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, - gpointer userData, - GVariant **outArgs, - GUnixFDList **outFDs G_GNUC_UNUSED, - GError **error) +virtDBusConnectNetworkLookupByName(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(virNetwork) network = NULL; @@ -538,13 +538,13 @@ virtDBusNetworkLookupByName(GVariant *inArgs, } static void -virtDBusNetworkLookupByUUID(GVariant *inArgs, - GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, - gpointer userData, - GVariant **outArgs, - GUnixFDList **outFDs G_GNUC_UNUSED, - GError **error) +virtDBusConnectNetworkLookupByUUID(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(virNetwork) network = NULL; @@ -578,16 +578,16 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = { { "ListDomains", virtDBusConnectListDomains }, { "DomainCreateXML", virtDBusConnectDomainCreateXML }, { "DomainDefineXML", virtDBusConnectDomainDefineXML }, - { "DomainLookupByID", virtDBusDomainLookupByID }, - { "DomainLookupByName", virtDBusDomainLookupByName }, - { "DomainLookupByUUID", virtDBusDomainLookupByUUID }, + { "DomainLookupByID", virtDBusConnectDomainLookupByID }, + { "DomainLookupByName", virtDBusConnectDomainLookupByName }, + { "DomainLookupByUUID", virtDBusConnectDomainLookupByUUID }, { "GetCapabilities", virtDBusConnectGetCapabilities }, { "GetSysinfo", virtDBusConnectGetSysinfo }, { "ListNetworks", virtDBusConnectListNetworks }, { "NetworkCreateXML", virtDBusConnectNetworkCreateXML }, { "NetworkDefineXML", virtDBusConnectNetworkDefineXML }, - { "NetworkLookupByName", virtDBusNetworkLookupByName }, - { "NetworkLookupByUUID", virtDBusNetworkLookupByUUID }, + { "NetworkLookupByName", virtDBusConnectNetworkLookupByName }, + { "NetworkLookupByUUID", virtDBusConnectNetworkLookupByUUID }, { 0 } }; -- 2.15.0

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com> --- src/domain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/domain.c b/src/domain.c index a530987..0066788 100644 --- a/src/domain.c +++ b/src/domain.c @@ -311,7 +311,7 @@ virtDBusDomainGetStats(GVariant *inArgs, } static void -virtDBusDomainShutdown(GVariant *inArgs G_GNUC_UNUSED, +virtDBusDomainShutdown(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, const gchar *objectPath, gpointer userData, @@ -334,7 +334,7 @@ virtDBusDomainShutdown(GVariant *inArgs G_GNUC_UNUSED, } static void -virtDBusDomainDestroy(GVariant *inArgs G_GNUC_UNUSED, +virtDBusDomainDestroy(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, const gchar *objectPath, gpointer userData, @@ -359,7 +359,7 @@ virtDBusDomainDestroy(GVariant *inArgs G_GNUC_UNUSED, static void virtDBusDomainReboot(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, - const gchar *objectPath G_GNUC_UNUSED, + const gchar *objectPath, gpointer userData, GVariant **outArgs G_GNUC_UNUSED, GUnixFDList **outFDs G_GNUC_UNUSED, @@ -405,7 +405,7 @@ virtDBusDomainReset(GVariant *inArgs, } static void -virtDBusDomainCreate(GVariant *inArgs G_GNUC_UNUSED, +virtDBusDomainCreate(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, const gchar *objectPath, gpointer userData, @@ -428,7 +428,7 @@ virtDBusDomainCreate(GVariant *inArgs G_GNUC_UNUSED, } static void -virtDBusDomainUndefine(GVariant *inArgs G_GNUC_UNUSED, +virtDBusDomainUndefine(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, const gchar *objectPath, gpointer userData, -- 2.15.0
participants (2)
-
Katerina Koukiou
-
Pavel Hrdina