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

ipaautomountmap: Force setting automountmapname in IPA API calls.

The usage of 'automountmapname' is required in all automount map IPA
API calls, and this change ensures that the value is always set as
an argument.
parent 1276e388
Branches
Tags
No related merge requests found
......@@ -123,9 +123,10 @@ class AutomountMap(IPAAnsibleModule):
self.params_fail_used_invalid(invalid, state)
def get_args(self, mapname, desc): # pylint: disable=no-self-use
_args = {}
if mapname:
_args["automountmapname"] = mapname
# automountmapname is required for all automountmap operations.
if not mapname:
self.fail_json(msg="automountmapname cannot be None or empty.")
_args = {"automountmapname": mapname}
# An empty string is valid and will clear the attribute.
if desc is not None:
_args["description"] = desc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment