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
a41b8e99
Commit
a41b8e99
authored
Aug 03, 2018
by
Felix Seibert
Browse files
simpler way of test osd id creation
parent
0a275f6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_dataDistribution.py
View file @
a41b8e99
...
...
@@ -288,9 +288,9 @@ class TestDataDistribution(unittest.TestCase):
def
create_test_osd_list
(
num_osds
,
osd_capacities
):
test_osds
=
[]
for
i
in
range
(
0
,
num_osds
):
for
i
in
range
(
0
,
num_osds
*
len
(
osd_capacities
)
):
for
osd_capacity
in
osd_capacities
:
test_osds
.
append
(
create_osd_id
(
osd_capacity
,
i
))
test_osds
.
append
(
create_osd_id
(
i
))
return
test_osds
...
...
@@ -306,12 +306,13 @@ def create_test_folder_list(num_folders, folder_sizes):
def
create_osd_information
(
num_osds
,
osd_capacities
):
osd_information
=
{}
for
i
in
range
(
0
,
num_osds
):
for
osd_capacity
in
osd_capacities
:
osd_uuid
=
create_osd_id
(
osd_capacity
,
i
)
osd_information
[
osd_uuid
]
=
osd_capacity
i
=
0
for
osd_capacity
in
osd_capacities
:
for
j
in
range
(
0
,
num_osds
):
osd_information
[
create_osd_id
(
i
)]
=
osd_capacity
i
+=
1
return
osd_information
def
create_osd_id
(
capacity
,
index
):
return
osd_id_prefix
+
"_"
+
str
(
capacity
)
+
"_"
+
str
(
index
)
def
create_osd_id
(
index
):
return
osd_id_prefix
+
"_"
+
str
(
index
)
Write
Preview
Markdown
is supported
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