diff options
author | Sarita Patra <saritap@vmware.com> | 2020-10-30 07:40:10 +0100 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-30 21:58:42 +0200 |
commit | b702f424455b208cd4171f84048c65ec8a349184 (patch) | |
tree | ed6da7252813ce7279227a1e8a3ebde3d4520095 /yang/frr-zebra-route-map.yang | |
parent | Merge pull request #8058 from rgirada/ospf-ecmp (diff) | |
download | frr-b702f424455b208cd4171f84048c65ec8a349184.tar.xz frr-b702f424455b208cd4171f84048c65ec8a349184.zip |
lib,zebra,bgpd,ospfd,ospf6d: Route-map yang defns
This commit includes the following:
1) Modifications to the frr-route-map.yang to enable addition of
bgpd, ospfd, ospf6d and zebra specific route map match/set clauses.
2) Yang definitions for bgpd match/set clauses.
3) Yang definitions for ospfd and ospf6d match/set clauses.
4) Yang definitions for zebra match/set clauses.
Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'yang/frr-zebra-route-map.yang')
-rw-r--r-- | yang/frr-zebra-route-map.yang | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/yang/frr-zebra-route-map.yang b/yang/frr-zebra-route-map.yang new file mode 100644 index 000000000..91f4c87e3 --- /dev/null +++ b/yang/frr-zebra-route-map.yang @@ -0,0 +1,126 @@ +module frr-zebra-route-map { + yang-version 1.1; + namespace "http://frrouting.org/yang/zebra-route-map"; + prefix frr-zebra-route-map; + + import ietf-inet-types { + prefix inet; + } + + import frr-route-map { + prefix frr-route-map; + } + + import frr-route-types { + prefix frr-route-types; + } + + organization + "Free Range Routing"; + contact + "FRR Users List: <mailto:frog@lists.frrouting.org> + FRR Development List: <mailto:dev@lists.frrouting.org>"; + description + "This module defines zebra route map settings"; + + revision 2020-01-02 { + description + "Initial revision"; + } + + identity ipv4-prefix-length { + base frr-route-map:rmap-match-type; + description + "Match IPv4 address prefix length"; + } + + identity ipv4-next-hop-prefix-length { + base frr-route-map:rmap-match-type; + description + "Match IPv4 next-hop address prefix length"; + } + + identity ipv6-prefix-length { + base frr-route-map:rmap-match-type; + description + "Match IPv6 address prefix length"; + } + + identity source-instance { + base frr-route-map:rmap-match-type; + description + "Match the protocol's instance number"; + } + + identity source-protocol { + base frr-route-map:rmap-match-type; + description + "Match protocol via which the route was learnt"; + } + + identity src-address { + base frr-route-map:rmap-set-type; + description + "Set IPv4/IPv6 source address for route"; + } + + augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:rmap-match-condition/frr-route-map:match-condition" { + case ipv4-prefix-length { + when "derived-from-or-self(../condition, 'ipv4-prefix-length') or " + + "derived-from-or-self(../condition, 'ipv4-next-hop-prefix-length')"; + leaf ipv4-prefix-length { + type uint8 { + range "0..32"; + } + } + } + + case ipv6-prefix-length { + when "derived-from-or-self(../condition, 'ipv6-prefix-length')"; + leaf ipv6-prefix-length { + type uint8 { + range "0..128"; + } + } + } + + case source-instance { + when "derived-from-or-self(../condition, 'source-instance')"; + leaf source-instance { + type uint8 { + range "0..255"; + } + } + } + + case source-protocol { + when "derived-from-or-self(../condition, 'source-protocol')"; + leaf source-protocol { + type frr-route-types:frr-route-types; + } + } + } + + augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:rmap-set-action/frr-route-map:set-action" { + case src-address { + when "derived-from-or-self(../action, 'src-address')"; + choice src-address { + description + "Value of the source address"; + case ipv4-src-address { + leaf ipv4-src-address { + type inet:ipv4-address; + mandatory true; + } + } + + case ipv6-src-address { + leaf ipv6-src-address { + type inet:ipv6-address; + mandatory true; + } + } + } + } + } +} |