Skip to content

jbarozet/python-sdwan

Repository files navigation

Cisco Catalyst SD-WAN Manager API Examples

Cisco Official documentation

This repository provides practical Python examples demonstrating authentication to SD-WAN Manager and subsequent API interactions. Please note these examples are for demonstration purposes only and not production-ready.

Install and Setup

Clone the code to local machine.

git clone https://github.com/jbarozet/python-sdwan.git

Setup Python Virtual Environment

Install uv by running the following command in Terminal:

curl -LsSf https://astral.sh/uv/install.sh | sh

Initialize and install dependancies:

cd python-sdwan
uv venv .venv
source .venv/bin/activate
uv pip install .

Setup local environment variables to provide manager instance details

You need to define the SD-WAN Manager parameters to authenticate.

Example for MacOSX:

export manager_host=10.0.0.100
export manager_port=443
export manager_username=sdwan
export manager_password=mysuperpassword

Example for Windows

set manager_host=10.0.0.100
set manager_port=443
set manager_username=sdwan
set manager_password=mysuperpassword

The easiest way to run the tool is to provide all the lab variables in a init file and source that file. The example file below contains all the variables required to run all the tasks.

% cat init.sh
export manager_host=10.0.0.100
export manager_port=443
export manager_username=sdwan
export manager_password=mysuperpassword
% source init.sh

All tests will save API response payloads in output/payloads folder to easily check the json content.

Documentation

Refer to:

About

Examples of Python scripts utilizing SD-WAN Manager APIs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages