Commit bb45647c authored by Anya Harter's avatar Anya Harter Committed by Katerina Koukiou

Implement InterfaceChangeRollback method for Connect Interface

Signed-off-by: 's avatarAnya Harter <aharter@redhat.com>
Reviewed-by: 's avatarKaterina Koukiou <kkoukiou@redhat.com>
parent 88629345
...@@ -158,6 +158,11 @@ ...@@ -158,6 +158,11 @@
value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeCommit"/> value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeCommit"/>
<arg name="flags" type="u" direction="in"/> <arg name="flags" type="u" direction="in"/>
</method> </method>
<method name="InterfaceChangeRollback">
<annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeRollback"/>
<arg name="flags" type="u" direction="in"/>
</method>
<method name="InterfaceDefineXML"> <method name="InterfaceDefineXML">
<annotation name="org.gtk.GDBus.DocString" <annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefineXML"/> value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefineXML"/>
......
...@@ -777,6 +777,27 @@ virtDBusConnectInterfaceChangeCommit(GVariant *inArgs, ...@@ -777,6 +777,27 @@ virtDBusConnectInterfaceChangeCommit(GVariant *inArgs,
virtDBusUtilSetLastVirtError(error); virtDBusUtilSetLastVirtError(error);
} }
static void
virtDBusConnectInterfaceChangeRollback(GVariant *inArgs,
GUnixFDList *inFDs G_GNUC_UNUSED,
const gchar *objectPath G_GNUC_UNUSED,
gpointer userData,
GVariant **outArgs G_GNUC_UNUSED,
GUnixFDList **outFDs G_GNUC_UNUSED,
GError **error)
{
virtDBusConnect *connect = userData;
guint flags;
g_variant_get(inArgs, "(u)", &flags);
if (!virtDBusConnectOpen(connect, error))
return;
if (virInterfaceChangeRollback(connect->connection, flags) < 0)
virtDBusUtilSetLastVirtError(error);
}
static void static void
virtDBusConnectInterfaceDefineXML(GVariant *inArgs, virtDBusConnectInterfaceDefineXML(GVariant *inArgs,
GUnixFDList *inFDs G_GNUC_UNUSED, GUnixFDList *inFDs G_GNUC_UNUSED,
...@@ -1876,6 +1897,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = { ...@@ -1876,6 +1897,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = {
{ "GetSysinfo", virtDBusConnectGetSysinfo }, { "GetSysinfo", virtDBusConnectGetSysinfo },
{ "InterfaceChangeBegin", virtDBusConnectInterfaceChangeBegin }, { "InterfaceChangeBegin", virtDBusConnectInterfaceChangeBegin },
{ "InterfaceChangeCommit", virtDBusConnectInterfaceChangeCommit }, { "InterfaceChangeCommit", virtDBusConnectInterfaceChangeCommit },
{ "InterfaceChangeRollback", virtDBusConnectInterfaceChangeRollback },
{ "InterfaceDefineXML", virtDBusConnectInterfaceDefineXML }, { "InterfaceDefineXML", virtDBusConnectInterfaceDefineXML },
{ "ListDomains", virtDBusConnectListDomains }, { "ListDomains", virtDBusConnectListDomains },
{ "ListInterfaces", virtDBusConnectListInterfaces }, { "ListInterfaces", virtDBusConnectListInterfaces },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment