[XEND] Default values for VBD mode and cpu_weight.

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2007-01-04 16:30:20 +00:00
1 parent a089f6e2cd
commit 019793657b
1 file changed
+2 -2
+2 -2
View File
@@ -914,7 +914,7 @@ class XendDomainInfo:
return self.info.get('cpu_cap', 0)
def getWeight(self):
return self.info['cpu_weight']
return self.info.get('cpu_weight', 256)
def setResume(self, state):
self._resume = state
@@ -1991,7 +1991,7 @@ class XendDomainInfo:
config['image'] = config.get('uname', '')
config['io_read_kbs'] = 0.0
config['io_write_kbs'] = 0.0
if config['mode'] == 'r':
if config.get('mode', 'r') == 'r':
config['mode'] = 'RO'
else:
config['mode'] = 'RW'
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.