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] [XM] Differentiate between VLAN PIFs and

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XM] Differentiate between VLAN PIFs and normal PIFs in network-show
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Apr 2007 10:20:12 -0700
Delivery-date: Fri, 27 Apr 2007 10:19:48 -0700
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 Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1177674674 -3600
# Node ID 499e50c3115f0e7fd62bedb083119edb76cdb18c
# Parent  55d7745bd37778afd4c1883aab8a57823826412b
[XM] Differentiate between VLAN PIFs and normal PIFs in network-show

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/main.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -r 55d7745bd377 -r 499e50c3115f tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri Apr 27 12:49:17 2007 +0100
+++ b/tools/python/xen/xm/main.py       Fri Apr 27 12:51:14 2007 +0100
@@ -2301,11 +2301,19 @@ def xm_network_show(args):
             else:
                 vif = '' 
 
+            if pif:
+                if int(pif['VLAN']) > -1:
+                    pif = '%s.%s' % (pif['device'], pif['VLAN'])
+                else:
+                    pif = pif['device']
+            else:
+                pif = ''
+
             if i == 0:
                 r = {'name_label':network['name_label'],
-                     'vif':vif, 'pif':pif['device']}
+                     'vif':vif, 'pif':pif}
             else:
-                r = {'name_label':'','vif':vif,'pif':pif['device']}
+                r = {'name_label':'', 'vif':vif, 'pif':pif}
 
             print format2 % r
 

_______________________________________________
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] [XM] Differentiate between VLAN PIFs and normal PIFs in network-show, Xen patchbot-unstable <=