Cisco SD-WAN Automation

Someone was asking me about Cisco SD-WAN Automation.

Mainly you use REST API to communicate with vManage.

To learn more about the Viptela API Library and Documentation, consult the product documentation:

https://sdwan-docs.cisco.com/Product_Documentation/Command_Reference/Command_Reference/vManage_REST_APIs

They are also available by accessing the documentation through https://{{vmanage}}:{{port}}/apidocs.

You can even try it for free:

using https://devasc-sdwan-1.cisco.com/apidocs/

Log in using username devnetuser and password RE!_Yw519_27

More in networkacademy.io blog: https://www.networkacademy.io/ccie-enterprise/sdwan/cisco-sd-wan-rest-apis

The Viptela REST API calls expose the functionality of Viptela software and hardware features and of the normal operations you perform to maintain Viptela devices and the overlay network itself.

In REST API terminology, each of these features or operations is called a resource.

A resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it.

Resources are grouped into collections.

Each collection contains a single type of resource, and so is homogeneous.

In the Viptela REST API, the collection of resources is present at the top level of the API.

The Viptela REST API resources are grouped into the following collections:

Monitoring: This collection views status, statistics, and other information about operational devices in the overlay network. Viptela devices collect monitoring information about themselves every 10 minutes. After collecting these statistics, each Viptela device places them in a zip file. The vManage server retrieves these zip files every 10 minutes or, if the vManage server cannot log in to the device, it retrieves them whenever it is next able to log in.

Real-Time Monitoring: This collection retrieves, views, and manages real-time statistics and traffic information. Real-time monitoring information is gathered in real time, approximately once per second.

Configuration: This collection creates feature and device configuration templates, retrieves the configurations in existing templates, and creates and configures vManage clusters.

Administration: This collection manages users and user groups, views audit logs, and manages the local vManage server.

Device Inventory: This collection collects device inventory information including serial numbers and system status.

Certificate Management: This collection manages certificates and security keys.

Troubleshooting Tools: This collection provides tools to help troubleshoot devices, determine the effect of policy, update software, and retrieve software version information.


Here is example I created
I used DevNet always on sandbox and I used this script which is part of it in Cisco CLN ENAUI materials.
The script will ask vManage for devices that exist in your Viptela org.
Try it by yourself. I am open to answer any question about the content of this script, But you need to ask it in the below CLN link.
https://learningnetwork.cisco.com/s/question/0D53i000010uW2YCAU/cisco-sdwan-python-script-example

Script:


Script Output:

Script can be downloaded from my github :
https://github.com/YasserAuda/SD-WAN

SD-WAN Automation can be done using REST API tools such as python requests module or Ansible uri module

There is another python module can be used called Sastre 

Sastre python module tutorial and how to install:

https://github.com/CiscoDevNet/sastre

Sastre is available in two flavors:

Sastre: Public open-source under MIT license available on Cisco DevNet repository. Supports a limited set of tasks.

Sastre-Pro: Cisco licensed version, supporting the full feature-set. Sastre-Pro is available for customers with a CX BCS subscription and Cisco internal at Cisco eStore.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s