Sunday, January 3, 2021

Hello World | SDWAN

 

Introduction

In this Learning Lab you will explore SD-WAN and the SD-WAN solution from Cisco and how it fits in the DNA architecture and the Network Intuitive. We will also explore the REST API that is exposed with the management component of Cisco SD-WAN, vManage.

Objectives

When you complete this Learning Lab, you will be able to:

  • Define SD-WAN and describe its history.
  • Understand the Cisco SD-WAN Solution.
  • Understand the Cisco SD-WAN REST API.

Prerequisites

To complete this Lab you need:

  • Lab infrastructure to target API calls and code. For the purposes of this Learning Lab you will leverage the Cisco SD-WAN 19.2 Reservable Sandbox. Login with username admin and password C1sco12345.

  • A local clone of the GitHub repository that contains the final version of the application. You can find more information about the application you are developing in the README.

    To clone the repository and navigate to the code repository, ensure that you have Git installed and run the following command:

    git clone https://github.com/CiscoDevNet/Getting-started-with-Cisco-SD-WAN-REST-APIs.git
    cd Getting-started-with-Cisco-SD-WAN-REST-APIs
    
  • Python 3.6 or later and a Python virtual environment (venv). To configure the virtual environment, run the following command, modifying it for your Python version if necessary:
    python3.6 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt

Cisco SD-WAN REST API

As mentioned in the previous section, vManage provides a REST API interface over which it exposes all its functionality. If you are not familiar with APIs and REST, you can learn about them in the Coding and APIs Learning Labs at DevNet Start Now.

SD-WAN REST API documentation can be found at vManage REST APIs documentation.

Swagger-based documentation is also provided through your vManage instance at https://IP-ADDRESS:port/apidocsIP-ADDRESS is the address of the vManage instance and port is typically 8443. This documentation gives you the option of interacting with the API and to see how the schema of the API is organized.

Using the Cisco SD-WAN DevNet Sandbox

For a hands-on exploration of the API, you can acccess the Cisco SD-WAN 19.2 Reservable Sandbox and explore the API by trying out some REST calls in the Swagger interface. Follow the instructions there to make a Sandbox reservation, and when you're ready, you can connect to the Sandbox and log into the vManage with the credentials admin / C1sco12345.

As an example, you can try the GET call for the /device endpoint that can be found under Monitoring - Device Details. The output for this call should be in JSON format and look like the following example:


Click here to expand and show expected /device endpoint output.

We can see that the output of this call is verbose and contains a lot of useful information about the fabric being managed by this vManage instance. In the following Learning Labs you will learn how to extract this data and use it in your applications.

Another useful REST API endpoint is /device/monitor. This API will retrieve all the devices monitoring details and is found under the Monitoring - Device Details category. The output for the /device/monitor endpoint should be similar to the following:


Click here to expand and show expected /device/monitor endpoint output.

From the output of this API call you can see the status of all the SD-WAN fabric components returned for us to parse and re-use as needed.



No comments:

Post a Comment