You can do this on Windows but I prefer to use a Linux VM or WSL. For example purposes, I will assume setup is being done on Ubuntu. For other distros, use the appropriate package manager commands. After setup, the distro should not matter.
https://ctera-python-sdk.readthedocs.io/en/latest/index.html
https://github.com/CTERA-Networks/ctera-python-sdk/
-
Update your system.
sudo apt update && sudo apt upgrade -
Install git.
sudo apt install git -
Install Python3.
sudo apt install python3 -
Download the CTERA SDK for Python source to your current working directory.
git clone https://github.com/CTERA-Networks/ctera-python-sdk.git -
Setup CTERA SDK
cd ctera-python-sdkpython3 setup.py install
Do these steps each time to test things interactively in the Python Console.
-
Change into the CTERA SDK folder.
cd ctera-python-sdk -
Enter Python Console.
python3Your shell prompt will change to this:
>>> -
Import CTERA SDK Libraries.
from cterasdk import * -
Create a Global Admin object to work with.
admin = GlobalAdmin('portal.example.com') -
Log into the tenant above as a global administrator.
admin.login('admin', 'P@ssw0rd123!') -
Check your host, context, and current tenant.
admin.whoami() -
Switch between browsing the Administration and team portal tenant.
admin.portals.browse_global_admin()admin.portals.browse('cloud-dev') -
When you are done playing, logout and exit Python
admin.logout()Ctrl+d