Skip to content

Commit

Permalink
testlib/dbus: have fs_create() handle fs_sizelimit
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Gurney <[email protected]>
  • Loading branch information
bgurney-rh committed Oct 16, 2023
1 parent 5d53fdf commit 429c656
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testlib/dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,14 @@ def pool_set_property(pool_path, param_iface, dbus_param, dbus_value):
)

@staticmethod
def fs_create(pool_path, fs_name, *, fs_size=None):
def fs_create(pool_path, fs_name, *, fs_size=None, fs_sizelimit=None):
"""
Create a filesystem
:param str pool_path: The object path of the pool in which the filesystem will be created
:param str fs_name: The name of the filesystem to create
:param str fs_size: The size of the filesystem to create
:param str fs_size: The size of the filesystem to create
:param str fs_sizelimit: The size limit of the filesystem to create
:return: The return values of the CreateFilesystems call
:rtype: The D-Bus types (ba(os)), q, and s
"""
Expand All @@ -485,7 +487,9 @@ def fs_create(pool_path, fs_name, *, fs_size=None):
)

file_spec = (
(fs_name, (False, "")) if fs_size is None else (fs_name, (True, fs_size))
fs_name,
(False, "") if fs_size is None else (True, fs_size),
(False, "") if fs_sizelimit is None else (True, fs_sizelimit),
)

return iface.CreateFilesystems([file_spec], timeout=StratisDbus._TIMEOUT)
Expand Down

0 comments on commit 429c656

Please sign in to comment.