Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
3d533cb4
Commit
3d533cb4
authored
Oct 12, 2015
by
Charles Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing calls to fail_json
parent
50372eec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/ansible/module_utils/vca.py
+4
-4
No files found.
lib/ansible/module_utils/vca.py
View file @
3d533cb4
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment