YANG Creator

The online YANG creator, editor, and exporter. With YANG Creator you can manage existing files which are saved to your account, create new example module/submodule, validate your YANG module using libyang GitHub via npm package libyang, export and save YANG modules/submodules. YANG Creator is designed to be run locally and it comes preloaded with standard IETF models. Written in Node.js, the YANG Creator uses the latest modern technologies (HTML5, CSS and JavaScript). Furthermore, development is eased by YANG Creator offering a public service where users can log in and experiment with YANG modules and submodules. Once users are logged in, the data they insert is saved until the docker container is shut down.

YANG Creator is a great tool for novice users who are still learning syntax rules and can serve as an introduction into the Sysrepo project.

Project history

Similarly to testconf, YANG Creator was also one of the NETCONF/YANG utilities which was ported to libyang (one of Sysrepo's main dependency), through which the tool switched to the community standard YANG backend. Initially, the tool enabled code generation where prototype code templates could be generated for C language in both plugin and application mode. Showcase of this can be seen here.

Installation

This section will guide you how to install YANG Creator on a fresh Ubuntu 16.04 build. Follow the steps or watch the video below:

Head into yang-creator directory. Due to a known nodejs binary naming conflict, we will also need to symlink /usr/bin/node to /usr/bin/nodejs and specify that we will use python2 version. After that issue npm install:

Usage

After you have run the server, access YANG Creator by opening http://127.0.0.1:8888/ in your browser. You should get the following screen:

To manage your YANG files, enter your e-mail address and password. If there are any modules that import other modules, these dependent modules will need to be created/imported and saved, after which they can be used. Let us see which options are available in YANG Creator:

Files

Using this option you can manage (edit or remove, download or export source code) files which you have saved in your account. You can also reset your YANG database and start from scratch.

New

This option is used for creating new modules and submodules.

Validate

By clicking Validate, on the right side of the screen you should see whether your YANG module is valid or not. Validation is performed using pyang.