ia64/xen-unstable

changeset 7174:600f3d2b78d6

Remove the reason code from the destroy action -- the reason is only of value
on a graceful shutdown. Clarify the semantic difference between poweroff and
halt (we use halt to mean 'shutdown and stop' and poweroff to mean 'shutdown
and do whatever the configured behaviour is').

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Oct 04 00:56:24 2005 +0100 (2005-10-04)
parents e6e5f22d19f8
children c70829a6edac
files tools/python/xen/sv/DomInfo.py tools/python/xen/xend/XendClient.py tools/python/xen/xend/server/SrvDomain.py
line diff
     1.1 --- a/tools/python/xen/sv/DomInfo.py	Tue Oct 04 00:30:49 2005 +0100
     1.2 +++ b/tools/python/xen/sv/DomInfo.py	Tue Oct 04 00:56:24 2005 +0100
     1.3 @@ -139,7 +139,7 @@ class DomActionTab( ActionTab ):
     1.4          if not dom is None and dom != '0':
     1.5      	   if DEBUG: print ">DomShutDown %s" % dom
     1.6             try:
     1.7 -    	   	server.xend_domain_shutdown( int( dom ), "halt" )
     1.8 +    	   	server.xend_domain_shutdown( int( dom ), "poweroff" )
     1.9             except:
    1.10             	pass
    1.11      
    1.12 @@ -175,7 +175,7 @@ class DomActionTab( ActionTab ):
    1.13          if not dom is None and dom != '0':
    1.14      	   if DEBUG: print ">DomDestroy %s" % dom
    1.15             try:
    1.16 -           	server.xend_domain_destroy( int( dom ), "halt" )
    1.17 +           	server.xend_domain_destroy(int( dom ))
    1.18             except:
    1.19             	pass
    1.20  
     2.1 --- a/tools/python/xen/xend/XendClient.py	Tue Oct 04 00:30:49 2005 +0100
     2.2 +++ b/tools/python/xen/xend/XendClient.py	Tue Oct 04 00:56:24 2005 +0100
     2.3 @@ -232,10 +232,9 @@ class Xend:
     2.4                               {'op'      : 'sysrq',
     2.5                                'key'     : key})
     2.6  
     2.7 -    def xend_domain_destroy(self, id, reason):
     2.8 +    def xend_domain_destroy(self, id):
     2.9          return self.xendPost(self.domainurl(id),
    2.10 -                             {'op'      : 'destroy',
    2.11 -                              'reason'  : reason })
    2.12 +                             {'op'      : 'destroy' })
    2.13  
    2.14      def xend_domain_save(self, id, filename):
    2.15          return self.xendPost(self.domainurl(id),
     3.1 --- a/tools/python/xen/xend/server/SrvDomain.py	Tue Oct 04 00:30:49 2005 +0100
     3.2 +++ b/tools/python/xen/xend/server/SrvDomain.py	Tue Oct 04 00:56:24 2005 +0100
     3.3 @@ -71,8 +71,7 @@ class SrvDomain(SrvDir):
     3.4  
     3.5      def op_destroy(self, op, req):
     3.6          fn = FormFn(self.xd.domain_destroy,
     3.7 -                    [['dom',    'int'],
     3.8 -                     ['reason', 'str']])
     3.9 +                    [['dom',    'int']])
    3.10          val = fn(req.args, {'dom': self.dom.domid})
    3.11          req.setHeader("Location", "%s/.." % req.prePathURL())
    3.12          return val
    3.13 @@ -232,8 +231,6 @@ class SrvDomain(SrvDir):
    3.14  
    3.15          req.write('<form method="post" action="%s">' % url)
    3.16          req.write('<input type="submit" name="op" value="destroy">')
    3.17 -        req.write('<input type="radio" name="reason" value="halt" checked>Halt')
    3.18 -        req.write('<input type="radio" name="reason" value="reboot">Reboot')
    3.19          req.write('</form>')
    3.20  
    3.21          req.write('<form method="post" action="%s">' % url)