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

[Xen-changelog] [xen-unstable] Fix methods in SrvDomain class for inactive managed domains



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205921916 0
# Node ID c69524c462ff8a8f7f44957d9012e28159b14d55
# Parent  4af873c95d0b7118ffaea9a4cf96fd92338d144c
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@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/SrvDomain.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r 4af873c95d0b -r c69524c462ff tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Wed Mar 19 10:15:01 2008 +0000
+++ b/tools/python/xen/xend/server/SrvDomain.py Wed Mar 19 10:18:36 2008 +0000
@@ -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):

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