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 03 of 12] [PATCH] xenserver: Accept VLAN PIFs in pif_br

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 03 of 12] [PATCH] xenserver: Accept VLAN PIFs in pif_bridge_name()
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 14:29:07 +0100
Delivery-date: Thu, 08 Jul 2010 06:39:21 -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 50e349e5040adf945a97ebf2c6027b38cb2cc05c
# Parent  4f2992744bb49a2f1bffc52ce519df5e1d5f0739
[PATCH] xenserver: Accept VLAN PIFs in pif_bridge_name().

>From 6987c81c05f21c579fbe60e9b6693862abbbb762 Mon Sep 17 00:00:00 2001
Date: Mon, 22 Feb 2010 12:53:17 -0800
pif_bridge_name() was written when the vswitch interface-reconfigure was
working with the raw Open vSwitch configuration via ovs-cfg-mod.  Then,
it made no sense to ask for the "bridge name" of a VLAN PIF, because a
VLAN PIF didn't have a bridge.

Now, however, the vSwitch interface-reconfigure works with ovs-vsctl, which
provides a thin layer over the OVS configuration that makes VLAN bridges
appear to exist.  So now it makes sense to ask for the bridge of a VLAN
PIF, and this commit enables that.

Signed-off-by: Ben Pfaff <blp@xxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff -r 4f2992744bb4 -r 50e349e5040a scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:25:51 2010 +0100
+++ b/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:25:51 2010 +0100
@@ -43,15 +43,10 @@
 def pif_bridge_name(pif):
     """Return the bridge name of a pif.
 
-    PIF must not be a VLAN and must be a bridged PIF."""
+    PIF must be a bridged PIF."""
 
     pifrec = db().get_pif_record(pif)
-
-    if pif_is_vlan(pif):
-        raise Error("PIF %(uuid)s cannot be a bridge, VLAN is %(VLAN)s" % 
pifrec)
-
     nwrec = db().get_network_record(pifrec['network'])
-
     if nwrec['bridge']:
         return nwrec['bridge']
     else:
 scripts/InterfaceReconfigureVswitch.py |  7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)


Attachment: xenserver_Accept_VLAN_PIFs_in_pif_bridge_name__.patch
Description: Text Data

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