Yang XML viewer Code
PyGtk2-based application that shows Yang-models as Treeview
Brought to you by:
felipito
README ------ This a PyGtk2 application for displaying a Yang model as a GtkTreeView. It also allows to use a Netconf client (see [1]) for sending requests to a remote target and displaying the response. For creating the XML tree is required to have Pyang [2] installed on your system. The first step is to create own application settings, you can copy the below lines to a xml file like "settings.xml" <?xml version="1.0" ?> <yang_xml_settings> <pyang>/bin/pyang</pyang> <paths>/usr/include</paths> <netconf>/bin/netconf-console</netconf> <target>192.168.1.2</target> </yang_xml_settings> These settings can be modified with the graphical interface too, for an initial start it doesn't matter if the values are wrong. Now, start the application with the following line: $ python main.py -s settings.xml & Now with the Open button of the menubar can display a Yang model. The two below widgets have own purposes: left: display the status/response of Netconf requests. A request can be sent on two different ways: Double click on the model treeview or using the right list right: this is a list of leafs/lists than is filled per drag&drop with rows from the model treeview. [1] https://github.com/tail-f-systems/JNC/blob/master/examples/2-junos/netconf-console [2] https://code.google.com/p/pyang/