blob: b7dcf7ab37a3c9bac9c901f8b0614ce6c34f8be1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
What's this ?
=============
This is a pyang plugin to generate config/bgp_configs.go from
openconfig yang files (see [https://github.com/openconfig/public](https://github.com/openconfig/public))
How to use
==========
::
$ git clone https://github.com/openconfig/public
$ git clone https://github.com/YangModels/yang
$ YANG_DIR=`pwd`
$ cd $PYANG_INSTALL_DIR
$ source ./env.sh
$ PYTHONPATH=. ./bin/pyang --plugindir $GOBGP_PATH/tools/pyang_plugins \
-p $YANG_DIR/yang/standard/ietf/RFC \
-p $YANG_DIR/public/release/models \
-p $YANG_DIR/public/release/models/bgp \
-p $YANG_DIR/public/release/models/policy \
-f golang $YANG_DIR/public/release/models/bgp/openconfig-bgp.yang \
$YANG_DIR/public/release/modesl/policy/openconfig-routing-policy.yang \
$GOBGP_PATH/tools/pyang_plugins/gobgp.yang \
| gofmt > $GOBGP_PATH/config/bgp_configs.go
|