Fix purefa_volume when used in check_mmode (#65825)
This commit is contained in:
parent
8d542edeae
commit
eb2f2ad282
1 changed files with 5 additions and 5 deletions
|
@ -278,12 +278,12 @@ def check_pod(module, array):
|
||||||
def create_volume(module, array):
|
def create_volume(module, array):
|
||||||
"""Create Volume"""
|
"""Create Volume"""
|
||||||
changed = True
|
changed = True
|
||||||
|
volfact = []
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
if "/" in module.params['name'] and not check_vgroup(module, array):
|
if "/" in module.params['name'] and not check_vgroup(module, array):
|
||||||
module.fail_json(msg="Failed to create volume {0}. Volume Group does not exist.".format(module.params["name"]))
|
module.fail_json(msg="Failed to create volume {0}. Volume Group does not exist.".format(module.params["name"]))
|
||||||
if "::" in module.params['name'] and not check_pod(module, array):
|
if "::" in module.params['name'] and not check_pod(module, array):
|
||||||
module.fail_json(msg="Failed to create volume {0}. Poid does not exist".format(module.params["name"]))
|
module.fail_json(msg="Failed to create volume {0}. Poid does not exist".format(module.params["name"]))
|
||||||
volfact = []
|
|
||||||
api_version = array._list_available_rest_versions()
|
api_version = array._list_available_rest_versions()
|
||||||
if module.params['bw_qos'] or module.params['iops_qos']:
|
if module.params['bw_qos'] or module.params['iops_qos']:
|
||||||
if module.params['bw_qos'] and QOS_API_VERSION in api_version or module.params['iops_qos'] and IOPS_API_VERSION in api_version:
|
if module.params['bw_qos'] and QOS_API_VERSION in api_version or module.params['iops_qos'] and IOPS_API_VERSION in api_version:
|
||||||
|
@ -332,8 +332,8 @@ def create_volume(module, array):
|
||||||
def copy_from_volume(module, array):
|
def copy_from_volume(module, array):
|
||||||
"""Create Volume Clone"""
|
"""Create Volume Clone"""
|
||||||
changed = True
|
changed = True
|
||||||
|
volfact = []
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
volfact = []
|
|
||||||
tgt = get_target(module, array)
|
tgt = get_target(module, array)
|
||||||
|
|
||||||
if tgt is None:
|
if tgt is None:
|
||||||
|
@ -358,9 +358,9 @@ def copy_from_volume(module, array):
|
||||||
def update_volume(module, array):
|
def update_volume(module, array):
|
||||||
"""Update Volume size and/or QoS"""
|
"""Update Volume size and/or QoS"""
|
||||||
changed = True
|
changed = True
|
||||||
|
volfact = []
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
change = False
|
change = False
|
||||||
volfact = []
|
|
||||||
api_version = array._list_available_rest_versions()
|
api_version = array._list_available_rest_versions()
|
||||||
vol = array.get_volume(module.params['name'])
|
vol = array.get_volume(module.params['name'])
|
||||||
vol_qos = array.get_volume(module.params['name'], qos=True)
|
vol_qos = array.get_volume(module.params['name'], qos=True)
|
||||||
|
@ -420,8 +420,8 @@ def update_volume(module, array):
|
||||||
def delete_volume(module, array):
|
def delete_volume(module, array):
|
||||||
""" Delete Volume"""
|
""" Delete Volume"""
|
||||||
changed = True
|
changed = True
|
||||||
|
volfact = []
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
volfact = []
|
|
||||||
try:
|
try:
|
||||||
array.destroy_volume(module.params['name'])
|
array.destroy_volume(module.params['name'])
|
||||||
if module.params['eradicate']:
|
if module.params['eradicate']:
|
||||||
|
@ -437,8 +437,8 @@ def delete_volume(module, array):
|
||||||
def eradicate_volume(module, array):
|
def eradicate_volume(module, array):
|
||||||
""" Eradicate Deleted Volume"""
|
""" Eradicate Deleted Volume"""
|
||||||
changed = True
|
changed = True
|
||||||
|
volfact = []
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
volfact = []
|
|
||||||
if module.params['eradicate']:
|
if module.params['eradicate']:
|
||||||
try:
|
try:
|
||||||
array.eradicate_volume(module.params['name'])
|
array.eradicate_volume(module.params['name'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue