Skip to content
Snippets Groups Projects
Commit fdcdad2c authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ansible_freeipa_module: New function api_check_command

This function can be used to check if a command is available in the API.

This is used in ipauser module to check if user_add_certmapdata is available
in the API.
parent 6a69bbea
Branches
Tags
No related merge requests found
......@@ -175,6 +175,11 @@ def api_command_no_name(module, command, args):
return api.Command[command](**args)
def api_check_command(command):
"""Return if command exists in command list."""
return command in api.Command
def api_check_param(command, name):
"""Check if param exists in command param list."""
return name in api.Command[command].params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment