If you haven't already - it's best to start with the README.md file in the main repository. This provides a quick-start guide to PyangBind, including a walk-through of how to use PyangBind to manipulate an OpenConfig model. Reading this will give some context around where you might want to start reading in this documentation.
The docs directory contains the following documents:
- Errors -- explains the errors that PyangBind classes will throw.
- Extension Methods -- usage and intention of the
extmethodsfunctionality in PyangBind - Generic Methods -- the methods that the PyangBind meta-class defines, as well as methods that are added for YANG-specific types such as
containerandlist. - RPC -- explains PyangBind's support for the YANG
rpcstatement, and how one may use this functionality. - Serialisation and Deserialisation -- covers how PyangBind's
lib.serialiseandlib.pybindJSONclasses can be used to output and load instances of data that have been created with a program using PyangBind's classes. - Usage -- documents the command-line switches that PyangBind uses.
- XPathHelper -- provides information relating to PyangBind's optional
XPathHelperclasses which are used to resolve XPATH expressions and can be used to traverse a data tree consisting on multiple models. - YANG -- gives an overview of how various YANG language features are supported in PyangBind.
In order to allow new users to quickly see how PyangBind might work for them, some examples are included in this directory:
example/oc-network-instanceuses the OpenConfignetwork-instancemodule as an example and shows how one can build static routes using this module. The main directory's README.md provides a worked example of this.example/simple-rpcshows how a YANGrpcdefinition can be manipulated when PyangBind classes are generated for it. The RPC document provides further explanation of this example.example/simple-serialiseshows how PyangBind's serialisation and deserialisation capabilities work. The serialisation document walks through this example.
In order to understand some of the internals of PyangBind a bit better, the tests directory may also be useful - this provides numerous test cases intended to ensure PyangBind keeps working the way one would expect, but can be a valuable source of pointers as to how things might work.
Please open an issue. The author (singular for the moment!) tries to help out where he can.
