This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

A collection of OpenConfig and Cisco IOS XR examples

BSD License
published

The goal of this repo is to provide a set of examples that illustrate how to program network elements using OpenConfig and gRPC. We will leverage different Open Source projects:

  • Go as the main programming language.
  • xrgrpc (gRPC library for Cisco IOS XR) to interact with IOS XR via gRPC.
  • ygot (YANG Go Tools) to generate the OpenConfig data structures required for the gRPC calls.

Examples

Interface Configuration

Telemetry Stream Configuration

BGP Neighbor Configuration

Configuring and Validating a BGP Peer session

The objective is to configure an interface (link) and bring up a BGP session, while setting up a BGP Neighbor Telemetry stream to track the current state of the BGP Finite State Machine. Check out the code here

Steps

  1. Configure a Streaming Telemetry subscription using ygot and xrgrpc.

  2. Configure the Peer link (interface) using ygot and xrgrpc.

  3. Configure a BGP neighbor using ygot and xrgrpc.

  4. Subscribe to a Telemetry stream to learn about BGP Neighbor status with xrgrpc.

    oc-config-validate

Tutorials

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    IOS XR
  • Programming Languages

    Go
  • License

    BSD 3-Clause "New" or "Revised" License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.