Skip to content

YangCatalog/yangre

Repository files navigation

yangre-gui

Yangre-gui is the idea of Benoit Claise and was built by Pieter Lewyllie for the IETF 99 Hackathon

It is a GUI on top of W3C-compliant regex validators like w3cgrep and yangre (one of the tools from libyang) so that one can be sure their regexs will work in YANG models.

For context, this was a major issue that Openconfig had. While there were a number of POSIX/Perl validators like regex101.com, there wasn't a W3C one.

Getting Started

After cloning the project:

  • compile and install the w3cgrep utility (it may be required to explicitly install and link with libxml2);
  • configure config.py based on config.py-dist with the appropriate paths for the yangre and w3cgrep executables. I had some issues with yangre not finding the right library files, so I included an explicit path to the library. Feel free to remove or customize this as needed.

Prerequisites

  • Have w3cgrep and yangre installed on the local machine
  • Python 3.5
  • Flask

Nginx configuration

location /yangre/v1 {
    proxy_pass http://unix:/var/run/yang/yangre.sock ;
}

Resources

Special notes on YANG Catalog edition

The scripts have been tuned to be integrated into https://yangcatalog.org and the docker directory has been removed.

Acknowledgments

Thanks to Joe Clarke, Radek Krejci, all the testers from IETF and especially Benoit Claise for allowing me to participate! :)