Closed wagneradrian92 closed 5 months ago
You are using the wrong module. na_ontap_rest_cli
uses the private cli passthrough endpoint. This basically maps to CLI commands. The "metrocluster switchover" command has no parameter called "action".
You should use the module na_ontap_restit
where you can directly access REST endpoints, similar to a curl command.
https://docs.ansible.com/ansible/devel/collections/netapp/ontap/na_ontap_restit_module.html
thank you so much! with the restit module it works!
Summary
when trying to simulate a metrocluster switchover simulte using netapp.ontap.na_ontap_rest_cli i use the following command:
command: 'metrocluster/switchover' body: action: negotiated_switchover_simulate verb: PATCH
but i always receive the following error: FAILED! => {"changed": false, "msg": "Error: {'message': 'Unexpected argument \"action\".', 'code': '262179', 'target': 'action'}"}
when doing the same call using curl it works. am i missing something in my task or is there a bug in this?
thank you
Component Name
netapp.ontap.na_ontap_rest_cli
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
switchover simulte successful or failed
Actual Results