Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Seibert
xtreemfs_client
Commits
c3bdc9ec
Commit
c3bdc9ec
authored
Jul 20, 2018
by
Felix Seibert
Browse files
add assertion for more consistency
parent
fdba2409
Changes
1
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/dataDistribution.py
View file @
c3bdc9ec
...
...
@@ -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
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment