Cisco Catalyst Center Template Labs – Rest-API – Part 9

Overview

In this episode of ours ongoing Catalyst Center automation seriesour focus is shifting to Rest-API and using postman to automate the network. We’ll shift our focus from templating to automation through Postman, a great tool for exploring RESTful APIs in a single UI. This is a self-paced, self-paced lab where we will build on the foundational knowledge gained in previous labs. In this exercise, we will focus on configuring Catalyst Center and how Catalyst Center can be automated to perform the various functions we have already discussed. The lab is intended to help drive Rest-API adoption and includes several use cases to address common orchestration needs when using Catalyst Center.

In this series we will cover the following;

  1. PnP Preparation – explains the overall steps of a Plug and Play setup
  2. Onboarding Templates – explains in detail how to deploy Day 0 templates
  3. N-Day Templates – Dives into N-Day template designs with regular and composite templates and use cases
  4. Application Policy – Explores Application Policy and SD-AVC in Catalyst Center and their usage
  5. Telemetry – explains how to deploy telemetry for insurance
  6. Advanced Automation – Explores advanced automation techniques
  7. Dynamic Automation – deployment lab for dynamic automation

Catalyst Center Rest-API Collections

Additionally, we’ve provided a Postman Public Workspace where all Rest-API collections are included, so engineers can quickly access and set up their environment. “Sometimes seeing is believing.We hope these new tools help explain how to best use the Rest-API and extend the information from developer.cisco.com.

In this lab, we will continually add more use cases to answer specific orchestration needs, but always in Postman, where they can be analyzed and viewed in-flight for inclusion in any automation or orchestration system that requires them. In upcoming modules, we’ll also dive into published and unpublished Rest-APIs and how to discover and work with them to meet your orchestration needs.

Within these lab modules we cover the following collections used for comma-separated values ​​(CSV) orchestration;

  1. Postman Orientation – will direct you to the postman and help prepare the tools
  2. Building Hierarchy – orchestrating the building hierarchy
  3. Assign Settings and Credentials – assignment of settings and credentials
  4. Device Discovery – device discovery orchestration
  5. Template Deployment – automation of template deployment
  6. Configuration Archive – automation of configuration archiving
  7. Network Inventory Acquisition – Collect network inventory
  8. Running show commands – Collecting the results of show commands

Unlike most previous labs in the series, this lab is self-contained and does not depend on any previous labs. Although you can add concepts from Exercises 5 and 6 to this exercise, it is designed to have no pre-configuration. It uses a variety of automation techniques to showcase the full artistry possible from Software-Defined Networking.

What will I learn in the Rest-API Orchestration Lab?

It is an activation lab that allows engineers and architects to push beyond what they currently understand by trying new concepts and pushing the boundaries of automation and orchestration. During this exercise, we will cover various topics about Rest-API logic to solve multiple use cases. We cover some previous concepts with an in-depth focus on expanding their abilities through the art of making and exploring.

The concept behind this lab is to create an environment for you from the ground up, from design to discovery to template deployment. Using DCLOUD or DevNet Sandbox gives you a safe place to try, modify and get used to different concepts and approaches.

Access

The lab is built for minimal intervention with things like Rest API run over Postman as part of the Catalyst Center quick configuration collection run. This allows us to deploy settings, credentials, discover devices, build sites, buildings, floors and assign devices to those sites. These are powerful examples of what we can do and show how quickly we can get Catalyst Center up and running using Rest API using a single tool.

But wait, there’s more…

We’ve created a comma-separated value (CSV) file for use with Postman collections to make it easy to design and deploy templates when needed.

CSV
Figure 1. CSV file

You can easily add a public workspace to Postman using the following link. This will allow you to quickly start using the Rest-API set created for this lab. Click the following link to login to your Postman account and the workspace, including collections and environments, will be automatically added. (see image below)

Public Catalyst Center Use-Case API Collection

Postman Public Workspace
Figure 2. Postman public workspace

We keep the Postman Public Workspace up to date with the lab, so the lab helps document the collection and the collections help manage the lab. There are currently several collections and environments within Workspace.

Use cases

We will cover various topics in several use cases based on lab modules to show the capabilities and flexibility of Rest-API with Catalyst Center.

The various topics/use cases we will touch on and deploy within the lab consist of the following:

  1. Use Rest API for Catalyst Center configuration Design and Settings using a CSV file
  2. Allocation automation Credentials over the network
  3. Orchestration Discovery to on-board network devices
  4. Automation Provisioning from Regular and compound templates on Device
  5. Loading Equipment inventory information
  6. Orchestration Configuration archives
  7. Loading Show command results from Catalyst Centers Command Runner

Because of this, the lab uses these topics…

We will get a hands-on understanding of the steps involved in using the Rest-API to set up the Catalyst Center and environment to support complex, advanced, regular templates for providing device configuration during these exercises. The labs aim to help engineers quickly get started with Catalyst Center automation and help them work on a global template strategy. Additionally, these labs will provide customers with a permanent place to try out common and complex templates and will feature configurations for different use cases. Finally, this environment will allow engineers to reduce the time and effort required to create a network instance.

Launching…

Several sandbox labs are available within DCLOUD. These separate environments are there for you to use as you please at your scheduled time. Additionally, it allows us to start practicing different concepts without worrying about the impact on the production environment.

As a result, we hope to demystify some of the complexity of setting up automation and help customers navigate through alerts. To help customers transition to automation, we’ve put together a set of small, useful labs within a GitHub repository. In this way, these self-guided labs provide insight into the fundamentals of creating speed templates and offer examples that you can download and expand on. In addition, sample templates and supplied JSON files are for easy import into the Catalyst Centers template editor for faster adoption. Finally, some scripts are ready-made code exceptions that allow you to build your testing environment.

In this hands-on REST-API Orchestration lab, we’ll dive step-by-step into advanced automation methods and how to leverage them to solve different use cases. Second, we provide answers and explanations to many questions that come up during automation workshops. We hope you find the information useful and informative.

Where can I test and try out these labs?

DCLOUD lab environment

To help customers succeed with Cisco Catalyst Center automation, you can use the above labs as they were designed to work in the DCLOUD Cisco Enterprise Networks Hardware Sandbox Labs:

  1. Cisco Enterprise Networks Hardware Sandbox West DC
  2. Cisco Enterprise Networks Hardware Sandbox East DC

DCLOUD labs allow you to run these labs and provide an environment to try out different code samples. You can develop and export your code for use in a production environment. This also gives you an environment where you can safely perform POC/POV methods and steps without damaging your production environment. The DCLOUD environment also negates the need for shipping equipment, lead times, and licensing issues needed to move quickly. Follow DCLOUD best practices when using it.

Laboratory connectivity

The environment enables a web browser to connect without a VPN. Additionally, there is an AnyConnect VPN client connection for those who prefer it. Select Cisco Enterprise Network Sandbox. Additionally, you can choose from our RTP Facilities labs by selecting US West. To access this or other content, demos and labs in DCLOUD, work directly with your Cisco or Partner Account Team. Your account teams schedule a session and share it for you to use. After booking, follow the GitHub guide to complete the tasks according to DCLOUD best practices.

Enthusiastic

REST-API orchestra lab content is housed in the existing DNAC-TEMPLATES repository to provide a one-stop shop for all the necessary tools, scripts, templates, and code samples. It has seven labs that build on tutorials to test methods in a lab environment. The repository was featured in a previous Cisco blog post on Catalyst Center templates earlier in May 2021.

More information

Catalyst Center TemplateLabs

Formerly named DNAC Template LABS within DNAC TEMPLATES The goal of the GitHub repository is to walk you through the typical steps required to activate the various automation tasks provided by Catalyst Center. This exercise will provide examples of templates used in Catalyst Center that we can modify for our use and test on devices in the LAB environment. Additional information within the lab provides a comprehensive explanation of automation methods using templates. Finally, the lab enables customers to use Catalyst Center workflows to practice onboarding deployments, DayN templates, and application policy automation across both wired and wireless platforms.

The goal of this lab is to be a hands-on guide to help engineers quickly get started with Catalyst Center automation and help them work on their deployment strategy. In addition, this lab will provide customers with a permanent place to test configurations for different use cases. Finally, this environment will allow engineers to reduce the time and effort required to create a network instance.

As a result, you will gain experience in setting up Plug and Play onboarding and templates and using all the features. In addition, you will use advanced templating methods and troubleshooting tools. These can help debug to determine what is failing in the deployment.

New Catalyst Center Lab Content

Use this menu to navigate through the different parts of this GitHub repository. There are examples and explanatory readme files in multiple folders for reference. There are now two sets of labs and they are constantly expanding.

This newer and more modular lab approach is designed to address and incorporate concepts from older labs in a newer, more modular format.

  1. Lab 1 Wired Automation – Covers green and brown field use cases (allow 4.0 hours)
  2. Lab 2 Wireless Automation – Covers traditional wireless automation (allow 4.0 hours)
  3. Lab 4 Rest-API Orchestration – Covers Cisco Catalyst Center automation via Postman with Rest-API (allow 2.0 hours)
  4. Lab 7 CICD Orchestration – Covers Python with JENKINS Orchestration via REST-API (allow 4.0 hours)

We will share additional labs and content with the Catalyst Center in an effort to meet all of your automation needs.

Finally, if you found this set of labs and repositories useful,

please fill in the comments and feedback how it could be improved.


We’d love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco on social media!

Check out our Cisco Networking video channel

Subscribe to a network blog

Share:

Leave a Comment