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

[Xen-changelog] Fix call to XendCheckpoint.restore, since that method no longer needs a



# HG changeset patch
# User emellor@ewan
# Node ID 486f1c3e78052349f5014de609ad188caa73e519
# Parent  9918d8c3e116c96c46509a79300d4006b6a1c392
Fix call to XendCheckpoint.restore, since that method no longer needs a
XendDomain instance passed in.

Remove meaningless indirection of imports through web/reactor.py.  Tidy import
statements.

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

diff -r 9918d8c3e116 -r 486f1c3e7805 tools/python/xen/xend/server/event.py
--- a/tools/python/xen/xend/server/event.py     Fri Sep 30 16:10:52 2005
+++ b/tools/python/xen/xend/server/event.py     Sun Oct  2 17:17:26 2005
@@ -13,19 +13,25 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #============================================================================
 # Copyright (C) 2004, 2005 Mike Wray <mike.wray@xxxxxx>
+# Copyright (C) 2005 XenSource Ltd
 #============================================================================
 
 import sys
 import StringIO
 
-from xen.web import reactor, protocol
+from xen.web import protocol, tcp, unix
 
 from xen.xend import scheduler
 from xen.xend import sxp
 from xen.xend import PrettyPrint
-from xen.xend import EventServer; eserver = EventServer.instance()
+from xen.xend import EventServer
 from xen.xend.XendError import XendError
-from xen.xend import XendRoot; xroot = XendRoot.instance()
+from xen.xend import XendRoot
+
+
+eserver = EventServer.instance()
+xroot = XendRoot.instance()
+
 
 DEBUG = 0
 
@@ -210,8 +216,8 @@
     factory = EventFactory(daemon)
     if xroot.get_xend_unix_server():
         path = '/var/lib/xend/event-socket'
-        reactor.listenUNIX(path, factory)
+        unix.listenUNIX(path, factory)
     if xroot.get_xend_http_server():
         port = xroot.get_xend_event_port()
         interface = xroot.get_xend_address()
-        reactor.listenTCP(port, factory, interface=interface)
+        tcp.listenTCP(port, factory, interface=interface)
diff -r 9918d8c3e116 -r 486f1c3e7805 tools/python/xen/xend/server/relocate.py
--- a/tools/python/xen/xend/server/relocate.py  Fri Sep 30 16:10:52 2005
+++ b/tools/python/xen/xend/server/relocate.py  Sun Oct  2 17:17:26 2005
@@ -13,21 +13,27 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #============================================================================
 # Copyright (C) 2004, 2005 Mike Wray <mike.wray@xxxxxx>
+# Copyright (C) 2005 XenSource Ltd
 #============================================================================
 
 import socket
 import sys
 import StringIO
 
-from xen.web import reactor, protocol
+from xen.web import protocol, tcp, unix
 
 from xen.xend import scheduler
 from xen.xend import sxp
-from xen.xend import EventServer; eserver = EventServer.instance()
+from xen.xend import EventServer
 from xen.xend.XendError import XendError
-from xen.xend import XendRoot; xroot = XendRoot.instance()
+from xen.xend import XendRoot
 from xen.xend.XendLogging import log
 from xen.xend import XendCheckpoint
+
+
+eserver = EventServer.instance()
+xroot = XendRoot.instance()
+
 
 DEBUG = 0
 
@@ -114,8 +120,7 @@
         if self.transport:
             self.send_reply(["ready", name])
             self.transport.sock.setblocking(1)
-            xd = xroot.get_component("xen.xend.XendDomain")
-            XendCheckpoint.restore(xd, self.transport.sock.fileno())
+            XendCheckpoint.restore(self.transport.sock.fileno())
             self.transport.sock.setblocking(0)
         else:
             log.error(name + ": no transport")
@@ -136,11 +141,11 @@
     factory = RelocationFactory()
     if xroot.get_xend_unix_server():
         path = '/var/lib/xend/relocation-socket'
-        reactor.listenUNIX(path, factory)
+        unix.listenUNIX(path, factory)
     if xroot.get_xend_relocation_server():
         port = xroot.get_xend_relocation_port()
         interface = xroot.get_xend_relocation_address()
-        l = reactor.listenTCP(port, factory, interface=interface)
+        l = tcp.listenTCP(port, factory, interface=interface)
         l.setCloExec()
 
 def setupRelocation(dst, port):
diff -r 9918d8c3e116 -r 486f1c3e7805 tools/python/xen/web/reactor.py
--- a/tools/python/xen/web/reactor.py   Fri Sep 30 16:10:52 2005
+++ /dev/null   Sun Oct  2 17:17:26 2005
@@ -1,19 +0,0 @@
-#============================================================================
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of version 2.1 of the GNU Lesser General Public
-# License as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#============================================================================
-# Copyright (C) 2005 Mike Wray <mike.wray@xxxxxx>
-#============================================================================
-
-from unix import listenUNIX, connectUNIX
-from tcp import listenTCP, connectTCP, SetCloExec

_______________________________________________
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®.