From c77eace162b17f4cd8bf654fe5f99a2fa321a9fe Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Thu, 22 Mar 2007 14:39:30 -0700 Subject: [PATCH] separate queen's service of introduction-to-the-network from queen's service of providing-access-to-the-vdrive --- src/allmydata/client.py | 1 + src/allmydata/interfaces.py | 4 ++++ src/allmydata/queen.py | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/allmydata/client.py b/src/allmydata/client.py index f0b3927b..994fa6d9 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -96,6 +96,7 @@ class Client(node.Node, Referenceable): nodeid=self.nodeid, node=self, pburl=self.my_pburl) + d.addCallback(lambda x: queen.callRemote("get_global_vdrive")) d.addCallback(self._got_vdrive_root) def _got_vdrive_root(self, root): diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index c1c5a372..5da76b9c 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -19,7 +19,11 @@ RIMutableFileNode_ = Any() class RIQueenRoster(RemoteInterface): def hello(nodeid=Nodeid, node=RIClient_, pburl=PBURL): + return None + + def get_global_vdrive(): return RIMutableDirectoryNode_ # the virtual drive root + class RIClient(RemoteInterface): def get_service(name=str): diff --git a/src/allmydata/queen.py b/src/allmydata/queen.py index aff8ee76..2cec7c84 100644 --- a/src/allmydata/queen.py +++ b/src/allmydata/queen.py @@ -39,6 +39,8 @@ class Roster(service.MultiService, Referenceable): eventually(self._announce_new_peer, nodeid, pburl, list(self.connections.values())) node.notifyOnDisconnect(self._lost_node, nodeid) + + def remote_get_global_vdrive(self): return self.gvd_root def _educate_the_new_peer(self, nodeid, node, new_peers): -- 2.45.2