2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00

xenserver: Delete ports by interface name.

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>
This commit is contained in:
Ben Pfaff
2010-02-22 16:36:30 -08:00
parent 3b1acc9955
commit 7c79588e00
3 changed files with 52 additions and 22 deletions

View 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:")