Commit c3bdc9ec authored by Felix Seibert's avatar Felix Seibert
Browse files

add assertion for more consistency

parent fdba2409
......@@ -62,6 +62,10 @@ class DataDistribution(object):
:param osd_capacities: map from osd uuids to osd capacities
:return:
"""
# make sure that the keyset of self.OSDs matches the keyset of osd_capacities
for osd_uuid in osd_capacities:
assert osd_uuid in self.OSDs.keys()
assert len(self.OSDs) == len(osd_capacities)
for one_osd in self.OSDs.values():
assert type(osd_capacities[one_osd.uuid]) is int
one_osd.capacity = osd_capacities[one_osd.uuid]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment