ia64/xen-unstable

changeset 13261:292edc60d260

[XEND] Default values for VBD mode and cpu_weight.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Thu Jan 04 16:30:20 2007 +0000 (2007-01-04)
parents cade632793b1
children b2ea5ae25a26
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Jan 04 16:21:12 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Jan 04 16:30:20 2007 +0000
     1.3 @@ -914,7 +914,7 @@ class XendDomainInfo:
     1.4          return self.info.get('cpu_cap', 0)
     1.5  
     1.6      def getWeight(self):
     1.7 -        return self.info['cpu_weight']
     1.8 +        return self.info.get('cpu_weight', 256)
     1.9  
    1.10      def setResume(self, state):
    1.11          self._resume = state
    1.12 @@ -1991,7 +1991,7 @@ class XendDomainInfo:
    1.13              config['image'] = config.get('uname', '')
    1.14              config['io_read_kbs'] = 0.0
    1.15              config['io_write_kbs'] = 0.0
    1.16 -            if config['mode'] == 'r':
    1.17 +            if config.get('mode', 'r') == 'r':
    1.18                  config['mode'] = 'RO'
    1.19              else:
    1.20                  config['mode'] = 'RW'