ia64/xen-unstable

changeset 7674:f2202af64023

Mark plenty of variables as unused, and remove an unused import.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Tue Nov 08 02:51:34 2005 +0100 (2005-11-08)
parents dcfbfae87f6c
children eafd932231ae
files tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Tue Nov 08 01:26:16 2005 +0100
     1.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Tue Nov 08 02:51:34 2005 +0100
     1.3 @@ -19,7 +19,6 @@ from xen.web import http
     1.4  
     1.5  from xen.xend import sxp
     1.6  from xen.xend import XendDomain
     1.7 -from xen.xend import PrettyPrint
     1.8  from xen.xend.Args import FormFn
     1.9  
    1.10  from xen.web.SrvDir import SrvDir
    1.11 @@ -33,7 +32,7 @@ class SrvDomain(SrvDir):
    1.12          self.dom = dom
    1.13          self.xd = XendDomain.instance()
    1.14  
    1.15 -    def op_configure(self, op, req):
    1.16 +    def op_configure(self, _, req):
    1.17          """Configure an existing domain.
    1.18          Configure is unusual in that it requires a domain id,
    1.19          not a domain name.
    1.20 @@ -43,11 +42,11 @@ class SrvDomain(SrvDir):
    1.21                       ['config', 'sxpr']])
    1.22          return fn(req.args, {'dom': self.dom.domid})
    1.23  
    1.24 -    def op_unpause(self, op, req):
    1.25 +    def op_unpause(self, _1, _2):
    1.26          val = self.xd.domain_unpause(self.dom.domid)
    1.27          return val
    1.28          
    1.29 -    def op_pause(self, op, req):
    1.30 +    def op_pause(self, _1, _2):
    1.31          val = self.xd.domain_pause(self.dom.domid)
    1.32          return val
    1.33  
    1.34 @@ -55,15 +54,15 @@ class SrvDomain(SrvDir):
    1.35          req.setResponseCode(http.ACCEPTED)
    1.36          req.setHeader("Location", "%s/.." % req.prePathURL())
    1.37  
    1.38 -    def op_shutdown(self, op, req):
    1.39 +    def op_shutdown(self, _, req):
    1.40          self.acceptCommand(req)
    1.41          return self.dom.shutdown(req.args['reason'][0])
    1.42  
    1.43 -    def op_sysrq(self, op, req):
    1.44 +    def op_sysrq(self, _, req):
    1.45          self.acceptCommand(req)
    1.46          return self.dom.send_sysrq(int(req.args['key'][0]))
    1.47  
    1.48 -    def op_destroy(self, op, req):
    1.49 +    def op_destroy(self, _, req):
    1.50          self.acceptCommand(req)
    1.51          return self.xd.domain_destroy(self.dom.domid)
    1.52  
    1.53 @@ -71,13 +70,13 @@ class SrvDomain(SrvDir):
    1.54          self.acceptCommand(req)
    1.55          return req.threadRequest(self.do_save, op, req)
    1.56  
    1.57 -    def do_save(self, op, req):
    1.58 +    def do_save(self, _, req):
    1.59          return self.xd.domain_save(self.dom.domid, req.args['file'][0])
    1.60  
    1.61      def op_migrate(self, op, req):
    1.62          return req.threadRequest(self.do_migrate, op, req)
    1.63      
    1.64 -    def do_migrate(self, op, req):
    1.65 +    def do_migrate(self, _, req):
    1.66          fn = FormFn(self.xd.domain_migrate,
    1.67                      [['dom',         'int'],
    1.68                       ['destination', 'str'],
    1.69 @@ -85,7 +84,7 @@ class SrvDomain(SrvDir):
    1.70                       ['resource',    'int']])
    1.71          return fn(req.args, {'dom': self.dom.domid})
    1.72  
    1.73 -    def op_pincpu(self, op, req):
    1.74 +    def op_pincpu(self, _, req):
    1.75          fn = FormFn(self.xd.domain_pincpu,
    1.76                      [['dom', 'int'],
    1.77                       ['vcpu', 'int'],
    1.78 @@ -93,7 +92,7 @@ class SrvDomain(SrvDir):
    1.79          val = fn(req.args, {'dom': self.dom.domid})
    1.80          return val
    1.81  
    1.82 -    def op_cpu_bvt_set(self, op, req):
    1.83 +    def op_cpu_bvt_set(self, _, req):
    1.84          fn = FormFn(self.xd.domain_cpu_bvt_set,
    1.85                      [['dom',       'int'],
    1.86                       ['mcuadv',    'int'],
    1.87 @@ -105,14 +104,14 @@ class SrvDomain(SrvDir):
    1.88          return val
    1.89      
    1.90      
    1.91 -    def op_cpu_sedf_get(self, op, req):
    1.92 +    def op_cpu_sedf_get(self, _, req):
    1.93          fn = FormFn(self.xd.domain_cpu_sedf_get,
    1.94                      [['dom', 'int']])
    1.95          val = fn(req.args, {'dom': self.dom.domid})
    1.96          return val
    1.97  
    1.98  
    1.99 -    def op_cpu_sedf_set(self, op, req):
   1.100 +    def op_cpu_sedf_set(self, _, req):
   1.101          fn = FormFn(self.xd.domain_cpu_sedf_set,
   1.102                      [['dom', 'int'],
   1.103                       ['period', 'int'],
   1.104 @@ -123,7 +122,7 @@ class SrvDomain(SrvDir):
   1.105          val = fn(req.args, {'dom': self.dom.domid})
   1.106          return val
   1.107  
   1.108 -    def op_maxmem_set(self, op, req):
   1.109 +    def op_maxmem_set(self, _, req):
   1.110          fn = FormFn(self.xd.domain_maxmem_set,
   1.111                      [['dom',    'int'],
   1.112                       ['memory', 'int']])
   1.113 @@ -135,35 +134,35 @@ class SrvDomain(SrvDir):
   1.114          return FormFn(fn, args)(req.args)
   1.115  
   1.116  
   1.117 -    def op_mem_target_set(self, op, req):
   1.118 +    def op_mem_target_set(self, _, req):
   1.119          return self.call(self.dom.setMemoryTarget,
   1.120                           [['target', 'int']],
   1.121                           req)
   1.122  
   1.123 -    def op_devices(self, op, req):
   1.124 +    def op_devices(self, _, req):
   1.125          return self.call(self.dom.getDeviceSxprs,
   1.126                           [['type', 'str']],
   1.127                           req)
   1.128  
   1.129 -    def op_device_create(self, op, req):
   1.130 +    def op_device_create(self, _, req):
   1.131          return self.call(self.dom.device_create,
   1.132                           [['config', 'sxpr']],
   1.133                           req)
   1.134  
   1.135 -    def op_device_destroy(self, op, req):
   1.136 +    def op_device_destroy(self, _, req):
   1.137          return self.call(self.dom.destroyDevice,
   1.138                           [['type', 'str'],
   1.139                            ['dev',  'str']],
   1.140                           req)
   1.141                  
   1.142 -    def op_device_configure(self, op, req):
   1.143 +    def op_device_configure(self, _, req):
   1.144          return self.call(self.dom.device_configure,
   1.145                           [['config', 'sxpr'],
   1.146                            ['dev',    'str']],
   1.147                           req)
   1.148  
   1.149  
   1.150 -    def op_vif_limit_set(self, op, req):
   1.151 +    def op_vif_limit_set(self, _, req):
   1.152          fn = FormFn(self.xd.domain_vif_limit_set,
   1.153                      [['dom',    'int'],
   1.154                       ['vif',    'int'],
   1.155 @@ -172,7 +171,7 @@ class SrvDomain(SrvDir):
   1.156          val = fn(req.args, {'dom': self.dom.domid})
   1.157          return val
   1.158  
   1.159 -    def op_set_vcpus(self, op, req):
   1.160 +    def op_set_vcpus(self, _, req):
   1.161          return self.call(self.dom.setVCpuCount,
   1.162                           [['vcpus', 'int']],
   1.163                           req)