The NetApp Lab on Demand (LOD) provides a convenient and secure environment for testing your sample Python scripts. Before running the scripts, you'll need to prepare the LOD environment.
You need a NetApp support account to sign in to the Lab on Demand.
-
Using a browser, access the Lab on Demand web site and sign in using your NetApp account.
-
Click Full Library on the left and choose the Exploring the ONTAP REST API v1.2 Lab-On-Demand solution.
-
Sign in to the
rhel1
machine in the provisioned lab. -
Clone the
ontap-rest-python
repository using the following command at the CLI prompt:git clone https://github.com/NetApp/ontap-rest-python.git
-
Initialize the lab environment by running the
lod_init.sh
script provided in the lod folder of this repository. This script contains dependencies for REST APIs Python scripts to run../lod/lod_init.sh
-
If you encounter a permission denied error, modify the execute permission of the script using the following command and rerun the script.
chmod 777 ./lod/lod_init.sh
You can run the sample Python scripts contained in the repository subfolders examples/python_client_library and examples/rest-api.
Visit ONTAP REST Lab