On Fri, Apr 06, 2018 at 01:20:29PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> > --- > data/org.libvirt.Connect.xml | 6 ++++++ > src/connect.c | 29 +++++++++++++++++++++++++++++ > test/test_connect.py | 26 ++++++++++++++++++++++++++ > 3 files changed, 61 insertions(+) > > diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml > index 715aeef..5f5c5fe 100644 > --- a/data/org.libvirt.Connect.xml > +++ b/data/org.libvirt.Connect.xml > @@ -50,6 +50,12 @@ > <arg name="flags" type="u" direction="in"/> > <arg name="networks" type="ao" direction="out"/> > </method> > + <method name="NetworkCreateXML"> > + <annotation name="org.gtk.GDBus.DocString" > + value="See https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkCreateXML"/> > + <arg name="xml" type="s" direction="in"/> > + <arg name="network" type="o" direction="out"/> > + </method> > <method name="NetworkLookupByName"> > <annotation name="org.gtk.GDBus.DocString" > value="See https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkLookupByName"/> > diff --git a/src/connect.c b/src/connect.c > index 9931c8f..759b9fb 100644 > --- a/src/connect.c > +++ b/src/connect.c > @@ -330,6 +330,34 @@ virtDBusConnectListNetworks(GVariant *inArgs, > *outArgs = g_variant_new_tuple(&gnetworks, 1); > } > > +static void > +virtDBusConnectNetworkCreateXML(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; > + g_autofree gchar *path = NULL; > + gchar *xml; This can be const gchar *xml. Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list