ia64/xen-unstable

changeset 12614:723dbe1fc751

Do not display -1 as the domid when a VM is not running -- simply leave the
column blank.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Nov 28 13:32:07 2006 +0000 (2006-11-28)
parents 4cd39f7f090d
children bbcaa0cad3d2
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Tue Nov 28 12:24:24 2006 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Tue Nov 28 13:32:07 2006 +0000
     1.3 @@ -564,7 +564,7 @@ def parse_doms_info(info):
     1.4          return DOM_STATES[t(sxp.child_value(info, n, d))]
     1.5      
     1.6      return {
     1.7 -        'domid'    : get_info('domid',        int,   -1),
     1.8 +        'domid'    : get_info('domid',        str,   ''),
     1.9          'name'     : get_info('name',         str,   '??'),
    1.10          'mem'      : get_info('memory_dynamic_max', int,   0),
    1.11          'vcpus'    : get_info('online_vcpus', int,   0),
    1.12 @@ -580,7 +580,7 @@ def parse_sedf_info(info):
    1.13          return t(sxp.child_value(info, n, d))
    1.14  
    1.15      return {
    1.16 -        'domid'    : get_info('domid',        int,   -1),
    1.17 +        'domid'    : get_info('domid',         int,   -1),
    1.18          'period'   : get_info('period',        int,   -1),
    1.19          'slice'    : get_info('slice',         int,   -1),
    1.20          'latency'  : get_info('latency',       int,   -1),
    1.21 @@ -592,7 +592,7 @@ def xm_brief_list(doms):
    1.22      print '%-40s %3s %5s %5s %10s %9s' % \
    1.23            ('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)')
    1.24      
    1.25 -    format = "%(name)-40s %(domid)3d %(mem)5d %(vcpus)5d %(state)10s " \
    1.26 +    format = "%(name)-40s %(domid)3s %(mem)5d %(vcpus)5d %(state)10s " \
    1.27               "%(cpu_time)8.1f"
    1.28      
    1.29      for dom in doms:
    1.30 @@ -604,7 +604,7 @@ def xm_label_list(doms):
    1.31            ('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)', 'Label')
    1.32      
    1.33      output = []
    1.34 -    format = '%(name)-32s %(domid)3d %(mem)5d %(vcpus)5d %(state)10s ' \
    1.35 +    format = '%(name)-32s %(domid)3s %(mem)5d %(vcpus)5d %(state)10s ' \
    1.36               '%(cpu_time)8.1f %(seclabel)9s'
    1.37      
    1.38      for dom in doms: