diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-09-09 18:59:09 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-09-10 22:29:10 +0200 |
commit | f22b9250853229c93617ffdad139a4762f5f7348 (patch) | |
tree | 7a16186c64ede82b7abdfa07a1ea9b742cc4f19f /yang/frr-ripd.yang | |
parent | Merge pull request #4952 from mjstapp/fix_bgp_peer_hook (diff) | |
download | frr-f22b9250853229c93617ffdad139a4762f5f7348.tar.xz frr-f22b9250853229c93617ffdad139a4762f5f7348.zip |
yang: create interface reference type
Instead of copy-pasting a 16 character string type for use as an
interface reference, create a new typedef that leafref's the name node
of an interface. This way the constraints change with the constraints on
an interface name itself, and it's self documenting.
Incidentally ripd and ripngd forgot the 16 character constraint in their
offset-list configs and IS-IS forgot it entirely, so this also fixes
minor bugs.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'yang/frr-ripd.yang')
-rw-r--r-- | yang/frr-ripd.yang | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/yang/frr-ripd.yang b/yang/frr-ripd.yang index 07690793f..94a9ebf3e 100644 --- a/yang/frr-ripd.yang +++ b/yang/frr-ripd.yang @@ -24,6 +24,11 @@ module frr-ripd { description "This module defines a model for managing FRR ripd daemon."; + revision 2019-09-09 { + description + "Changed interface references to use + frr-interface:interface-ref typedef"; + } revision 2017-12-06 { description "Initial revision."; @@ -113,9 +118,7 @@ module frr-ripd { "Enable RIP on the specified IP network."; } leaf-list interface { - type string { - length "1..16"; - } + type frr-interface:interface-ref; description "Enable RIP on the specified interface."; } @@ -124,7 +127,15 @@ module frr-ripd { description "Offset-list to modify route metric."; leaf interface { - type string; + type union { + type frr-interface:interface-ref; + type enumeration { + enum '*' { + description + "Match all interfaces."; + } + } + } description "Interface to match. Use '*' to match all interfaces."; } @@ -168,18 +179,14 @@ module frr-ripd { } leaf-list passive-interface { when "../passive-default = 'false'"; - type string { - length "1..16"; - } + type frr-interface:interface-ref; description "A list of interfaces where the sending of RIP packets is disabled."; } leaf-list non-passive-interface { when "../passive-default = 'true'"; - type string { - length "1..16"; - } + type frr-interface:interface-ref; description "A list of interfaces where the sending of RIP packets is enabled."; |