#name-mapping insert - need to use na_ontap_rest_cli?

1 messages · Page 1 of 1 (latest)

dusky pollen
#

Hi all,

I'm making a playbook creating win->unix name mapping for multiple vservers but noticed that when using na_ontap_name_mappings module there is no way to insert new mapping where I could use static index forcing other maps to shift down. So most likely I'm forced to switch to na_ontap_rest_cli module which I hope will solve the issue.

Question is how cli commands are formed as examples have all sorts of approach with different verb, body and params? I would like this to be converted to na_ontap_rest_cli:
name-mapping insert -vserver SVM -direction win-unix -position 1000 -pattern first.last@example.com -replacement username

So is command name-mapping or name-mapping/insert? Or maybe command: name-mapping and body: insert with vserver, direction etc. in params?

regal sleet
#

The create/modify/show (or in this case insert) part of the command maps to the verb: Option. For create operations it is POST and for modify it is PATCH. You will have to try which works in this case.

#

Look for "Using the private CLI passthrough with the ONTAP REST API"