From nobody Wed May 14 07:01:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525352120909911.3803037770272; Thu, 3 May 2018 05:55:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 598B9C06785A; Thu, 3 May 2018 12:55:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 170CA68437; Thu, 3 May 2018 12:55:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B9B614CAA7; Thu, 3 May 2018 12:55:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w43CkRt9004791 for ; Thu, 3 May 2018 08:46:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id C8660111765D; Thu, 3 May 2018 12:46:27 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6CB3F111765B for ; Thu, 3 May 2018 12:46:27 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Thu, 3 May 2018 14:46:21 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 2/4] Revert "Implement BridgeName property for Network interface." X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 03 May 2018 12:55:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Katerina Koukiou --- 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=3D"See https://libvirt.org/html/libvirt-libvirt-network.html= #virNetworkGetAutostart and https://libvirt.org/html/libvirt-libvirt-network.html#virNe= tworkSetAutostart"/> - - - 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 =3D g_variant_new("b", !!autostart); } =20 -static void -virtDBusNetworkGetBridgeName(const gchar *objectPath, - gpointer userData, - GVariant **value, - GError **error) -{ - virtDBusConnect *connect =3D userData; - g_autoptr(virNetwork) network =3D NULL; - g_autofree gchar *bridge =3D NULL; - - network =3D virtDBusNetworkGetVirNetwork(connect, objectPath, error); - if (!network) - return; - - bridge =3D virNetworkGetBridgeName(network); - - if (!bridge) - return virtDBusUtilSetLastVirtError(error); - - *value =3D g_variant_new("s", bridge); -} - static void virtDBusNetworkGetName(const gchar *objectPath, gpointer userData, @@ -405,7 +383,6 @@ virtDBusNetworkUpdate(GVariant *inArgs, static virtDBusGDBusPropertyTable virtDBusNetworkPropertyTable[] =3D { { "Active", virtDBusNetworkGetActive, NULL }, { "Autostart", virtDBusNetworkGetAutostart, virtDBusNetworkSetAutostar= t }, - { "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 =3D obj.GetAll('org.libvirt.Network', dbus_interface=3Ddbus.= 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) --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list