summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2019-10-08 18:17:12 -0700
committerChirag Shah <chirag@cumulusnetworks.com>2019-10-10 07:44:33 -0700
commit1b9468cc7c02708a48ce0e2113a5cd10f59151aa (patch)
treeb8fccff5741465747db849475941adf2036cacfa
parent3d2ab385ca355cf28eae5a5e1f166df995a5d5f4 (diff)
yang: add range to string nodes in zebra modules
Add range to few of the string nodes (including vrf, iptable names) Use interface reference instead of interface string. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
-rw-r--r--yang/frr-nexthop.yang9
-rw-r--r--yang/frr-zebra.yang42
2 files changed, 38 insertions, 13 deletions
diff --git a/yang/frr-nexthop.yang b/yang/frr-nexthop.yang
index d844e38428..7d8ce1b8ed 100644
--- a/yang/frr-nexthop.yang
+++ b/yang/frr-nexthop.yang
@@ -10,6 +10,9 @@ module frr-nexthop {
import ietf-routing-types {
prefix rt-types;
}
+ import frr-interface {
+ prefix frr-interface;
+ }
organization
"Free Range Routing";
@@ -112,13 +115,15 @@ module frr-nexthop {
}
leaf vrf {
- type string;
+ type string {
+ length "1..36";
+ }
description
"The nexthop vrf name, if different from the route.";
}
leaf interface {
- type string;
+ type frr-interface:interface-ref;
description
"The nexthop egress interface.";
}
diff --git a/yang/frr-zebra.yang b/yang/frr-zebra.yang
index 43e92eba09..74922a22f7 100644
--- a/yang/frr-zebra.yang
+++ b/yang/frr-zebra.yang
@@ -129,7 +129,9 @@ module frr-zebra {
description
"Common information about a route.";
leaf vrf {
- type string;
+ type string {
+ length "1..36";
+ }
description
"The route's vrf name.";
}
@@ -306,7 +308,9 @@ module frr-zebra {
}
leaf vrf {
- type string;
+ type string {
+ length "1..36";
+ }
description
"The tenant VRF.";
}
@@ -360,7 +364,7 @@ module frr-zebra {
grouping vni-l3-detail {
leaf svi-interface {
- type string;
+ type frr-interface:interface-ref;
description
"The SVI interface.";
}
@@ -556,7 +560,9 @@ module frr-zebra {
choice vrf-choice {
case single {
leaf vrf {
- type string;
+ type string {
+ length "1..36";
+ }
description
"Retrieve routes in a non-default vrf.";
}
@@ -654,7 +660,9 @@ module frr-zebra {
choice vrf-choice {
case single {
leaf vrf {
- type string;
+ type string {
+ length "1..36";
+ }
description
"Retrieve routes in a non-default vrf.";
}
@@ -690,7 +698,9 @@ module frr-zebra {
output {
list vrf-list {
leaf name {
- type string;
+ type string {
+ length "1..36";
+ }
description
"The VRF name";
}
@@ -745,7 +755,9 @@ module frr-zebra {
output {
list vrf-vni-list {
leaf vrf-name {
- type string;
+ type string {
+ length "1..36";
+ }
description
"The VRF name.";
}
@@ -1467,7 +1479,9 @@ module frr-zebra {
rpc get-pbr-ipset {
input {
leaf name {
- type string;
+ type string {
+ length "1..32";
+ }
description
"An optional specific IPset name.";
}
@@ -1476,7 +1490,9 @@ module frr-zebra {
output {
list ipset-list {
leaf name {
- type string;
+ type string {
+ length "1..32";
+ }
description
"The IPset name.";
}
@@ -1606,7 +1622,9 @@ module frr-zebra {
rpc get-pbr-iptable {
input {
leaf name {
- type string;
+ type string {
+ length "1..32";
+ }
description
"An optional single IPtable name.";
}
@@ -1615,7 +1633,9 @@ module frr-zebra {
output {
list iptable-list {
leaf name {
- type string;
+ type string {
+ length "1..32";
+ }
description
"The IPtable name.";
}