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-changelog

[Xen-changelog] [xen-unstable] [XEND] Unparsable VLAN numbers should def

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Unparsable VLAN numbers should default to -1
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2007 07:05:07 -0800
Delivery-date: Wed, 31 Jan 2007 07:06:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1170157038 0
# Node ID bca858b72bf8038b14dbbd7bb1431897c95b2fc2
# Parent  fe02bdd43ac13851f154ca0dc72a08244e82387a
[XEND] Unparsable VLAN numbers should default to -1

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendNode.py |    7 ++++++-
 tools/python/xen/xend/XendPIF.py  |    3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff -r fe02bdd43ac1 -r bca858b72bf8 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Tue Jan 30 11:14:23 2007 +0000
+++ b/tools/python/xen/xend/XendNode.py Tue Jan 30 11:37:18 2007 +0000
@@ -125,8 +125,13 @@ class XendNode:
                             # Compatibility hack, can go pretty soon.
                             pif['metrics'] = uuid.createString()
 
+                        try:
+                            pif['VLAN'] = int(pif.get('VLAN', -1))
+                        except (ValueError, TypeError):
+                            pif['VLAN'] = -1
+
                         self._PIF_create(pif['device'], pif['MTU'],
-                                         int(pif['VLAN']),
+                                         pif['VLAN'],
                                          pif['MAC'], network, False, pif_uuid,
                                          pif['metrics'])
                     except NetworkAlreadyConnected, exn:
diff -r fe02bdd43ac1 -r bca858b72bf8 tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py  Tue Jan 30 11:14:23 2007 +0000
+++ b/tools/python/xen/xend/XendPIF.py  Tue Jan 30 11:37:18 2007 +0000
@@ -138,8 +138,9 @@ class XendPIF:
             
             rc, _ = _cmd('vconfig add %s %d', self.device, self.vlan)
             if rc != 0:
-                log.error('Could not refresh %s', ifname)
+                log.error('Could not refresh VLAN for interface %s', ifname)
                 return
+            
             log.info('Created network interface %s', ifname)
 
         for brname, nics in bridges.items():

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Unparsable VLAN numbers should default to -1, Xen patchbot-unstable <=