[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 02 of 12] [PATCH] xenserver: Delete ports by interface name



# HG changeset patch
# User Ben Pfaff <blp@xxxxxxxxxx>
# Date 1278595551 -3600
# Node ID 4f2992744bb49a2f1bffc52ce519df5e1d5f0739
# Parent  ca45394bb03819b897483e1e3872b7329a70a00d
[PATCH] xenserver: Delete ports by interface name.

>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@xxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 utilities/ovs-vsctl.8.in                           |   11 ++++
 utilities/ovs-vsctl.c                              |   55 +++++++++++++------
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    6 +-
 3 files changed, 51 insertions(+), 21 deletions(-)

diff -r ca45394bb038 -r 4f2992744bb4 scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:25:21 2010 +0100
+++ b/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:25:51 2010 +0100
@@ -119,7 +119,7 @@
         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 @@
     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:")
 scripts/InterfaceReconfigureVswitch.py |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Attachment: xenserver_Delete_ports_by_interface_name.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.