Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StratisDbus.pool_list returns UUID #277

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions testlib/dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def stopped_pools():
def pool_list():
"""
Query the pools
:return: A list of object paths and names
:rtype: List of str * str
:return: A list of object paths, names, and UUIDs
:rtype: List of str * str * str
"""
pool_objects = [
(obj_path, obj_data[StratisDbus._POOL_IFACE])
Expand All @@ -184,7 +184,10 @@ def pool_list():
and obj_data[StratisDbus._POOL_IFACE]["Name"].startswith(_TEST_PREF)
]

return [(obj_path, pool_obj["Name"]) for obj_path, pool_obj in pool_objects]
return [
(obj_path, pool_obj["Name"], pool_obj["Uuid"])
for obj_path, pool_obj in pool_objects
]

@staticmethod
def blockdev_list():
Expand Down
4 changes: 2 additions & 2 deletions testlib/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def check_result(result, format_str, format_str_args):
)

# Remove Pools
for _, name in StratisDbus.pool_list():
for _, name, _ in StratisDbus.pool_list():
check_result(StratisDbus.pool_destroy(name), "failed to destroy pool %s", name)

# Unset all Stratis keys
Expand Down Expand Up @@ -312,7 +312,7 @@ def run_check(self, stop_time):
# Wait for D-Bus to settle, so D-Bus and metadata can be compared
time.sleep(sleep_time(stop_time, 16))

for object_path, _ in StratisDbus.pool_list():
for object_path, _, _ in StratisDbus.pool_list():
(current, current_return_code, current_message) = (
StratisDbus.pool_get_metadata(object_path)
)
Expand Down