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] [xen-unstable] [XEND] XendDomainInfo.refreshShutdown is

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] XendDomainInfo.refreshShutdown is called from image.py.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Nov 2006 16:50:28 +0000
Delivery-date: Mon, 06 Nov 2006 08:52:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID b5c50a603044be3b2cd5081ac0a8a7c109469640
# Parent  e5067f9b268fc339ec28767ad50e51aad5f3b74a
[XEND] XendDomainInfo.refreshShutdown is called from image.py.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff -r e5067f9b268f -r b5c50a603044 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 03 15:15:16 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 03 15:17:00 2006 +0000
@@ -228,7 +228,7 @@ def recreate(info, priv):
         vm._storeDomDetails()
         
     vm._registerWatches()
-    vm._refreshShutdown(xeninfo)
+    vm.refreshShutdown(xeninfo)
     return vm
 
 
@@ -437,7 +437,7 @@ class XendDomainInfo:
                 self._storeVmDetails()
                 self._storeDomDetails()
                 self._registerWatches()
-                self._refreshShutdown()
+                self.refreshShutdown()
                 self.unpause()
 
                 # save running configuration if XendDomains believe domain is
@@ -773,7 +773,7 @@ class XendDomainInfo:
             log.trace(
                 "Scheduling refreshShutdown on domain %d in %ds.",
                 self.domid, timeout)
-            threading.Timer(timeout, self._refreshShutdown).start()
+            threading.Timer(timeout, self.refreshShutdown).start()
             
         return True
 
@@ -841,8 +841,11 @@ class XendDomainInfo:
     def getRestartCount(self):
         return self._readVm('xend/restart_count')
 
-    def _refreshShutdown(self, xeninfo = None):
-        """ Checks the domain for whether a shutdown is required. """
+    def refreshShutdown(self, xeninfo = None):
+        """ Checks the domain for whether a shutdown is required.
+
+        Called from XendDomainInfo and also image.py for HVM images.
+        """
         
         # If set at the end of this method, a restart is required, with the
         # given reason.  This restart has to be done out of the scope of
@@ -1387,7 +1390,7 @@ class XendDomainInfo:
         self._introduceDomain()
         self._storeDomDetails()
         self._registerWatches()
-        self._refreshShutdown()
+        self.refreshShutdown()
 
         log.debug("XendDomainInfo.completeRestore done")
 
@@ -1650,7 +1653,7 @@ class XendDomainInfo:
         self.info.validate()
 
         if refresh:
-            self._refreshShutdown(info)
+            self.refreshShutdown(info)
 
         log.trace("XendDomainInfo.update done on domain %s: %s",
                   str(self.domid), self.info)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] XendDomainInfo.refreshShutdown is called from image.py., Xen patchbot-unstable <=