mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-15 14:46:37 +00:00
dirnode: add get_repair_cap()
This commit is contained in:
parent
94ab90273d
commit
72adeccf2d
src/allmydata
@ -226,6 +226,11 @@ class NewDirectoryNode:
|
||||
def get_verify_cap(self):
|
||||
return self._uri.get_verify_cap()
|
||||
|
||||
def get_repair_cap(self):
|
||||
if self._node.is_readonly():
|
||||
return None
|
||||
return self._uri
|
||||
|
||||
def get_storage_index(self):
|
||||
return self._uri._filenode_uri.storage_index
|
||||
|
||||
|
@ -297,6 +297,8 @@ class Dirnode(unittest.TestCase,
|
||||
self.failUnless(u_ro.startswith("URI:DIR2-RO:"), u_ro)
|
||||
u_v = n.get_verify_cap().to_string()
|
||||
self.failUnless(u_v.startswith("URI:DIR2-Verifier:"), u_v)
|
||||
u_r = n.get_repair_cap().to_string()
|
||||
self.failUnlessEqual(u_r, u)
|
||||
self.expected_manifest.append( ((), u) )
|
||||
self.expected_verifycaps.add(u_v)
|
||||
si = n.get_storage_index()
|
||||
|
Loading…
x
Reference in New Issue
Block a user