direct-io.hg

changeset 13748:5d12faee0708

[XEND] Make VBD.bootable in XendConfig kept as int.

This will prevent it from being displayed as 'False' and 'True'
everywhere in the device SXP.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Wed Jan 31 15:03:22 2007 +0000 (2007-01-31)
parents dfa9e5565063
children 3291a7b48731
files tools/python/xen/xend/XendConfig.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Wed Jan 31 15:02:20 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Wed Jan 31 15:03:22 2007 +0000
     1.3 @@ -905,7 +905,7 @@ class XendConfig(dict):
     1.4                                  # store as part of the device config.
     1.5                                  dev_uuid = sxp.child_value(config, 'uuid')
     1.6                                  dev_type, dev_cfg = self['devices'][dev_uuid]
     1.7 -                                is_bootable = dev_cfg.get('bootable', False)
     1.8 +                                is_bootable = dev_cfg.get('bootable', 0)
     1.9                                  config.append(['bootable', int(is_bootable)])
    1.10  
    1.11                              sxpr.append(['device', config])
    1.12 @@ -978,7 +978,7 @@ class XendConfig(dict):
    1.13                      pass
    1.14  
    1.15              if dev_type == 'vbd':
    1.16 -                dev_info['bootable'] = False
    1.17 +                dev_info['bootable'] = 0
    1.18                  if dev_info.get('dev', '').startswith('ioemu:'):
    1.19                      dev_info['driver'] = 'ioemu'
    1.20                  else:
    1.21 @@ -998,7 +998,7 @@ class XendConfig(dict):
    1.22                      if dev_type == 'vbd' and not target[param]:
    1.23                          # Compat hack -- this is the first disk, so mark it
    1.24                          # bootable.
    1.25 -                        dev_info['bootable'] = True
    1.26 +                        dev_info['bootable'] = 1
    1.27                      target[param].append(dev_uuid)
    1.28              elif dev_type == 'tap':
    1.29                  if 'vbd_refs' not in target:
    1.30 @@ -1007,7 +1007,7 @@ class XendConfig(dict):
    1.31                      if not target['vbd_refs']:
    1.32                          # Compat hack -- this is the first disk, so mark it
    1.33                          # bootable.
    1.34 -                        dev_info['bootable'] = True
    1.35 +                        dev_info['bootable'] = 1
    1.36                      target['vbd_refs'].append(dev_uuid)
    1.37                      
    1.38              elif dev_type == 'vfb':
    1.39 @@ -1070,8 +1070,8 @@ class XendConfig(dict):
    1.40                  dev_info['uname'] = cfg_xenapi.get('image', '')
    1.41                  dev_info['dev'] = '%s:%s' % (cfg_xenapi.get('device'),
    1.42                                               old_vbd_type)
    1.43 -                dev_info['bootable'] = cfg_xenapi.get('bootable', False)
    1.44 -                dev_info['driver'] = cfg_xenapi.get('driver')
    1.45 +                dev_info['bootable'] = int(cfg_xenapi.get('bootable', 0))
    1.46 +                dev_info['driver'] = cfg_xenapi.get('driver', '')
    1.47                  dev_info['VDI'] = cfg_xenapi.get('VDI', '')
    1.48                      
    1.49                  if cfg_xenapi.get('mode') == 'RW':