Posts

Getting started with YANG MODEL

In nutshell, YANG is a data modelling language, by which you can define the semantic and syntactic of your data file. - pyang is a tool that helps to validate YANG model, as well as validate corresponding data file against its YANG model: $ sudo apt install python-setuptools $ git clone https://github.com/mbj4668/pyang $ cd pyang $ source env.sh make sure all environment variables are set correctly To start validate a very simple YANG model and its data file go to: http://www.yang-central.org/twiki/bin/view/Main/DSDLMappingTutorial Fortunately, this example is already exist in pyang/doc/tutorial, run this command while you are in this direcoty: $  yang2dsdl -b aug-acme-system acme-system.yang extra-interface-nodes.yang Then this command to verify that xml file is complied with the YANG model $   yang2dsdl -s -b aug-acme-system -v aug-acme-system-data.xml A simple example of YANG model would be: acme-system.yang file module acme-system {     namespace "http:/