#Hi everyone I hope this is the right
1 messages · Page 1 of 1 (latest)
field is set as '' could be the issue.
either set all
fields:
- '*'
or needed field to return(recommended one)
fields:
- 'oplocks'
field is set as empty string, could be the issue
either set * to return all fields
fields:
- '*'
or only needed field(recommended)
fields:
- 'oplocks'
I'm sorry, discord didn't display the right filter. My filter is set to *
what returns in ontap_info_cifs_shares?
tried your task, I am getting the record good.
- name: get shares tags: hello na_ontap_rest_info: fields: - '*' use_rest: always use_python_keys: true owning_resource: svm_name: ansible <<: *login gather_subset: - cifs_share_info register: ontap_info_cifs_shares - debug: var=ontap_info_cifs_shares tags: hello
Here an example; I'm trying to extract the 'browsable' property but the task fails with this error: fatal: [localhost]: FAILED! => {"changed": false, "msg": {"code": "262197", "message": "The value "browsable" is invalid for field "fields" (<field,...>)", "target": "fields"}}
The code that I tried is:
- name: get shares
na_ontap_rest_info:
fields:
- '*'
- 'browsable'
use_rest: always
use_python_keys: true
owning_resource:
svm_name: "{{ dst_svm }}"
<<: *login
gather_subset:
- cifs_share_info
register: ontap_info_cifs_shares- debug:
msg: "{{ ontap_info_cifs_shares.ontap_info }}"
- debug:
But I can see the "browsable" property grom here:
Other properties that I can't find from ansible are:
attributecache
browasble
branchcache
yes support for that browsable are not yet added in REST API.
other supported share-properties fields can be get using fields: *
this comment I find it in https://docs.netapp.com/us-en/ontap-restmap-9101/cifs.html#cifs-share-create
Share-properties are separate fields in the REST API. You can achieve this functionality by setting the fields "access_based_enumeration", "change_notify", "encryption", "home_directory", "oplocks", "show_snapshot", "continuously_available" and "namespace_caching".