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>
This commit is contained in:
Keir Fraser committed 2008-03-19 10:18:36 +00:00
1 parent 5a8637ac0e
commit 67ae17b562
1 file changed
+6 -6
+6 -6
View File
@@ -121,10 +121,10 @@ class SrvDomain(SrvDir):
def op_pincpu(self, _, req):
fn = FormFn(self.xd.domain_pincpu,
[['dom', 'int'],
[['dom', 'str'],
['vcpu', 'str'],
['cpumap', 'str']])
val = fn(req.args, {'dom': self.dom.domid})
val = fn(req.args, {'dom': self.dom.getName()})
return val
def op_cpu_sedf_get(self, _, req):
@@ -147,17 +147,17 @@ class SrvDomain(SrvDir):
def op_domain_sched_credit_get(self, _, req):
fn = FormFn(self.xd.domain_sched_credit_get,
[['dom', 'int']])
val = fn(req.args, {'dom': self.dom.domid})
[['dom', 'str']])
val = fn(req.args, {'dom': self.dom.getName()})
return val
def op_domain_sched_credit_set(self, _, req):
fn = FormFn(self.xd.domain_sched_credit_set,
[['dom', 'int'],
[['dom', 'str'],
['weight', 'int'],
['cap', 'int']])
val = fn(req.args, {'dom': self.dom.domid})
val = fn(req.args, {'dom': self.dom.getName()})
return val
def op_maxmem_set(self, _, req):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.