diff --git a/testlib/dbus.py b/testlib/dbus.py index d050701..fa3a27e 100644 --- a/testlib/dbus.py +++ b/testlib/dbus.py @@ -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]) @@ -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(): diff --git a/testlib/infra.py b/testlib/infra.py index a9539e5..84eb96b 100644 --- a/testlib/infra.py +++ b/testlib/infra.py @@ -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 @@ -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) )