Sign inSign up

broadbandforum/yangtools

By broadbandforum

•Updated 12 months ago

A collection of YANG processing and validation tools

Image
1

6.3K

broadbandforum/yangtools repository overview

Note: These are not Broadband Forum⁠ tools: pulling them together in a Broadband Forum Docker image is just a convenience. Please see licensing information below.

⁠Tags

  • latest (the latest versions of the tools, cloned from GitHub)

⁠Quick reference

A collection of YANG⁠ processing and validation tools:

  • pyang⁠ : An extensible YANG validator and converter in python
  • yanger⁠ : Extensible YANG validator (written in erlang; mostly predates pyang)
  • libyang⁠ : YANG data modeling language library (written in C; includes the yanglint validation and conversion tool)

⁠How to use this image

The image contains pre-installed versions of the pyang, yanger and yanglint tools. The cloned GitHub repositories are in /opt and the installed executables are in /usr/local/bin.

For example, using some of the standard YANG modules that are shipped with pyang:

% docker container run -it --rm broadbandforum/yangtools:latest bash
# cd /opt/pyang/modules/ietf
# pyang -f tree ietf-interfaces.yang >ietf-interfaces.tree
# yanger -f tree ietf-interfaces.yang >ietf-interfaces.tree
# yanglint -f tree ietf-interfaces.yang >ietf-interfaces.tree

Or, assuming that you've checked out the BroadbandForum/yang⁠ repository and are sitting in its top-level directory:

% docker container run -it -v "$PWD:/opt/bbf-yang" --rm broadbandforum/yangtools:latest bash
# cd /opt/bbf-yang/standard/interface
# pyang -p /opt/pyang/modules -p ../common -f tree bbf-fast.yang >bbf-fast.tree
# yanger -p /opt/pyang/modules/iana -p /opt/pyang/modules/ietf -p ../common -f tree bbf-fast.yang >bbf-fast.tree
# yanglint -p /opt/pyang/modules -p ../common -f tree bbf-fast.yang >bbf-fast.tree

The yanger command is slightly different here because it apparently doesn't search directories recursively.

⁠License

This Docker image is based on the erlang image⁠. Erlang is released (since OTP 18) under the Apache 2.0 License or (for earlier versions) the Erlang Public License (EPL).

As with all Docker images, this image likely also contains other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

The three YANG processing and validation tools are licensed as follows:

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Tag summary

Content type

Image

Digest

sha256:3eb247c7f…

Size

746.6 MB

Last updated

12 months ago

docker pull broadbandforum/yangtools