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 parameter from XendDomain.destroy -- i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove the reason parameter from XendDomain.destroy -- it is useless. Accept
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 03 Oct 2005 23:46:11 +0000
Delivery-date: Mon, 03 Oct 2005 23:43:44 +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 e6e5f22d19f890f9c973984ba612bc1171b24112
# Parent  cc998831741663583b64fc4c05f7d8f610a478aa
Remove the reason parameter from XendDomain.destroy -- it is useless.  Accept
the halt shutdown reason inside XendDomainInfo.  This indicates that the
domain should be shutdown just like a poweroff, except that the domain is not
restarted, regardless of the on_poweroff configuration setting.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r cc9988317416 -r e6e5f22d19f8 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Oct  3 23:21:49 2005
+++ b/tools/python/xen/xend/XendDomain.py       Mon Oct  3 23:30:49 2005
@@ -316,16 +316,10 @@
             raise XendError(str(ex))
 
 
-    def domain_shutdown(self, domid, reason='poweroff'):
+    def domain_shutdown(self, domid, reason = 'poweroff'):
         """Shutdown domain (nicely).
-         - poweroff: restart according to exit code and restart mode
-         - reboot:   restart on exit
-         - halt:     do not restart
-
-         Returns immediately.
-
-        @param id:     domain id
-        @param reason: shutdown type: poweroff, reboot, suspend, halt
+
+        @param reason: shutdown reason: poweroff, reboot, suspend, halt
         """
         self.callInfo(domid, XendDomainInfo.shutdown, reason)
 
@@ -335,13 +329,8 @@
         return self.callInfo(domid, XendDomainInfo.send_sysrq, key)
 
 
-    def domain_destroy(self, domid, reason='halt'):
-        """Terminate domain immediately.
-        - halt:   cancel any restart for the domain
-        - reboot  schedule a restart for the domain
-
-        @param domid: domain id
-        """
+    def domain_destroy(self, domid):
+        """Terminate domain immediately."""
 
         if domid == PRIV_DOMAIN:
             raise XendError("Cannot destroy privileged domain %i" % domid)
diff -r cc9988317416 -r e6e5f22d19f8 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Oct  3 23:21:49 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Oct  3 23:30:49 2005
@@ -59,12 +59,16 @@
 """Shutdown code for crash."""
 DOMAIN_CRASH    = 3
 
+"""Shutdown code for halt."""
+DOMAIN_HALT     = 4
+
 """Map shutdown codes to strings."""
 shutdown_reasons = {
     DOMAIN_POWEROFF: "poweroff",
     DOMAIN_REBOOT  : "reboot",
     DOMAIN_SUSPEND : "suspend",
     DOMAIN_CRASH   : "crash",
+    DOMAIN_HALT    : "halt"
     }
 
 restart_modes = [

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove the reason parameter from XendDomain.destroy -- it is useless. Accept, Xen patchbot -unstable <=