]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
[PATCH] xenserver: Delete ports by interface name.
authorBen Pfaff <blp@nicira.com>
Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)
committerBen Pfaff <blp@nicira.com>
Thu, 8 Jul 2010 13:25:51 +0000 (14:25 +0100)
From 7c79588e006eb28e51ca8b715e22abce0c81f5d4 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 16:36:30 -0800
ovs-vsctl command "--if-exists del-port eth0" does nothing if eth0 is on
a bridge as part of a bond, because the bond's port name is not eth0 but
something else.  But interface-reconfigure needs to do that, so this commit
adds that ability to ovs-vsctl and modifies interface-reconfigure to use it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 utilities/ovs-vsctl.8.in                           |   11 ++++
 utilities/ovs-vsctl.c                              |   55 +++++++++++++------
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    6 +-
 3 files changed, 51 insertions(+), 21 deletions(-)

scripts/InterfaceReconfigureVswitch.py

index 9aa3547154af60d1c882e3c68c70f22206042f12..af797d452e11b7ea0ef6fef772d51bf36e351335 100644 (file)
@@ -119,7 +119,7 @@ A VLAN PIF cannot be a datapath PIF.
         return [pif]
 
 def datapath_deconfigure_physical(netdev):
-    return ['--', '--if-exists', 'del-port', netdev]
+    return ['--', '--with-iface', '--if-exists', 'del-port', netdev]
 
 def datapath_configure_bond(pif,slaves):
     bridge = pif_bridge_name(pif)
@@ -156,10 +156,10 @@ def datapath_configure_bond(pif,slaves):
     return argv
 
 def datapath_deconfigure_bond(netdev):
-    return ['--', '--if-exists', 'del-port', netdev]
+    return ['--', '--with-iface', '--if-exists', 'del-port', netdev]
 
 def datapath_deconfigure_ipdev(interface):
-    return ['--', '--if-exists', 'del-port', interface]
+    return ['--', '--with-iface', '--if-exists', 'del-port', interface]
 
 def datapath_modify_config(commands):
     #log("modifying configuration:")