summaryrefslogtreecommitdiffhomepage
path: root/tools/pyang_plugins/README.rst
blob: 4d45904e839f7606766a14cd85405935cbdb7182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
What's this ?
=============
This is a pyang plugin to generate config/bgp_configs.go from
openconfig yang files.

Currently, we made some modifications to the yang files:

   https://github.com/osrg/yang/tree/gobgp


How to use
==========
::

   $ git clone -b gobgp https://github.com/osrg/yang
   $ YANG_DIR=`pwd`/yang/experimental/openconfig
   $ cd $PYANG_INSTALL_DIR
   $ source ./env.sh
   $ PYTHONPATH=. ./bin/pyang --plugindir $GOBGP_PATH/tools/pyang_plugins \
   -p $YANG_DIR/bgp -p $YANG_DIR/policy \
   -f golang $YANG_DIR/bgp/bgp.yang \
   --augment $YANG_DIR/bgp/bgp-policy.yang |gofmt > $GOBGP_PATH/config/bgp_configs.go