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

[Xen-changelog] Added sedf_get functionality to XendClient interface. From David Isaac



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID b556130d3c6c3dfbef9194d564227bc8b438dcc1
# Parent  7c951e3eb5ab4ab0a6de33a8f831c828d16b1ad4
Added sedf_get functionality to XendClient interface.  From David Isaac
Wolinsky <davidiw@xxxxxxx>.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 7c951e3eb5ab -r b556130d3c6c tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Oct 19 10:53:00 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Oct 19 12:33:22 2005
@@ -739,8 +739,8 @@
 
 
 static PyObject *pyxc_sedf_domain_set(PyObject *self,
-                                         PyObject *args,
-                                         PyObject *kwds)
+                                      PyObject *args,
+                                      PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
     uint32_t domid;
@@ -762,8 +762,8 @@
 }
 
 static PyObject *pyxc_sedf_domain_get(PyObject *self,
-                                         PyObject *args,
-                                         PyObject *kwds)
+                                      PyObject *args,
+                                      PyObject *kwds)
 {
     XcObject *xc = (XcObject *)self;
     uint32_t domid;
@@ -779,12 +779,13 @@
                                 &slice,&latency,&extratime,&weight) )
         return PyErr_SetFromErrno(xc_error);
 
-    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}",
+    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i,s:i}",
                          "domain",    domid,
                          "period",    period,
                          "slice",     slice,
                         "latency",   latency,
-                        "extratime", extratime);
+                        "extratime", extratime,
+                         "weight",    weight);
 }
 
 static PyObject *pyxc_domain_setmaxmem(PyObject *self,
diff -r 7c951e3eb5ab -r b556130d3c6c tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py       Wed Oct 19 10:53:00 2005
+++ b/tools/python/xen/xend/XendClient.py       Wed Oct 19 12:33:22 2005
@@ -268,6 +268,10 @@
                               'warpvalue': warpvalue,
                               'warpl'    : warpl,
                               'warpu'    : warpu })
+
+    def xend_domain_cpu_sedf_get(self, id):
+        return self.xendPost(self.domainurl(id),
+                             {'op' : 'cpu_sedf_get'})
 
     def xend_domain_cpu_sedf_set(self, id, period, slice, latency, extratime, 
weight):
         return self.xendPost(self.domainurl(id),
diff -r 7c951e3eb5ab -r b556130d3c6c tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Wed Oct 19 10:53:00 2005
+++ b/tools/python/xen/xend/server/SrvDomain.py Wed Oct 19 12:33:22 2005
@@ -105,6 +105,13 @@
         return val
     
     
+    def op_cpu_sedf_get(self, op, req):
+        fn = FormFn(self.xd.domain_cpu_sedf_get,
+                    [['dom', 'int']])
+        val = fn(req.args, {'dom': self.dom.domid})
+        return val
+
+
     def op_cpu_sedf_set(self, op, req):
         fn = FormFn(self.xd.domain_cpu_sedf_set,
                     [['dom', 'int'],

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