Closed lorenzo-maffeo-SAP closed 8 months ago
this issue occurs with many more commands when attempting to run them through na_ontap_rest_cli:
- name: Get volume information
connection: local
na_ontap_rest_cli:
command: 'storage/volume/show'
verb: GET
<<: *login
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Error: {'message': 'API not found', 'code': '3'}"}
- name: Get snapmirror information
connection: local
na_ontap_rest_cli:
command: 'snapmirror/show'
verb: GET
<<: *login
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Error: {'message': 'API not found', 'code': '3'}"}
while I know that I can use gather_info of rest_info module, it will not serve the purpose I'm trying to achieve as it does not present all information it should, e.g. storage/volumes does not present any information about any volume encryption, and 'snapmirror/relationships' does not show any LS Mirror relationship
This documentation has rules for forming cli path. - https://library.netapp.com/ecmdocs/ECMLP2885799/html/index.html (look for section "Using the private CLI passthrough with the ONTAP REST API")
I am guessing these changes will work.
snapmirror/show -> snapmirror storage/volume/show -> storage/volume system/license/show-status -> system/license/status
Thanks for the reply, I have missed that part of the documentation. Snapmirror and volumes were a false alarm.
Still, system license status
and system license show-status
are different commands which provide different information. For my purpose (identifying licensing mismatch across nodes) I require the output of the second one which does not seem to work on 9.8.
The CLI command, on the other hand, works as expected.
cluster::> system license show-status -status partially-installed
There are no entries matching your query.
cluster::> version
NetApp Release 9.8P16: Fri Dec 02 02:05:05 UTC 2022
Do any of the examples in the "Using the private CLI passthrough with the ONTAP REST API" work?
https://library.netapp.com/ecmdocs/ECMLP2885799/html/index.html#/
Summary
When attempting to write a tast using na_ontap_rest_cli to call "system license show-status" agains a system running 9.8, an error is returned mentioning 'API not found'
Component Name
na_ontap_rest_cli
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Create a new playbook with a this single task and an inventory of 2 systems (one running 9.8 and one running 9.10)
Expected Results
I expected the task to complete successfully since the command is available in ONTAP 9.8 and na_ontap_rest_cli module can be used with ONTAP 9.6+
Actual Results