Skip to content

nokia/srlinux-yang-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yang Browser


Nokia SR Linux makes extensive use of structured data models. Each application, whether provided by Nokia or written by a user against the NDK, has a YANG model that defines its configuration and state.

With this design, the YANG data model is defined first, then the CLI, APIs, and show output formats are derived from it.

Yang browser

This repository contains only the source YANG files that one can use to build code bindings or explore the way the modules are built. To browse the modules, we recommend using yang.srlinux.dev portal, which provides human-friendly tools to browse and search through the models.

Repository structure

The main branch of this repository contains only the documentation. To see the yang files for a given release, select the tag that matches the SR Linux release version.

For instance, the v21.6.2 tag corresponds to the SR Linux release 21.6.2.

Download

There are several ways to download the yang files for a specific SR Linux release. The below examples are provided for the v21.6.2 version.

Clone with git

Clone the yang files for a specific release with the following git command:

git clone -b v21.6.2 --depth 1 https://github.com/nokia/srlinux-yang-models

Download archives

To download the proto files for a specific release in the zip or tgz archive, navigate to the GitHub tag page, which contains the links to the archives.

If needed, the download link can be programmatically derived using the following rule:

for zip https://github.com/nokia/srlinux-yang-models/archive/tags/ + $tag + .zip

for tar.gz https://github.com/nokia/srlinux-yang-models/archive/tags/ + $tag + .tar.gz

Extracting all modules

To extract YANG modules of each SR Linux release and put them in a single directory, use the provided get-all-modules.sh script:

# extracts modules in the `$(pwd)/all` directory
./get-all-modules.sh