xenserver: Avoid doing unneeded work in deconfigure_datapath().
authorBen Pfaff <blp@nicira.com>
Mon, 22 Feb 2010 21:27:19 +0000 (13:27 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 23 Feb 2010 17:55:37 +0000 (09:55 -0800)
Deleting a bridge deletes all of its ports, too, so there's no benefit in
doing so manually beforehand.

Signed-off-by: Ben Pfaff <blp@nicira.com>
xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py

index 91204884581ccc71c9b0f66a49ad4af1d565b12e..1dcac61d51927e56335dfff4a98f315b5c987530 100644 (file)
@@ -265,20 +265,7 @@ def deconfigure_datapath(pif):
 
     bridge = pif_bridge_name(pif)
 
-    physical_devices = datapath_get_physical_pifs(pif)
-
-    log("deconfigure_datapath: bridge           - %s" % bridge)
-    log("deconfigure_datapath: physical devices - %s" % [pif_netdev_name(p) for p in physical_devices])
-
-    for p in physical_devices:
-        dev = pif_netdev_name(p)
-        vsctl_argv += ['# deconfigure physical port %s' % dev]
-        vsctl_argv += datapath_deconfigure_physical(dev)
-        netdev_down(dev)
-
-    if len(physical_devices) > 1:
-        vsctl_argv += ['# deconfigure bond %s' % pif_netdev_name(pif)]
-        vsctl_argv += datapath_deconfigure_bond(pif_netdev_name(pif))
+    log("deconfigure_bridge: bridge           - %s" % bridge)
 
     vsctl_argv += ['# deconfigure bridge %s' % bridge]
     vsctl_argv += ['--', '--if-exists', 'del-br', bridge]