PyangBind’s documentation consists is broken down in the following:
- Getting Started – an overview and worked example of PyangBind’s functionality.
- Usage – documents the command-line switches that PyangBind uses.
- Generic Methods – the methods that the PyangBind meta-class defines, as well as methods that are added for YANG-specific types such as
- Errors – explains the errors that PyangBind classes will throw.
- Serialisation and Deserialisation – covers how PyangBind’s
lib.pybindJSONclasses can be used to output and load instances of data that have been created with a program using PyangBind’s classes.
- 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.
- Extension Methods – usage and intention of the
extmethodsfunctionality in PyangBind
- RPC – explains PyangBind’s support for the YANG
rpcstatement, and how one may use this functionality.
- 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-local-routinguses the OpenConfig
local-routingmodule an example and shows how one can build static routes using this module. The Getting Started documentation walks through this example.
example/simple-rpcshows how a YANG
rpcdefinition 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.
If you’re stuck…
Please open an issue. The author (singular for the moment!) tries to help out where he can.