mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixing calls to fail_json
This commit is contained in:
parent
50372eecc9
commit
3d533cb423
1 changed files with 4 additions and 4 deletions
|
@ -196,26 +196,26 @@ VCHS_REQ_ARGS = ['service_id']
|
|||
|
||||
def _validate_module(module):
|
||||
if not HAS_PYVCLOUD:
|
||||
module.fail_json("python module pyvcloud is needed for this module")
|
||||
module.fail_json(msg="python module pyvcloud is needed for this module")
|
||||
|
||||
service_type = module.params.get('service_type', DEFAULT_SERVICE_TYPE)
|
||||
|
||||
if service_type == 'vca':
|
||||
for arg in VCA_REQ_ARGS:
|
||||
if module.params.get(arg) is None:
|
||||
module.fail_json("argument %s is mandatory when service type "
|
||||
module.fail_json(msg="argument %s is mandatory when service type "
|
||||
"is vca" % arg)
|
||||
|
||||
if service_type == 'vchs':
|
||||
for arg in VCHS_REQ_ARGS:
|
||||
if module.params.get(arg) is None:
|
||||
module.fail_json("argument %s is mandatory when service type "
|
||||
module.fail_json(msg="argument %s is mandatory when service type "
|
||||
"is vchs" % arg)
|
||||
|
||||
if service_type == 'vcd':
|
||||
for arg in VCD_REQ_ARGS:
|
||||
if module.params.get(arg) is None:
|
||||
module.fail_json("argument %s is mandatory when service type "
|
||||
module.fail_json(msg="argument %s is mandatory when service type "
|
||||
"is vcd" % arg)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue