Skip to contentSkip to conversation

Fix methods in SrvDomain class for inactive managed domains

PATCH In review Masaki Kanno 1 participant 2 messages Mar 11, 2008 – Mar 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix methods in SrvDomain class for inactive managed domains

Hi,

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.

Best regards,
Kan

tools/python/xen/xend/server/SrvDomain.py +6 -6
diff -r 59b8768d0d0d tools/python/xen/xend/server/SrvDomain.py
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Re: [PATCH] Fix methods in SrvDomain class for inactivemanaged domains

Hi Keir,

Could you apply this patch for libvirt and virsh commands?

Best regards,
Kan

Quoted 10 lines · Masaki Kanno

Hi,

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.

Best regards,
Kan