Skip to content

Commit

Permalink
Changed to using fs property
Browse files Browse the repository at this point in the history
Signed-off-by: Carmine Zaccagnino <carmine@carminezacc.com>
  • Loading branch information
carzacc committed Nov 10, 2018
1 parent 0585d35 commit abe9218
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/stratis_cli/_actions/_logical.py
Expand Up @@ -15,8 +15,6 @@
Miscellaneous logical actions.
"""

import subprocess

from justbytes import Range
from dateutil import parser as date_parser

Expand All @@ -37,18 +35,6 @@
from ._util import get_objects


def get_uuid(pool_name, fs_name):
"""
Returns the UUID of a filesystem
"""
args = [
'sudo', 'blkid', '-p', '/dev/stratis/' + pool_name + '/' + fs_name,
'-s', 'UUID', '-o', 'value'
]

return subprocess.check_output(args).strip().decode('utf-8')


class LogicalActions():
"""
Actions on the logical aspects of a pool.
Expand Down Expand Up @@ -92,7 +78,7 @@ def list_volumes(namespace):
date_parser.parse(mofilesystem.Created()).astimezone().strftime(
"%b %d %Y %H:%M"),
mofilesystem.Devnode(),
get_uuid(path_to_name[mofilesystem.Pool()], mofilesystem.Name()),
mofilesystem.Uuid(),
] for mofilesystem in mofilesystems]

print_table(['Pool Name', 'Name', 'Used', 'Created', 'Device', 'UUID'],
Expand Down

0 comments on commit abe9218

Please sign in to comment.