WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Remove the reason code from the destroy action -- the re

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove the reason code from the destroy action -- the reason is only of value
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 04 Oct 2005 01:32:11 +0000
Delivery-date: Tue, 04 Oct 2005 01:29:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@ewan
# Node ID 600f3d2b78d63b606a88c5b4fa4aa049106ac0e7
# Parent  e6e5f22d19f890f9c973984ba612bc1171b24112
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@xxxxxxxxxxxxx>

diff -r e6e5f22d19f8 -r 600f3d2b78d6 tools/python/xen/sv/DomInfo.py
--- a/tools/python/xen/sv/DomInfo.py    Mon Oct  3 23:30:49 2005
+++ b/tools/python/xen/sv/DomInfo.py    Mon Oct  3 23:56:24 2005
@@ -139,7 +139,7 @@
         if not dom is None and dom != '0':
           if DEBUG: print ">DomShutDown %s" % dom
            try:
-               server.xend_domain_shutdown( int( dom ), "halt" )
+               server.xend_domain_shutdown( int( dom ), "poweroff" )
            except:
                pass
     
@@ -175,7 +175,7 @@
         if not dom is None and dom != '0':
           if DEBUG: print ">DomDestroy %s" % dom
            try:
-               server.xend_domain_destroy( int( dom ), "halt" )
+               server.xend_domain_destroy(int( dom ))
            except:
                pass
 
diff -r e6e5f22d19f8 -r 600f3d2b78d6 tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py       Mon Oct  3 23:30:49 2005
+++ b/tools/python/xen/xend/XendClient.py       Mon Oct  3 23:56:24 2005
@@ -232,10 +232,9 @@
                              {'op'      : 'sysrq',
                               'key'     : key})
 
-    def xend_domain_destroy(self, id, reason):
-        return self.xendPost(self.domainurl(id),
-                             {'op'      : 'destroy',
-                              'reason'  : reason })
+    def xend_domain_destroy(self, id):
+        return self.xendPost(self.domainurl(id),
+                             {'op'      : 'destroy' })
 
     def xend_domain_save(self, id, filename):
         return self.xendPost(self.domainurl(id),
diff -r e6e5f22d19f8 -r 600f3d2b78d6 tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Mon Oct  3 23:30:49 2005
+++ b/tools/python/xen/xend/server/SrvDomain.py Mon Oct  3 23:56:24 2005
@@ -71,8 +71,7 @@
 
     def op_destroy(self, op, req):
         fn = FormFn(self.xd.domain_destroy,
-                    [['dom',    'int'],
-                     ['reason', 'str']])
+                    [['dom',    'int']])
         val = fn(req.args, {'dom': self.dom.domid})
         req.setHeader("Location", "%s/.." % req.prePathURL())
         return val
@@ -232,8 +231,6 @@
 
         req.write('<form method="post" action="%s">' % url)
         req.write('<input type="submit" name="op" value="destroy">')
-        req.write('<input type="radio" name="reason" value="halt" 
checked>Halt')
-        req.write('<input type="radio" name="reason" value="reboot">Reboot')
         req.write('</form>')
 
         req.write('<form method="post" action="%s">' % url)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>