This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

published

SD-WAN Demo Code

All code has been tested on the Cisco DevNet Always On SD-WAN sandbox HERE and the Reservable SD-WAN sandbox HERE. Please see the sandbox pages for credentials and reservations. This demo example is based on Python 3.6 and was tested successfully under that version.

The Cisco SD-WAN software provides a REST API, which is a programmatic interface for controlling, configuring, and monitoring the Cisco SD-WAN devices in an overlay network. You access the REST API through the vManage web server. The API is documented on the vManage host and can be found by going to https://{vmanage-ip-address/apidocs. Additional API documentation can be found in the Cisco SD-WAN Product Documentation.

The requirements

python3 -m venv venv
source venv/bin/activate
python -V
Python 3.6.5
pip install -r requirements
git clone https://github.com/bigevilbeard/sd_wan_demo

Bulk API Operations

RESTful bulk API calls allow you to issue a single RESTful API command to collect information about multiple vEdge routers in the overlay network. The information is returned in batches.

You can perform two types of bulk API operations:

State— These operations return status information about the Cisco SD-WAN devices, such as the number and state of OMP and BFD sessions

Statistics — These operations return statistics from the Cisco SD-WAN devices, such as the number of transmitted and received data packets

Returns All Inventory Data

This section of the code will retrieve the inventory data of the vMange and return summary data of all devices in the network. The data includes SystemIP, Hostname, Version of code, UUID and interfaces and statistics. The second part of the demo presents the detailed tunnel statistics on an individual vEdge.

Function Descriptions

These python scripts implement basic functions that are described below:

  • get_devices.py - Collects all device information from the SD-WAN vManage
  • get_vpn.py - - Collects all VPN information from the SD-WAN vManage

Output example

sdwan

About me

Network Automation Developer Advocate for Cisco DevNet.
I'm like Hugh Hefner... minus the mansion, the exotic cars, the girls, the magazine and the money. So basically, I have a robe.

Find me here: LinkedIn / Twitter

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.