From 369626d2221bb175fbf81bd59738104f77aca835 Mon Sep 17 00:00:00 2001 From: Satoshi Fujimoto Date: Thu, 15 Jun 2017 08:55:16 +0900 Subject: config: Option to enable Dynamic Neighbor Signed-off-by: Satoshi Fujimoto --- tools/pyang_plugins/gobgp.yang | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'tools/pyang_plugins') diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang index adac3956..0d8025e6 100644 --- a/tools/pyang_plugins/gobgp.yang +++ b/tools/pyang_plugins/gobgp.yang @@ -1126,6 +1126,45 @@ module gobgp { uses listen-config; } + grouping dynamic-neighbors { + container dynamic-neighbors { + list dynamic-neighbor { + key "prefix"; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + } + + container config { + uses bgp-global-dynamic-neighbor-config; + } + + container state { + config false; + uses bgp-global-dynamic-neighbor-config; + } + } + } + } + + grouping bgp-global-dynamic-neighbor-config { + description "A dynamic neighbor belongs to a peer group. + This configuration structure was taken from the latest openconfig."; + + leaf prefix { + type string; + } + leaf peer-group { + type string; + } + } + + augment "/bgp:bgp" { + uses dynamic-neighbors; + } + augment "/bgp:bgp/bgp:global/bgp:afi-safis/bgp:afi-safi" { uses bgp-mp:all-afi-safi-common; } -- cgit v1.2.3