Added sedf_get functionality to XendClient interface. From David Isaac

Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2005-10-19 13:33:22 +01:00
1 parent 963785e3ee
commit db6435aaa8
3 files changed
+18 -6

No files matched your search

+7 -6
View File
@@ -739,8 +739,8 @@ static PyObject *pyxc_xeninfo(PyObject *self,
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_set(PyObject *self,
}
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 @@ static PyObject *pyxc_sedf_domain_get(PyObject *self,
&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,
+4
View File
@@ -269,6 +269,10 @@ class Xend:
'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),
{'op' : 'cpu_sedf_set',
@@ -105,6 +105,13 @@ class SrvDomain(SrvDir):
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'],
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.