ia64/xen-unstable

changeset 17262:c69524c462ff

Fix methods in SrvDomain class for inactive managed domains

This patch fixes methods in SrvDomain class for inactive managed
domains. They should use a domain name because inactive managed
domains don't have a domID.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 19 10:18:36 2008 +0000 (2008-03-19)
parents 4af873c95d0b
children 258c528c874f
files tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Wed Mar 19 10:15:01 2008 +0000
     1.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Wed Mar 19 10:18:36 2008 +0000
     1.3 @@ -121,10 +121,10 @@ class SrvDomain(SrvDir):
     1.4  
     1.5      def op_pincpu(self, _, req):
     1.6          fn = FormFn(self.xd.domain_pincpu,
     1.7 -                    [['dom', 'int'],
     1.8 +                    [['dom', 'str'],
     1.9                       ['vcpu', 'str'],
    1.10                       ['cpumap', 'str']])
    1.11 -        val = fn(req.args, {'dom': self.dom.domid})
    1.12 +        val = fn(req.args, {'dom': self.dom.getName()})
    1.13          return val
    1.14  
    1.15      def op_cpu_sedf_get(self, _, req):
    1.16 @@ -147,17 +147,17 @@ class SrvDomain(SrvDir):
    1.17      
    1.18      def op_domain_sched_credit_get(self, _, req):
    1.19          fn = FormFn(self.xd.domain_sched_credit_get,
    1.20 -                    [['dom', 'int']])
    1.21 -        val = fn(req.args, {'dom': self.dom.domid})
    1.22 +                    [['dom', 'str']])
    1.23 +        val = fn(req.args, {'dom': self.dom.getName()})
    1.24          return val
    1.25  
    1.26  
    1.27      def op_domain_sched_credit_set(self, _, req):
    1.28          fn = FormFn(self.xd.domain_sched_credit_set,
    1.29 -                    [['dom', 'int'],
    1.30 +                    [['dom', 'str'],
    1.31                       ['weight', 'int'],
    1.32                       ['cap', 'int']])
    1.33 -        val = fn(req.args, {'dom': self.dom.domid})
    1.34 +        val = fn(req.args, {'dom': self.dom.getName()})
    1.35          return val
    1.36  
    1.37      def op_maxmem_set(self, _, req):