NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled. We're excited to launch our new Community experience on July 30 and more information will follow soon. Stay connected during the transition - Join our Discord community today.
Python Discussions
About Python Discussions
Forum for discussions related to scripting and automation using Python
Team, I need to pull the size of the snapshot of a specific volume. ============ code ========================================== ##S1 and V1 are Snapshot and Volume objects which are already initialized before the below code. S11=Snapshot.from_dict({'uuid':S1.uuid,'volume.uuid': V1.uuid}) S11.get() print ("final snap==================") print (S11) print ("final snap==================") ========================================================== Returns the below: ********************************************************************************************************** final snap================== Snapshot({'volume': {'uuid': '0207959e-b04b-11ea-b611-d039ea073d7a', '_links': {'self': {'href': '/api/storage/volumes/0207959e-b04b-11ea-b611-d039ea073d7a'}}, 'name': 'XXXXXX'}, 'name': 'weekly.2021-02-07_0015', 'create_time': '2021-02-07T00:15:01+00:00', '_links': {'self': {'href': '/api/storage/volumes/0207959e-b04b-11ea-b611-d039ea073d7a/snapshots/15891d63-214a-4e7b-86da-942612280b39'}}, 'svm': {'uuid': '01a0b7f6-b04b-11ea-b611-d039ea073d7a', '_links': {'self': {'href': '/api/svm/svms/01a0b7f6-b04b-11ea-b611-d039ea073d7a'}}, 'name': 'XXXXX'}, 'uuid': '15891d63-214a-4e7b-86da-942612280b39'}) final snap================== I am not able to get the size of the snapshot but getting all other details [ like name, creation_time etc]. Appreciate your help. Thanks Suneel Appreciate if you
... View more
Hi, I am creating a report using python connecting to ocum database. Do you know which database or tables contains the data for Volume Daily Growth Rate percent and the Days to Full? I tried netapp_model_view and ocum_report but cannot find it. Thanks in advance. Warren
... View more
How do i run system node run -node<> -command "netstat " using cli().execute? I tried the below method but it says . Invalid Json input. Expecting "command" to be an array. Response=cli(). execute ("system node run", body={"node":"","command":"netstat",poll=false} Please advise.
... View more
When running an Ansible job that only sets "use_ldaps". When the Ansible job is run it does enable use_ldaps, but in the process stops the CIFS server. This is not expected as the default for service_stat is null. This should not be changed. Module: na_ontap_cifs_server.py use_ldaps: description: - Specifies whether or not to use use LDAPS for secure Active Directory LDAP connections. - Only supported with REST and requires ontap version 9.10.1 or later. Use na_ontap_vserver_cifs_security with ZAPI. type: bool version_added: 21.20.0 - service_state CIFS Server Administrative Status. (Choices: stopped, started)[Default: (null)] type: str
... View more
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&return_timeout=15" -H "accept application/hal+json" Has anyone used the FileDirectorySecurity module or can provide advice on why it's not working.
... View more