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@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-10-02 18:17:26 +01:00
1 parent a1eea1f7e2
commit f578bafffd
3 files changed
+23 -31

No files matched your search

-19
View File
@@ -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@hp.com>
#============================================================================
from unix import listenUNIX, connectUNIX
from tcp import listenTCP, connectTCP, SetCloExec
+11 -5
View File
@@ -13,19 +13,25 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#============================================================================
# Copyright (C) 2004, 2005 Mike Wray <mike.wray@hp.com>
# 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 @@ def listenEvent(daemon):
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)
+12 -7
View File
@@ -13,22 +13,28 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#============================================================================
# Copyright (C) 2004, 2005 Mike Wray <mike.wray@hp.com>
# 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
class RelocationProtocol(protocol.Protocol):
@@ -114,8 +120,7 @@ class RelocationProtocol(protocol.Protocol):
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 @@ def listenRelocation():
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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.