diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-17 08:50:55 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-17 08:52:28 +0900 |
commit | 8fd25af4ce9ab902e24eb06644ef2e9c42cee7e0 (patch) | |
tree | fca38cf5df338ca0abae36c4579fb551fef2a66d /tools/pyang_plugins | |
parent | 949c58fbf6d5ccb79ee87a5105968d3fe591a3a9 (diff) |
zebra: make zebra config consistent with the rests
- split config and state
- move to Bgp structure (aligned with Rpki, Bmp, and Mrt)
Also makes zebra configured via GRPC channel.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools/pyang_plugins')
-rw-r--r-- | tools/pyang_plugins/gobgp.yang | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang index c15f3bc6..325942f2 100644 --- a/tools/pyang_plugins/gobgp.yang +++ b/tools/pyang_plugins/gobgp.yang @@ -775,29 +775,39 @@ module gobgp { uses gobgp-mrt; } - augment "/bgp:bgp/bgp:global" { - description "zebra configuration"; - container zebra { - description - "Configure connection to zebra"; - leaf enabled { - type boolean; - description - "Configure enabling to connect to zebra."; + grouping zebra-config { + leaf enabled { + type boolean; + description + "Configure enabling to connect to zebra."; + } + leaf url { + type string; + description + "Configure url for zebra."; + } + leaf-list redistribute-route-type { + type identityref { + base ptypes:install-protocol-type; } - leaf url { - type string; - description - "Configure url for zebra."; + } + } + + grouping zebra-set { + container zebra { + container config { + uses zebra-config; } - leaf-list redistribute-route-type { - type identityref { - base ptypes:install-protocol-type; - } + container state { + uses zebra-config; } } } + augment "/bgp:bgp" { + uses zebra-set; + } + augment "/bgp:bgp/bgp:global" { container mpls-label-range { description "mpls labal range"; |