[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Default values for VBD mode and cpu_weight.



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1167928220 0
# Node ID 292edc60d2603f744b5408cbf7795365fa8598ce
# Parent  cade632793b13b30ead81e74130fe8e55520f6e6
[XEND] Default values for VBD mode and cpu_weight.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r cade632793b1 -r 292edc60d260 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Jan 04 16:21:12 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Jan 04 16:30:20 2007 +0000
@@ -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'

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.