Web UI for the yangre tool
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
.gitignore
LICENSE
README.md
config.py
w3cgrep.c
wsgi.py
yangre.ini-dist

README.md

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 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.

Best is to start it via the YANGRE.INI file as a UWSGI vassal (for example by linking /etc/uwsgi/vassals/yangre.ini to the yangre.ini-dist of this repo).

Prerequisites

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

Nginx configuration

        location /yangre/static {
                alias /home/yang/yangre/app/static ;
        }

        location /yangre {
            include uwsgi_params;
            uwsgi_pass 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! :)