Installation
PIP Install
The Cisco SD-WAN Python SDK, a.k.a. Sastre is available on Python Package Index (PyPI) and can be installed using Python pip commands.
To install Sastre, simply run this command from a terminal window:
pip install --upgrade cisco-sdwan
The following section provides detailed instructions, including steps to set up your Python environment.
Detailed Instructions
Step 1: Verify Python requirements
Sastre requires Python 3.8 or newer. This can be verified by pasting the following to a terminal window:
python3 -c "import sys;assert sys.version_info>(3,8)" && echo "ALL GOOD"
If 'ALL GOOD' is printed it means Python requirements are met. If not, download and install the latest 3.x version from Python.org.
Step 2: Create Python virtual environment
Create a directory to store the virtual environment and runtime files:
mkdir sdwan_automation
cd sdwan_automation
Create and activate the virtual environment:
python3 -m venv venv
source venv/bin/activate
Note that the prompt is updated with the virtual environment name (venv), indicating that the virtual environment is active.
Upgrade initial virtual environment packages:
pip install --upgrade pip setuptools
Step 3: Install the SDK
Install Sastre:
pip install --upgrade cisco-sdwan
Verify that Sastre can run:
sdwan --version
Note:
- The virtual environment can be deactivated by typing 'deactivate' at the command prompt.
- Before running Sastre, make sure to activate the virtual environment back again (source venv/bin/activate).