Skip to content

Commit

Permalink
gwcli: make pool parameter required
Browse files Browse the repository at this point in the history
Signed-off-by: Xiubo Li <[email protected]>
  • Loading branch information
lxbsz committed Jan 10, 2022
1 parent b42a375 commit 2d6db48
Show file tree
Hide file tree
Showing 2 changed files with 1,145 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gwcli/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def reset(self):
for child in children:
self.remove_child(child)

def ui_command_attach(self, pool=None, image=None, backstore=None, wwn=None):
def ui_command_attach(self, pool, image=None, backstore=None, wwn=None):
"""
Assign a previously created RBD image to the gateway(s)
Expand Down Expand Up @@ -189,7 +189,7 @@ def ui_command_attach(self, pool=None, image=None, backstore=None, wwn=None):
"image={}".format(pool, image))
self.create_disk(pool=pool, image=image, create_image=False, backstore=backstore, wwn=wwn)

def ui_command_create(self, pool=None, image=None, size=None, backstore=None, wwn=None,
def ui_command_create(self, pool, image=None, size=None, backstore=None, wwn=None,
count=1):
"""
Create a RBD image and assign to the gateway(s).
Expand Down Expand Up @@ -263,7 +263,7 @@ def ui_command_create(self, pool=None, image=None, size=None, backstore=None, ww
self.create_disk(pool=pool, image=image, size=size, count=count, backstore=backstore,
wwn=wwn)

def _valid_pool(self, pool=None):
def _valid_pool(self, pool):
"""
ensure the requested pool is ok to use. currently this is just a
pool type check, but could also include checks against freespace in the
Expand All @@ -285,7 +285,7 @@ def _valid_pool(self, pool=None):
"be replicated".format(pool))
return False

def create_disk(self, pool=None, image=None, size=None, count=1,
def create_disk(self, pool, image, size=None, count=1,
parent=None, create_image=True, backstore=None, wwn=None):

rc = 0
Expand Down
Loading

0 comments on commit 2d6db48

Please sign in to comment.