Skip to content
Snippets Groups Projects
Commit 81672bdf authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

service: Use IPAAnsibleModule method to validate arguments.

Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
parent f9851f0a
No related branches found
No related tags found
No related merge requests found
...@@ -335,11 +335,7 @@ def check_parameters(module, state, action, names, parameters): ...@@ -335,11 +335,7 @@ def check_parameters(module, state, action, names, parameters):
else: else:
module.fail_json(msg="Invalid state '%s'" % (state)) module.fail_json(msg="Invalid state '%s'" % (state))
for _invalid in invalid: module.params_fail_used_invalid(invalid, state, action)
if _invalid in parameters and parameters[_invalid] is not None:
module.fail_json(
msg="Argument '%s' can not be used with state '%s', "
"action '%s'" % (_invalid, state, action))
def init_ansible_module(): def init_ansible_module():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment