ia64/xen-unstable

changeset 7436:b556130d3c6c

Added sedf_get functionality to XendClient interface. From David Isaac
Wolinsky <davidiw@ufl.edu>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Oct 19 13:33:22 2005 +0100 (2005-10-19)
parents 7c951e3eb5ab
children 74f693d6e03e
files tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendClient.py tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Wed Oct 19 11:53:00 2005 +0100
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Wed Oct 19 13:33:22 2005 +0100
     1.3 @@ -739,8 +739,8 @@ static PyObject *pyxc_xeninfo(PyObject *
     1.4  
     1.5  
     1.6  static PyObject *pyxc_sedf_domain_set(PyObject *self,
     1.7 -                                         PyObject *args,
     1.8 -                                         PyObject *kwds)
     1.9 +                                      PyObject *args,
    1.10 +                                      PyObject *kwds)
    1.11  {
    1.12      XcObject *xc = (XcObject *)self;
    1.13      uint32_t domid;
    1.14 @@ -762,8 +762,8 @@ static PyObject *pyxc_sedf_domain_set(Py
    1.15  }
    1.16  
    1.17  static PyObject *pyxc_sedf_domain_get(PyObject *self,
    1.18 -                                         PyObject *args,
    1.19 -                                         PyObject *kwds)
    1.20 +                                      PyObject *args,
    1.21 +                                      PyObject *kwds)
    1.22  {
    1.23      XcObject *xc = (XcObject *)self;
    1.24      uint32_t domid;
    1.25 @@ -779,12 +779,13 @@ static PyObject *pyxc_sedf_domain_get(Py
    1.26                                  &slice,&latency,&extratime,&weight) )
    1.27          return PyErr_SetFromErrno(xc_error);
    1.28  
    1.29 -    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}",
    1.30 +    return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i,s:i}",
    1.31                           "domain",    domid,
    1.32                           "period",    period,
    1.33                           "slice",     slice,
    1.34  			 "latency",   latency,
    1.35 -			 "extratime", extratime);
    1.36 +			 "extratime", extratime,
    1.37 +                         "weight",    weight);
    1.38  }
    1.39  
    1.40  static PyObject *pyxc_domain_setmaxmem(PyObject *self,
     2.1 --- a/tools/python/xen/xend/XendClient.py	Wed Oct 19 11:53:00 2005 +0100
     2.2 +++ b/tools/python/xen/xend/XendClient.py	Wed Oct 19 13:33:22 2005 +0100
     2.3 @@ -269,6 +269,10 @@ class Xend:
     2.4                                'warpl'    : warpl,
     2.5                                'warpu'    : warpu })
     2.6  
     2.7 +    def xend_domain_cpu_sedf_get(self, id):
     2.8 +        return self.xendPost(self.domainurl(id),
     2.9 +                             {'op' : 'cpu_sedf_get'})
    2.10 +
    2.11      def xend_domain_cpu_sedf_set(self, id, period, slice, latency, extratime, weight):
    2.12          return self.xendPost(self.domainurl(id),
    2.13                               {'op'        : 'cpu_sedf_set',
     3.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Wed Oct 19 11:53:00 2005 +0100
     3.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Wed Oct 19 13:33:22 2005 +0100
     3.3 @@ -105,6 +105,13 @@ class SrvDomain(SrvDir):
     3.4          return val
     3.5      
     3.6      
     3.7 +    def op_cpu_sedf_get(self, op, req):
     3.8 +        fn = FormFn(self.xd.domain_cpu_sedf_get,
     3.9 +                    [['dom', 'int']])
    3.10 +        val = fn(req.args, {'dom': self.dom.domid})
    3.11 +        return val
    3.12 +
    3.13 +
    3.14      def op_cpu_sedf_set(self, op, req):
    3.15          fn = FormFn(self.xd.domain_cpu_sedf_set,
    3.16                      [['dom', 'int'],