[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Unparsable VLAN numbers should default to -1
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |