WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

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

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 02 of 12] [PATCH] xenserver: Delete ports by interface name
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 14:29:06 +0100
Delivery-date: Thu, 08 Jul 2010 06:39:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1278595744@ely>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1278595744@ely>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# 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