Skip to content

Commit aee9945

Browse files
committed
Hoist UUID printing for default pools to shared parent
Signed-off-by: mulhern <amulhern@redhat.com>
1 parent 5f80bc7 commit aee9945

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/stratis_cli/_actions/_list_pool.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ def size_triple(mopool: Any) -> SizeTriple:
313313
get_property(mopool.TotalPhysicalUsed(), Range, None),
314314
)
315315

316+
def uuid_str(self, mopool: Any) -> str:
317+
"""
318+
Return a string representation of UUID, correctly formatted.
319+
"""
320+
return self.uuid_formatter(mopool.Uuid())
321+
316322

317323
class DefaultDetail(Default): # pylint: disable=too-few-public-methods
318324
"""
@@ -342,7 +348,7 @@ def _print_detail_view(
342348
"""
343349
encrypted = mopool.Encrypted()
344350

345-
print(f"UUID: {self.uuid_formatter(mopool.Uuid())}")
351+
print(f"UUID: {self.uuid_str(mopool)}")
346352
print(f"Name: {mopool.Name()}")
347353

348354
alert_summary = sorted(
@@ -529,7 +535,7 @@ def gen_string(has_property: bool, code: str) -> str:
529535
mopool.Name(),
530536
physical_size_triple(mopool),
531537
properties_string(mopool),
532-
self.uuid_formatter(mopool.Uuid()),
538+
self.uuid_str(mopool),
533539
", ".join(
534540
sorted(
535541
str(code)

0 commit comments

Comments
 (0)