summaryrefslogtreecommitdiffhomepage
path: root/tools/pyang_plugins/gobgp.yang
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-06-15 08:55:16 +0900
committerSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2017-06-16 15:53:07 +0900
commit369626d2221bb175fbf81bd59738104f77aca835 (patch)
tree32c23b5f60bc02d950ce5307fb4dcc4c3ca7f46a /tools/pyang_plugins/gobgp.yang
parentbe2524ee3e158a0d248d730f727da80bab09aed8 (diff)
config: Option to enable Dynamic Neighbor
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'tools/pyang_plugins/gobgp.yang')
-rw-r--r--tools/pyang_plugins/gobgp.yang39
1 files changed, 39 insertions, 0 deletions
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;
}