This reverts commit 5b28d8f778d6c5b7ebd64909882b19d70cdc098f.
This API is broken by design since you cannot specify whether it
returns bridge name from persistent or active XML definition.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
data/org.libvirt.Network.xml | 4 ----
src/network.c | 23 -----------------------
tests/test_network.py | 1 -
3 files changed, 28 deletions(-)
diff --git a/data/org.libvirt.Network.xml b/data/org.libvirt.Network.xml
index cf05062..81bf081 100644
--- a/data/org.libvirt.Network.xml
+++ b/data/org.libvirt.Network.xml
@@ -12,10 +12,6 @@
value="See
https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkGetAutostart and
https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkSetAutost...
</property>
- <property name="BridgeName" type="s"
access="read">
- <annotation name="org.gtk.GDBus.DocString"
- value="See
https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkGetBridge...
- </property>
<property name="Name" type="s" access="read">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkGetName&q...
diff --git a/src/network.c b/src/network.c
index 4d00dfe..cf846d7 100644
--- a/src/network.c
+++ b/src/network.c
@@ -108,28 +108,6 @@ virtDBusNetworkGetAutostart(const gchar *objectPath,
*value = g_variant_new("b", !!autostart);
}
-static void
-virtDBusNetworkGetBridgeName(const gchar *objectPath,
- gpointer userData,
- GVariant **value,
- GError **error)
-{
- virtDBusConnect *connect = userData;
- g_autoptr(virNetwork) network = NULL;
- g_autofree gchar *bridge = NULL;
-
- network = virtDBusNetworkGetVirNetwork(connect, objectPath, error);
- if (!network)
- return;
-
- bridge = virNetworkGetBridgeName(network);
-
- if (!bridge)
- return virtDBusUtilSetLastVirtError(error);
-
- *value = g_variant_new("s", bridge);
-}
-
static void
virtDBusNetworkGetName(const gchar *objectPath,
gpointer userData,
@@ -405,7 +383,6 @@ virtDBusNetworkUpdate(GVariant *inArgs,
static virtDBusGDBusPropertyTable virtDBusNetworkPropertyTable[] = {
{ "Active", virtDBusNetworkGetActive, NULL },
{ "Autostart", virtDBusNetworkGetAutostart, virtDBusNetworkSetAutostart },
- { "BridgeName", virtDBusNetworkGetBridgeName, NULL },
{ "Name", virtDBusNetworkGetName, NULL },
{ "Persistent", virtDBusNetworkGetPersistent, NULL },
{ "UUID", virtDBusNetworkGetUUID, NULL },
diff --git a/tests/test_network.py b/tests/test_network.py
index 2c1bd21..b91bc93 100755
--- a/tests/test_network.py
+++ b/tests/test_network.py
@@ -20,7 +20,6 @@ class TestNetwork(libvirttest.BaseTestClass):
props = obj.GetAll('org.libvirt.Network',
dbus_interface=dbus.PROPERTIES_IFACE)
assert isinstance(props['Active'], dbus.Boolean)
assert isinstance(props['Autostart'], dbus.Boolean)
- assert isinstance(props['BridgeName'], dbus.String)
assert isinstance(props['Name'], dbus.String)
assert isinstance(props['Persistent'], dbus.Boolean)
assert isinstance(props['UUID'], dbus.String)
--
2.14.3