Remove temporary get_new_servers_responding().
return [(s.get_serverid(), SI, shnum)
for (s, SI, shnum) in self._list_incompatible_shares]
- def get_new_servers_responding(self):
- return self._servers_responding
def get_servers_responding(self):
- return [s.get_serverid() for s in self._servers_responding]
+ return self._servers_responding
def get_host_counter_good_shares(self):
return self._count_good_share_hosts
# prr (post-repair results)
verifycap = self._verifycap
- servers_responding = set(cr.get_new_servers_responding())
+ servers_responding = set(cr.get_servers_responding())
sm = DictOfSets()
assert isinstance(cr.get_sharemap(), DictOfSets)
for shnum, servers in cr.get_sharemap().items():
(serverid, storage_index, sharenum)."""
def get_servers_responding():
- """Return a list of (binary) storage server identifiers, one for each
- server which responded to the share query (even if they said they
- didn't have shares, and even if they said they did have shares but
- then didn't send them when asked, or dropped the connection, or
- returned a Failure, and even if they said they did have shares and
- sent incorrect ones when asked)"""
+ """Return a list of IServer objects, one for each server which
+ responded to the share query (even if they said they didn't have
+ shares, and even if they said they did have shares but then didn't
+ send them when asked, or dropped the connection, or returned a
+ Failure, and even if they said they did have shares and sent
+ incorrect ones when asked)"""
def get_host_counter_good_shares():
"""Return the number of distinct storage servers with good shares. If
num_servers, where)
self.failUnlessEqual(cr.get_corrupt_shares(), [], where)
if not incomplete:
- self.failUnlessEqual(sorted(cr.get_servers_responding()),
+ self.failUnlessEqual(sorted([s.get_serverid()
+ for s in cr.get_servers_responding()]),
sorted(self.g.get_all_serverids()),
where)
all_serverids = set()
# not respond to the pre-repair filecheck
prr = rr.get_post_repair_results()
expected = set(self.g.get_all_serverids())
- self.failUnlessEqual(expected, set(prr.get_servers_responding()))
+ self.failUnlessEqual(expected,
+ set([s.get_serverid()
+ for s in prr.get_servers_responding()]))
d.addCallback(_check)
return d
base32.b2a(si), shnum)
for (serverid, si, shnum)
in r.get_corrupt_shares() ],
- "servers-responding": [idlib.nodeid_b2a(serverid)
- for serverid in r.get_servers_responding()],
+ "servers-responding": [s.get_longname()
+ for s in r.get_servers_responding()],
"sharemap": dict([(shareid,
sorted([s.get_longname() for s in servers]))
for (shareid, servers)