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] xm: Make cpu_{cap|weight} available when

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Make cpu_{cap|weight} available when using XenAPI
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Sep 2009 03:45:16 -0700
Delivery-date: Wed, 02 Sep 2009 03:46:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251887967 -3600
# Node ID 2375b4ac35bdef836a6fe8bbb6547764216be7bc
# Parent  a787b0053395caf00a28621386852e45451aeacb
xm: Make cpu_{cap|weight} available when using XenAPI

Currently, cpu_weight parameter and cpu_cap parameter in domain=20
configuration files are ignored when using XenAPI.
The parameters are available by this patch.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/xenapi_create.py |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+)

diff -r a787b0053395 -r 2375b4ac35bd tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Wed Sep 02 11:39:02 2009 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Wed Sep 02 11:39:27 2009 +0100
@@ -778,6 +778,12 @@ class sxp2xml:
 
         map(vm.appendChild, platform)
 
+        # And now the vcpu_params
+
+        vcpu_params = self.extract_vcpu_params(config, document)
+
+        map(vm.appendChild, vcpu_params)
+
         # transient?
 
         if transient:
@@ -1072,6 +1078,23 @@ class sxp2xml:
                 platform_configs.append(platform)
  
         return platform_configs
+
+    def extract_vcpu_params(self, config, document):
+        vcpu_params = []
+
+        vcpu_param = document.createElement("vcpu_param")
+        vcpu_param.attributes["key"] = "weight"
+        vcpu_param.attributes["value"] \
+            = str(get_child_by_name(config, "cpu_weight", 256))
+        vcpu_params.append(vcpu_param)
+
+        vcpu_param = document.createElement("vcpu_param")
+        vcpu_param.attributes["key"] = "cap"
+        vcpu_param.attributes["value"] \
+            = str(get_child_by_name(config, "cpu_cap", 0))
+        vcpu_params.append(vcpu_param)
+
+        return vcpu_params
     
     _eths = -1
 

_______________________________________________
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] xm: Make cpu_{cap|weight} available when using XenAPI, Xen patchbot-unstable <=