https://github.com/nokia/srlinux-yang-models
https://github.com/nokia/srlinux-yang-models
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nokia/srlinux-yang-models
- Owner: nokia
- License: bsd-3-clause
- Created: 2021-10-20T06:37:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-14T06:31:21.000Z (about 1 year ago)
- Last Synced: 2025-05-14T07:43:15.183Z (about 1 year ago)
- Language: Shell
- Size: 3.89 MB
- Stars: 17
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://yang.srlinux.dev)
---
Nokia SR Linux makes extensive use of structured data models. Each application, whether provided by Nokia or written by a user against the [NDK](https://learn.srlinux.dev/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](https://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:
```bash
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`](https://github.com/nokia/srlinux-yang-models/tags) 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:
```bash
# extracts modules in the `$(pwd)/all` directory
./get-all-modules.sh
```