Retrieve RSVP-TE LSP Details

This documentation provides a use case for retrieving the RSVP-TE LSP discovered on the CNC server.

Prerequisites

Before running this example, ensure to obtain access token. Refer 'Getting Started' section.

Retrieve the RSVP-TE LSP Details on the CNC Server

Run the script retrieve_rsvp_te.sh from the example directory to get the RSVP TE tunnels discovered on the CNC server.

cd cnc-topology-api-examples;./retrieve_rsvp_te.sh

Script Details

!/bin/bash
. ./cnc-api-common.sh

rsvp_te() {
    # assume cnc jwt is obtained prior to invoking this method by executing get-cnc-jwt.sh script
    # read from jwt file and export it as AUTH_TOKEN_HDR
     export_jwt

    # STEP 1 : get RSVP TE tunnels discovered on server and store the output in CNC_API_OUTPUT file
    CNC_API_URL=$CNC_TOPOLOGY_API_CTX/cisco-crosswork-rsvp-te-tunnel:rsvp-te-tunnels
    CNC_API_OUTPUT="$PRJ/output/rsvp_te.json"
    http_get $CNC_API_URL $CNC_API_OUTPUT
}
rsvp_te