ia64/xen-unstable

changeset 7114:5b296b8d05ab

Change device IDs to be integers, as required now by DevController. Remove
unused op_device. Remove broken code to show the domain configuration using
the HTTP server.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Wed Sep 28 16:59:13 2005 +0100 (2005-09-28)
parents da98f8956925
children 23a3241f0ee7
files tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Wed Sep 28 15:09:45 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Wed Sep 28 16:59:13 2005 +0100
     1.3 @@ -150,17 +150,6 @@ class SrvDomain(SrvDir):
     1.4          val = fn(req.args, {'dom': self.dom.domid})
     1.5          return val
     1.6  
     1.7 -    def op_device(self, op, req):
     1.8 -        fn = FormFn(self.xd.domain_devtype_get,
     1.9 -                    [['dom',    'int'],
    1.10 -                     ['type',   'str'],
    1.11 -                     ['idx',    'int']])
    1.12 -        val = fn(req.args, {'dom': self.dom.domid})
    1.13 -        if val:
    1.14 -            return val.sxpr()
    1.15 -        else:
    1.16 -            raise XendError("invalid device")
    1.17 -
    1.18      def op_device_create(self, op, req):
    1.19          fn = FormFn(self.xd.domain_device_create,
    1.20                      [['dom',    'int'],
    1.21 @@ -172,7 +161,7 @@ class SrvDomain(SrvDir):
    1.22          fn = FormFn(self.xd.domain_device_refresh,
    1.23                      [['dom',  'int'],
    1.24                       ['type', 'str'],
    1.25 -                     ['idx',  'str']])
    1.26 +                     ['idx',  'int']])
    1.27          val = fn(req.args, {'dom': self.dom.domid})
    1.28          return val
    1.29  
    1.30 @@ -180,7 +169,7 @@ class SrvDomain(SrvDir):
    1.31          fn = FormFn(self.xd.domain_device_destroy,
    1.32                      [['dom',  'int'],
    1.33                       ['type', 'str'],
    1.34 -                     ['idx',  'str']])
    1.35 +                     ['idx',  'int']])
    1.36          val = fn(req.args, {'dom': self.dom.domid})
    1.37          return val
    1.38                  
    1.39 @@ -188,7 +177,7 @@ class SrvDomain(SrvDir):
    1.40          fn = FormFn(self.xd.domain_device_configure,
    1.41                      [['dom',    'int'],
    1.42                       ['config', 'sxpr'],
    1.43 -                     ['idx',    'str']])
    1.44 +                     ['idx',    'int']])
    1.45          val = fn(req.args, {'dom': self.dom.domid})
    1.46          return val
    1.47  
    1.48 @@ -230,10 +219,6 @@ class SrvDomain(SrvDir):
    1.49              self.print_path(req)
    1.50              #self.ls()
    1.51              req.write('<p>%s</p>' % self.dom)
    1.52 -            if self.dom.config:
    1.53 -                req.write("<code><pre>")
    1.54 -                PrettyPrint.prettyprint(self.dom.config, out=req)
    1.55 -                req.write("</pre></code>")
    1.56              self.form(req)
    1.57              req.write('</body></html>')
    1.58          return ''