Hi,
I need to write some data to a file on a netapp cmode volume. Look at REST library, there is FileInfo() REST calls to netapp filer. From document, it's equavalent to below:
GET /api/storage/volumes/{volume.uuid}/files/{path}?byte_offset=0&length=40 -H "Accept: multipart/form-data"
POST /api/storage/volumes/{volume.uuid}/files/{path} -H "Content-Type: multipart/form-data" –form "file=the data to be written to the new file"
PATCH /api/storage/volumes/{volume.uuid}/files/{path}?byte_offset=10 -H "Content-Type: multipart/form-data" –form "file=the new data to be written or overwritten to the existing file starting at byte_offset"
However, how do I use ansible module to create a file? I tried restit, it does not work.
netapp.ontap.na_ontap_restit:
<<: *login
api: "storage/volumes/{{ vol_uuid }}/files/{{ dfsFileName }}"
method: POST
files:
data: "some data"
well, it is probably not right way to use na_ontap_restit.