ia64/xen-unstable

changeset 13782:f63e1244b48d

[XEND] Fix VCPU_params to return string map.

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Wed Jan 31 15:01:09 2007 +0000 (2007-01-31)
parents 3cccf8e64296
children dfa9e5565063
files tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendAPI.py	Wed Jan 31 13:20:36 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendAPI.py	Wed Jan 31 15:01:09 2007 +0000
     1.3 @@ -1121,11 +1121,11 @@ class XendAPI(object):
     1.4      
     1.5      def VM_get_VCPUs_policy(self, session, vm_ref):
     1.6          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
     1.7 -        return dom.get_vcpus_policy()
     1.8 +        return xen_api_success(dom.get_vcpus_policy())
     1.9      
    1.10      def VM_get_VCPUs_params(self, session, vm_ref):
    1.11          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
    1.12 -        return xen_api_todo() # need access to scheduler
    1.13 +        return xen_api_success(dom.get_vcpus_params())
    1.14      
    1.15      def VM_get_actions_after_shutdown(self, session, vm_ref):
    1.16          dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Jan 31 13:20:36 2007 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Jan 31 15:01:09 2007 +0000
     2.3 @@ -1976,7 +1976,11 @@ class XendDomainInfo:
     2.4          else:
     2.5              return 'unknown'
     2.6      def get_vcpus_params(self):
     2.7 -        return '' # TODO
     2.8 +        if self.getDomid() is None:
     2.9 +            return {}
    2.10 +
    2.11 +        retval = xc.sched_credit_domain_get(self.getDomid())
    2.12 +        return retval
    2.13      def get_power_state(self):
    2.14          return XEN_API_VM_POWER_STATE[self.state]
    2.15      def get_platform_std_vga(self):