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

[Xen-changelog] [xen-unstable] [XEND] Fix VCPU_params to return string map.



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Date 1170255669 0
# Node ID f63e1244b48dd6d8c064f4ed38b7d7cf2bdf62ee
# Parent  3cccf8e6429666be58408972570dbd063a2bae1e
[XEND] Fix VCPU_params to return string map.

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

diff -r 3cccf8e64296 -r f63e1244b48d tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Wed Jan 31 13:20:36 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Wed Jan 31 15:01:09 2007 +0000
@@ -1121,11 +1121,11 @@ class XendAPI(object):
     
     def VM_get_VCPUs_policy(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
-        return dom.get_vcpus_policy()
+        return xen_api_success(dom.get_vcpus_policy())
     
     def VM_get_VCPUs_params(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
-        return xen_api_todo() # need access to scheduler
+        return xen_api_success(dom.get_vcpus_params())
     
     def VM_get_actions_after_shutdown(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
diff -r 3cccf8e64296 -r f63e1244b48d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Jan 31 13:20:36 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Jan 31 15:01:09 2007 +0000
@@ -1976,7 +1976,11 @@ class XendDomainInfo:
         else:
             return 'unknown'
     def get_vcpus_params(self):
-        return '' # TODO
+        if self.getDomid() is None:
+            return {}
+
+        retval = xc.sched_credit_domain_get(self.getDomid())
+        return retval
     def get_power_state(self):
         return XEN_API_VM_POWER_STATE[self.state]
     def get_platform_std_vga(self):

_______________________________________________
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®.