Before you begin
Python is a popular development language especially for datacenter automation. Before using the native features of Python together with several common packages, you need to prepare the environment and the required input files.
Prepare the environment
The basic configuration requirements to run the Python scripts are described below.
You need to have the latest version of Python 3 installed.
The Requests and urllib3 libraries must be installed. You can use pip or another Python management tool as appropriate for your environment.
The workstation where the scripts run must have network access and be able to reach Astra Control. When using Astra Control Service, you must be connected to the internet and be able to connect to the service at https://astra.netapp.io
.
You need a valid Astra account with the account identifier and API token. See Get an API token for more information.
Create the JSON input files
The Python scripts rely on configuration information contained in JSON input files. Sample files are provided below.
You need to update the samples as appropriate for your environment. |
The following file contains the API token and Astra account. You need to pass this file to Python scripts using the -i
(or --identity
) CLI parameter.
{
"api_token": "kH4CA_uVIa8q9UuPzhJaAHaGlaR7-no901DkkrVjIXk=",
"account_id": "5131dfdf-03a4-5218-ad4b-fe84442b9786"
}