My cheat on Cisco's YANG Suite

Home

1 YANG Suite

YANG Suite is the replacement to YANG Explorer. It is an HTML5 based tooling that works with YANG based APIs, such as Cisco IOS/XE, XR, and NXOS.

It allows for interacting with API and supports downloading YANG files directly from network devices.

This device lifecycle is supported with the tool specifically for Model-driven Programmability and Model-driven Telemetry.

2 Running YANG Suite

  1. activate python venv for YANG Suite (needs python 3.6, 3.7 or 3.8)
  2. start the server with start_yangsuite server Note: I did NOT run this. You will see the following as it downloads a docker image and starts it up
    git clone https://github.com/CiscoDevNet/yangsuite
    
    cd yangsuite/docker/
    
    docker-compose up
    
  1. leave the server running (end with C-c)
  2. browse to 127.0.0.1
    • You have to accept the certificate as it is self-signed. So expand the advnaced tab, and view the certificate and always accept

3 What I actually did:

I followed the instructions in https://pypi.org/project/yangsuite/ and in https://github.com/CiscoDevNet/yangsuite and in learning-lab intro-yangsuite

  1. activate python venv-yang for YANG Suite (needs python 3.6, 3.7 or 3.8)
  2. clone the YANG Suite with git clone https://github.com/CiscoDevNet/yangsuite Which created some subdirectories beneath venv-yang.
  3. generated ceritificates by running venv-yang/yangsuite/docker/gen_test_certs.sh This wrote new private key to 'nginx/nginx-self-signed.key'
  4. start your docker.app
  5. Only then did I cd yangsuite/docker and run docker-compose up

    This left my terminal open as a console. To quit, hit C-c on this console.

(I never did run the start_yangsuite server command as it appears I did these steps manually.)

  1. leave the server running (end with C-c)
  2. browse to 127.0.0.1 (using Safari. Chrome won't allow a self-signed cert.)
    • You have to accept the certificate as it is self-signed. So expand the advnaced tab, and view the certificate and always accept

Only after I had docker up and running did I read this warning: From https://developer.cisco.com/docs/yangsuite/

WARNINGS:

  • Change admin username/password default in docker-compose.yml file first!

So, I edited the yangsuite/docker/docker-compose.yml file and:

4 YANG Suite GUI login and usage tips:

Login on 127.0.0.1 as admin:rollingkart2021 Login on 127.0.0.1 as admin:rollingkart2021

Then use the GUI to change the password for admin. I did and then saved it to my keychain, under yangsuite.

My homepage in yangsuite looks like:

yang-suite-home.png

Figure 1: YANG Suite Homepage

4.1 Cisco Sandbox Credentials

As per the instructions in learning labs, step 2 I am to record the credentials which as of <2021-02-03 Wed> are:

  • CSR1000V Host: ios-xe-mgmt.cisco.com
  • SSH Port: 8181
  • NETCONF Port: 10000
  • RESTCONF Ports: 9443 (HTTPS)
  • Username: developer
  • Password: C1sco12345

4.2 Add credentials to "Devcie Profiles"

I followed the steps in the learning lab, and created a device profile:

YS-iox-xe-sb-profile1.png

Figure 2: YANG Suite Device Profile 1

YS-iox-xe-sb-profile2.png

Figure 3: YANG Suite Device Profile 2

Followed by a clicking "Check Connectivity" It is expected that ping would fail, but NETCONF should have succeeded if everything was done properly.

YS-iox-xe-netconf-check.png

Figure 4: YANG Suite Check Device Connectivity

4.3 Home