self.uri = uri
self.storage_index = storage_index
self.problems = []
- self._data = {"count-corrupt-shares": 0,
- "list-corrupt-shares": [],
- }
self.summary = ""
self.report = []
def set_needs_rebalancing(self, needs_rebalancing):
self.needs_rebalancing_p = bool(needs_rebalancing)
def set_data(self, data):
- self._data.update(data)
+ self._data = data
def set_summary(self, summary):
assert isinstance(summary, str) # should be a single string
self.summary = summary
data["count-good-share-hosts"] = 10
data["count-wrong-shares"] = 0
nodeid = "\x00"*20
+ data["count-corrupt-shares"] = 0
data["list-corrupt-shares"] = []
data["sharemap"] = {1: [nodeid]}
data["servers-responding"] = [nodeid]
data["count-shares-expected"] = 10
data["count-good-share-hosts"] = 10
data["count-wrong-shares"] = 0
+ data["count-corrupt-shares"] = 0
data["list-corrupt-shares"] = []
nodeid = "\x00"*20
data["sharemap"] = {"seq1-abcd-sh0": [nodeid]}
"count-shares-expected": 9,
"count-shares-good": 10,
"count-good-share-hosts": 11,
+ "count-corrupt-shares": 0,
"list-corrupt-shares": [],
"count-wrong-shares": 0,
"sharemap": {"shareid1": [serverid_1, serverid_f]},
cr.set_healthy(False)
cr.set_recoverable(False)
cr.set_summary("rather dead")
+ data["count-corrupt-shares"] = 1
data["list-corrupt-shares"] = [(serverid_1, u.get_storage_index(), 2)]
cr.set_data(data)
html = self.render2(w)
'count-good-share-hosts': 11,
'count-wrong-shares': 0,
'count-shares-good': 10,
- 'count-corrupt-shares': 0,
+ 'count-corrupt-shares': 1,
'servers-responding': [],
'recoverable': False,
}
"count-shares-expected": 10,
"count-shares-good": 6,
"count-good-share-hosts": 7,
+ "count-corrupt-shares": 0,
"list-corrupt-shares": [],
"count-wrong-shares": 0,
"sharemap": {"shareid1": [serverid_1, serverid_f]},
"count-shares-expected": 10,
"count-shares-good": 10,
"count-good-share-hosts": 11,
+ "count-corrupt-shares": 0,
"list-corrupt-shares": [],
"count-wrong-shares": 0,
"sharemap": {"shareid1": [serverid_1, serverid_f]},