ia64/xen-unstable

changeset 17736:9df61d6601ba

xend: add a reset button to Web interface.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 27 10:31:25 2008 +0100 (2008-05-27)
parents eafb252f1412
children 80ee45e007e1
files tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Mon May 26 08:53:25 2008 +0100
     1.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Tue May 27 10:31:25 2008 +0100
     1.3 @@ -218,6 +218,11 @@ class SrvDomain(SrvDir):
     1.4          return self.call(self.dom.getVCPUInfo, [], req)
     1.5  
     1.6  
     1.7 +    def op_reset(self, _, req):
     1.8 +        self.acceptCommand(req)
     1.9 +        return self.xd.domain_reset(self.dom.getName())
    1.10 +
    1.11 +
    1.12      def render_POST(self, req):
    1.13          return self.perform(req)
    1.14          
    1.15 @@ -258,6 +263,10 @@ class SrvDomain(SrvDir):
    1.16          req.write('</form>')
    1.17  
    1.18          req.write('<form method="post" action="%s">' % url)
    1.19 +        req.write('<input type="submit" name="op" value="reset">')
    1.20 +        req.write('</form>')
    1.21 +
    1.22 +        req.write('<form method="post" action="%s">' % url)
    1.23          req.write('<input type="submit" name="op" value="shutdown">')
    1.24          req.write('<input type="radio" name="reason" value="poweroff" checked>Poweroff')
    1.25          req.write('<input type="radio" name="reason" value="halt">Halt')