[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] XendDomainInfo.refreshShutdown is called from image.py.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.