Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
FileDirectorySecurity call in Python library not returning anything
2021-10-06
09:26 PM
2,955 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have just upgraded to ONTAP 9.9.1 so I upgraded our Python library to 9.9.1 as I need to retrieve/update the NTFS permissions using the FileDirectorySecurity module.
However when I perform a get I'm not getting any return.
The call isn't erroring out even when I use incorrect filters.
Example of code ( which is direct copy from the documentation - https://library.netapp.com/ecmdocs/ECMLP2876965/html/resources/file_directory_security.html)
###
resource = FileDirectorySecurity(path="na_student_videos",**{"svm.uuid": "2059c57e-04b3-11e9-a63b-00a09899b75b"})
resource.get
print (resource)
###
When I test the REST API call using curl it returns data as expected.
curl -u XXXX -X GET "https://array-name/api/protocols/file-security/permissions/2059c57e-04b3-11e9-a63b-00a09899b75b/%2Fna_student_videos/?fields=acls&return_records=true&..." -H "accept application/hal+json"
Has anyone used the FileDirectorySecurity module or can provide advice on why it's not working.
Solved! See The Solution
1 ACCEPTED SOLUTION
tahmad has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've had a response from the NetApp developers and they have confirmed that this is a bug in the library code to be fixed in a future release.
In the meantime will need to use the python requests library for the endpoint (api/protocols/file-security/permissions) to retrieve the information.
Unfortunately that means recoding my scripting and having to use different methodology to the other calls as I am trying to use the python module.
2 REPLIES 2
tahmad has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've had a response from the NetApp developers and they have confirmed that this is a bug in the library code to be fixed in a future release.
In the meantime will need to use the python requests library for the endpoint (api/protocols/file-security/permissions) to retrieve the information.
Unfortunately that means recoding my scripting and having to use different methodology to the other calls as I am trying to use the python module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the update @Greg_pebkac
