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

using keys instead of values, as the values are the folder sizes...

parent fa033f1d
......@@ -673,18 +673,15 @@ class OSDManager(object):
"manager!")
return os.path.join(self.volumeName, path[len(self.pathToMountPoint) + 1:])
'''
search for the assigned folder that is a prefix of the given path on volume
'''
def get_containing_folder_id(self, path_on_volume):
print("OSDs.values: " + str(self.distribution.OSDs.values()))
for osd in self.distribution.OSDs.values():
print("osd.folders.values(): " + str(osd.folders.values()))
for a_folder in osd.folders.values():
for a_folder in osd.folders:
if path_on_volume.startswith(a_folder.id):
return a_folder.id
return None
def __str__(self):
......
Supports Markdown
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