ia64/xen-unstable

changeset 14969:499e50c3115f

[XM] Differentiate between VLAN PIFs and normal PIFs in network-show

signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author Tom Wilkie <tom.wilkie@gmail.com>
date Fri Apr 27 12:51:14 2007 +0100 (2007-04-27)
parents 55d7745bd377
children 3c352bbc894d
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Fri Apr 27 12:49:17 2007 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Fri Apr 27 12:51:14 2007 +0100
     1.3 @@ -2301,11 +2301,19 @@ def xm_network_show(args):
     1.4              else:
     1.5                  vif = '' 
     1.6  
     1.7 +            if pif:
     1.8 +                if int(pif['VLAN']) > -1:
     1.9 +                    pif = '%s.%s' % (pif['device'], pif['VLAN'])
    1.10 +                else:
    1.11 +                    pif = pif['device']
    1.12 +            else:
    1.13 +                pif = ''
    1.14 +
    1.15              if i == 0:
    1.16                  r = {'name_label':network['name_label'],
    1.17 -                     'vif':vif, 'pif':pif['device']}
    1.18 +                     'vif':vif, 'pif':pif}
    1.19              else:
    1.20 -                r = {'name_label':'','vif':vif,'pif':pif['device']}
    1.21 +                r = {'name_label':'', 'vif':vif, 'pif':pif}
    1.22  
    1.23              print format2 % r
    1.24