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

simpler way of test osd id creation

parent 0a275f6c
...@@ -288,9 +288,9 @@ class TestDataDistribution(unittest.TestCase): ...@@ -288,9 +288,9 @@ class TestDataDistribution(unittest.TestCase):
def create_test_osd_list(num_osds, osd_capacities): def create_test_osd_list(num_osds, osd_capacities):
test_osds = [] 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: 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 return test_osds
...@@ -306,12 +306,13 @@ def create_test_folder_list(num_folders, folder_sizes): ...@@ -306,12 +306,13 @@ def create_test_folder_list(num_folders, folder_sizes):
def create_osd_information(num_osds, osd_capacities): def create_osd_information(num_osds, osd_capacities):
osd_information = {} osd_information = {}
for i in range(0, num_osds): i = 0
for osd_capacity in osd_capacities: for osd_capacity in osd_capacities:
osd_uuid = create_osd_id(osd_capacity, i) for j in range(0, num_osds):
osd_information[osd_uuid] = osd_capacity osd_information[create_osd_id(i)] = osd_capacity
i += 1
return osd_information return osd_information
def create_osd_id(capacity, index): def create_osd_id(index):
return osd_id_prefix + "_" + str(capacity) + "_" + str(index) return osd_id_prefix + "_" + str(index)
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