Skip to content

mdmohan/json-yang

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-yang

How to validate JSON against a YANG module.

Why

The need for some automated tool was expressed in the IETF CCAMP Transport NBI Design Team (https://github.com/danielkinguk/transport-nbi).

Getting started

See validation.md for a description of the process.

Prerequisites on Linux:

  • bash 4.3.11
  • python 2.7.6
  • pyang 1.7.1 exactly, not later
  • jing 20131210
  • xmllint optional
  • rfcstrip 0.2 patched to accept -f
  • perl 5.18 or later and also the JSON module
    sudo apt-get install libjson-perl and sudo apt-get install libfile-slurp-perl
  • the folding/unfolding script is downloaded from (https://tools.ietf.org/html/draft-kwatsen-netmod-artwork-folding-08)

Usage

  • Clone the repo and execute following
  • docker build -t jsonyang:1 .
  • docker run -v src:dst -w /json-yang jsonyang:1 ./run.sh dst/<json_path> dst/<yang_path>

Thanks

Many thanks to all the design team and in particular to Carlo Perocchio.

About

How to validate JSON against a YANG module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 48.2%
  • Shell 32.1%
  • Python 17.9%
  • Dockerfile 1.8%