def get_all_peerids(self):
return self.introducer_client.get_all_peerids()
+ def get_nickname_for_peerid(self, peerid):
+ return self.introducer_client.get_nickname_for_peerid(peerid)
def get_permuted_peers(self, service_name, key):
"""
for (peerid, service_name, rref)
in self._connections])
+ def get_nickname_for_peerid(self, peerid):
+ for k in self._connectors:
+ (peerid0, svcname0) = k
+ if peerid0 == peerid:
+ rsc = self._connectors[k]
+ return rsc.nickname
+ return None
+
def get_all_connections_for(self, service_name):
return frozenset([c
for c in self._connections
for (peerid, service_name, rref)
in self._connections])
+ def get_nickname_for_peerid(self, peerid):
+ for k in self._connectors:
+ (peerid0, svcname0) = k
+ if peerid0 == peerid:
+ rsc = self._connectors[k]
+ return rsc.nickname
+ return None
+
def get_all_connections_for(self, service_name):
return frozenset([c
for c in self._connections
self.failUnlessEqual(len(c.get_all_peerids()), NUMCLIENTS)
self.failUnlessEqual(len(c.get_all_connections_for("storage")),
NUMCLIENTS)
+ nodeid0 = b32decode(tubs[clients[0]].tubID.upper())
+ self.failUnlessEqual(c.get_nickname_for_peerid(nodeid0),
+ "nickname-0")
d.addCallback(_check1)
origin_c = clients[0]