WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] Update vcpu_avail when parsing con

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Update vcpu_avail when parsing configuration.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Dec 2006 13:20:13 +0000
Delivery-date: Fri, 08 Dec 2006 05:19:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID e8a74ac8016756a303cb889abbb95e593484fb5d
# Parent  3f0ca90351e268084fbdb733d70fc596cb46537d
[XEND] Update vcpu_avail when parsing configuration.

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

diff -r 3f0ca90351e2 -r e8a74ac80167 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Dec 07 10:54:43 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Thu Dec 07 11:12:05 2006 +0000
@@ -353,10 +353,15 @@ class XendConfig(dict):
         if self['builder'] not in ('hvm', 'linux'):
             raise XendConfigError('Invalid builder configuration')
 
+    def _vcpus_sanity_check(self):
+        if self.get('vcpus_number') != None:
+            self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
+
     def validate(self):
         self._memory_sanity_check()
         self._actions_sanity_check()
         self._builder_sanity_check()
+        self._vcpus_sanity_check()
 
     def _dominfo_to_xapi(self, dominfo):
         self['domid'] = dominfo['domid']

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Update vcpu_avail when parsing configuration., Xen patchbot-unstable <=