Change in vdsm[master]: Move removing libvirt network to configurator

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Mon May 20 03:30:37 UTC 2013


Mark Wu has uploaded a new change for review.

Change subject: Move removing libvirt network to configurator
......................................................................

Move removing libvirt network to configurator

This patch adds a wrapper for the configWriter.removeLibvirtNetwork()
in configurator and call it in delNetwork because we should try to
avoid using ConfigWriter directly in configNetwork.py

Change-Id: Iea1f0720429fff05e49408ff3f2071e4738e48b3
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M vdsm/configNetwork.py
M vdsm/netconf/ifcfg.py
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/14874/1

diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 816cd27..2f80562 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -342,7 +342,7 @@
         validateDelNetwork(network, vlan, bonding, nics, bridged, _netinfo)
 
     configWriter.setNewMtu(network=network, bridged=bridged, _netinfo=_netinfo)
-    configWriter.removeLibvirtNetwork(network)
+    configurator.removeLibvirtNetwork(network)
 
     # We need to gather NetInfo again to refresh networks info from libvirt.
     # The deleted bridge should never be up at this stage.
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 84444b0..d92f77b 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -146,6 +146,9 @@
             self.configWriter.createLibvirtNetwork(network, False, nic.name)
             self._libvirtAdded.add(network)
 
+    def removeLibvirtNetwork(self, network):
+        self.configWriter.removeLibvirtNetwork(network)
+
     def removeBridge(self, bridge):
         ifdown(bridge.name)
         execCmd([constants.EXT_BRCTL, 'delbr', bridge.name])


--
To view, visit http://gerrit.ovirt.org/14874
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea1f0720429fff05e49408ff3f2071e4738e48b3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list