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] Move variable initialisation out of import section. Remo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Move variable initialisation out of import section. Remove obsolete save
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 17:16:11 +0000
Delivery-date: Thu, 22 Sep 2005 17:14:43 +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 2f83ff9f6bd2a7987c297b84bfce1f8e22409cae
# Parent  40a0f049e344e7704d24c669e65d07dc87c6efc8
Move variable initialisation out of import section.  Remove obsolete save
parameter from XendDominInfo.exportToDB.

diff -r 40a0f049e344 -r 2f83ff9f6bd2 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Sep 22 16:58:43 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Sep 22 17:03:16 2005
@@ -23,13 +23,13 @@
 """
 import os
 
-import xen.lowlevel.xc; xc = xen.lowlevel.xc.new()
+import xen.lowlevel.xc
 
 from xen.xend import sxp
-from xen.xend import XendRoot; xroot = XendRoot.instance()
+from xen.xend import XendRoot
 from xen.xend import XendCheckpoint
 from xen.xend.XendDomainInfo import XendDomainInfo, shutdown_reason
-from xen.xend import EventServer; eserver = EventServer.instance()
+from xen.xend import EventServer
 from xen.xend.XendError import XendError
 from xen.xend.XendLogging import log
 from xen.xend import scheduler
@@ -38,6 +38,12 @@
 from xen.xend.xenstore import XenNode, DBMap
 from xen.xend.xenstore.xstransact import xstransact
 from xen.xend.xenstore.xsutil import GetDomainPath
+
+
+xc = xen.lowlevel.xc.new()
+xroot = XendRoot.instance()
+eserver = EventServer.instance()
+
 
 __all__ = [ "XendDomain" ]
 
@@ -182,7 +188,7 @@
         if info.getDomid() in self.domains:
             notify = False
         self.domains[info.getDomid()] = info
-        info.exportToDB(save=True)
+        info.exportToDB()
         if notify:
             eserver.inject('xend.domain.create', [info.getName(),
                                                   info.getDomid()])
diff -r 40a0f049e344 -r 2f83ff9f6bd2 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Sep 22 16:58:43 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Sep 22 17:03:16 2005
@@ -444,7 +444,7 @@
         return xstransact.Store(self.path, *args)
 
 
-    def exportToDB(self, save=False):
+    def exportToDB(self):
         to_store = {
             'domid':              str(self.domid),
             'uuid':               self.uuid,
@@ -718,7 +718,7 @@
             # Create domain devices.
             self.construct_image()
             self.configure()
-            self.exportToDB(save=True)
+            self.exportToDB()
         except Exception, ex:
             # Catch errors, cleanup and re-raise.
             print 'Domain construction error:', ex
@@ -739,7 +739,7 @@
                                       ssidref = self.info['ssidref'])
         if self.domid <= 0:
             raise VmError('Creating domain failed: name=%s' %
-                          self.vm.getName())
+                          self.info['name'])
 
         if self.info['bootloader']:
             self.image.handleBootloading()

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Move variable initialisation out of import section. Remove obsolete save, Xen patchbot -unstable <=