Skip to content

Commit 8c241f2

Browse files
committed
Fix issue DAN-169
1. Added link parameters to Danos yang model. Signed-off-by: akashniral <[email protected]>
1 parent 9ba2817 commit 8c241f2

5 files changed

+253
-0
lines changed

debian/control

+11
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,14 @@ Conflicts: vyatta-protocols-isis-v1-yang
225225
Description: FRR ISIS yang module package
226226
The YANG module package for vyatta-protocols-frr-isis-v1
227227

228+
Package: vyatta-protocols-frr-link-params-v1-yang
229+
Architecture: all
230+
Depends:frr,
231+
vyatta-cfg (>= 0.18.56),vyatta-frr-vci,
232+
vyatta-protocols-frr (>= ${source:Version}),
233+
${misc:Depends},
234+
${yang:Depends}
235+
Conflicts: vyatta-protocols-link-params-v1-yang
236+
Description: FRR LINK-PARAMS yang module package
237+
The YANG module package for vyatta-protocols-frr-link-params-v1
238+

debian/vyatta-frr-vci.component

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Modules=vyatta-protocols-frr-bgp-v1, \
1010
vyatta-protocols-frr-ldp-v1, \
1111
vyatta-protocols-frr-ospf-v1, \
1212
vyatta-protocols-frr-isis-v1, \
13+
vyatta-protocols-frr-link-params-v1, \
1314
vyatta-protocols-frr-ospf-routing-instance-v1, \
1415
vyatta-protocols-frr-switch-vif-ospf-v1, \
1516
vyatta-protocols-frr-ospfv3-v1, \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yang/vyatta-protocols-frr-link-params-v1.yang usr/share/configd/yang/
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"/interfaces/@element/link-params/@enter": "link-params",
3+
"/interfaces/@element/link-params/@exit": "exit-link-params",
4+
"/interfaces/@element/link-params/enable": "enable",
5+
"/interfaces/@element/link-params/admin-grp": "admin-grp {/@text}",
6+
"/interfaces/@element/link-params/ava-bw": "ava-bw {/@text}",
7+
"/interfaces/@element/link-params/delay": "delay {/@text}",
8+
"/interfaces/@element/link-params/delay-variation": "delay-variation {/@text}",
9+
"/interfaces/@element/link-params/max-bw": "max-bw {/@text}",
10+
"/interfaces/@element/link-params/max-rsv-bw": "max-rsv-bw {/@text}",
11+
"/interfaces/@element/link-params/metric": "metric {/@text}",
12+
"/interfaces/@element/link-params/packet-loss": "packet-loss {/@text}",
13+
"/interfaces/@element/link-params/res-bw": "res-bw {/@text}",
14+
"/interfaces/@element/link-params/unrsv-bw": "unrsv-bw {/@text}",
15+
"/interfaces/@element/link-params/use-bw": "use-bw {/@text}"
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
module vyatta-protocols-frr-link-params-v1 {
2+
namespace "urn:vyatta.com:mgmt:vyatta-protocols-frr-link-params:1";
3+
prefix vyatta-protocols-frr-link-params-v1;
4+
5+
import vyatta-types-v1 {
6+
prefix types;
7+
}
8+
import configd-v1 {
9+
prefix configd;
10+
}
11+
import vyatta-interfaces-v1 {
12+
prefix if;
13+
}
14+
import vyatta-interfaces-dataplane-v1 {
15+
prefix interfaces-dataplane;
16+
}
17+
import vyatta-interfaces-loopback-v1 {
18+
prefix interfaces-loopback;
19+
}
20+
import vyatta-interfaces-switch-v1 {
21+
prefix interfaces-switch;
22+
}
23+
24+
organization "Niral Networks Private Limited";
25+
contact
26+
"Niral Networks
27+
Postal: Sigma Soft Tech Park, Whitefield Main Road,
28+
Bengaluru, India 560066
29+
Web: www.niralnetworks.com";
30+
31+
description
32+
"Copyright (c) 2019-2020, Niral Networks Intellectual Property.
33+
All rights reserved.
34+
35+
Redistribution and use in source and binary forms, with or
36+
without modification, are permitted provided that the following
37+
conditions are met:
38+
39+
1. Redistributions of source code must retain the above copyright
40+
notice, this list of conditions and the following disclaimer.
41+
2. Redistributions in binary form must reproduce the above
42+
copyright notice, this list of conditions and the following
43+
disclaimer in the documentation and/or other materials provided
44+
with the distribution.
45+
3. Neither the name of the copyright holder nor the names of its
46+
contributors may be used to endorse or promote products derived
47+
from this software without specific prior written permission.
48+
49+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50+
'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
52+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
53+
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
56+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
57+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
59+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60+
POSSIBILITY OF SUCH DAMAGE.
61+
62+
SPDX-License-Identifier: BSD-3-Clause
63+
The YANG module package for vyatta-protocols-frr-link-params-v1";
64+
65+
revision 2021-03-02 {
66+
description
67+
"Added link-params option.";
68+
}
69+
70+
typedef ieee-float {
71+
type string {
72+
pattern
73+
'0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|'
74+
+ '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|'
75+
+ '1[01][0-9]|0?[0-9]?[0-9])?)';
76+
}
77+
configd:help "IEEE floating point format";
78+
}
79+
80+
typedef float {
81+
type string {
82+
pattern
83+
'(0((\.0?)?[pP](\+)?0?|(\.0?))|'
84+
+ '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|'
85+
+ '1[01][0-9]|0?[0-9]?[0-9])?)';
86+
}
87+
configd:help "floating point format";
88+
}
89+
90+
91+
grouping link-params {
92+
container link-params {
93+
configd:help "Configure interface link parameters";
94+
leaf admin-group {
95+
type string {
96+
pattern "0[Xx][a-fA-F0-9]+";
97+
}
98+
must "(../enable)" {
99+
error-message "link-params enable must be set.";
100+
}
101+
configd:help "Administrative group membership";
102+
description "Administrative group membership";
103+
}
104+
leaf enable {
105+
type empty;
106+
must "(../enable)" {
107+
error-message "link-params enable must be set.";
108+
}
109+
configd:help "Activate link parameters on this interface";
110+
description "Activate link parameters on this interface";
111+
}
112+
113+
leaf available-bandwidth {
114+
type ieee-float;
115+
must "(../enable)" {
116+
error-message "link-params enable must be set.";
117+
}
118+
configd:help "Unidirectional Available Bandwidth";
119+
description "Unidirectional Available Bandwidth";
120+
}
121+
leaf delay {
122+
type uint32 {
123+
range "0..16777215";
124+
}
125+
must "(../enable)" {
126+
error-message "link-params enable must be set.";
127+
}
128+
configd:help "Unidirectional Average Link Delay";
129+
description "Unidirectional Average Link Delay";
130+
}
131+
leaf delay-variation {
132+
type uint32 {
133+
range "0..16777215";
134+
}
135+
must "(../enable)" {
136+
error-message "link-params enable must be set.";
137+
}
138+
configd:help "Unidirectional Link Delay Variation";
139+
description "Unidirectional Link Delay Variation";
140+
}
141+
leaf max-bandwidth {
142+
type ieee-float;
143+
must "(../enable)" {
144+
error-message "link-params enable must be set.";
145+
}
146+
configd:help "Maximum bandwidth that can be used";
147+
description "Maximum bandwidth that can be used";
148+
}
149+
leaf max-reserved-bandwidth {
150+
type ieee-float;
151+
must "(../enable)" {
152+
error-message "link-params enable must be set.";
153+
}
154+
configd:help "Maximum bandwidth that may be reserved";
155+
description "Maximum bandwidth that may be reserved";
156+
}
157+
leaf metric {
158+
type uint32 {
159+
range "1..4294967295";
160+
}
161+
must "(../enable)" {
162+
error-message "link-params enable must be set.";
163+
}
164+
configd:help "Link metric for MPLS-TE purpose";
165+
description "Link metric for MPLS-TE purpose";
166+
}
167+
leaf neighbor {
168+
type types:ipv4-address;
169+
must "(../enable)" {
170+
error-message "link-params enable must be set.";
171+
}
172+
configd:help "Configure remote ASBR information (Neighbor IP address and AS number)";
173+
description "Configure remote ASBR information (Neighbor IP address and AS number)";
174+
}
175+
leaf packet-loss {
176+
type float;
177+
must "(../enable)" {
178+
error-message "link-params enable must be set.";
179+
}
180+
configd:help "Configure remote ASBR information (Neighbor IP address and AS number)";
181+
description "Configure remote ASBR information (Neighbor IP address and AS number)";
182+
183+
}
184+
leaf residual-bandwidth {
185+
type ieee-float;
186+
must "(../enable)" {
187+
error-message "link-params enable must be set.";
188+
}
189+
configd:help "Unidirectional Residual Bandwidth";
190+
description "Unidirectional Residual Bandwidth";
191+
}
192+
leaf unreserved-bandwidth {
193+
type float;
194+
must "(../enable)" {
195+
error-message "link-params enable must be set.";
196+
}
197+
configd:help "Unreserved bandwidth at each priority level";
198+
description "Unreserved bandwidth at each priority level";
199+
}
200+
leaf utilised-bandwidth {
201+
type ieee-float;
202+
must "(../enable)" {
203+
error-message "link-params enable must be set.";
204+
}
205+
configd:help "Unidirectional Utilised Bandwidth";
206+
description "Unidirectional Utilised Bandwidth";
207+
208+
}
209+
}
210+
}
211+
212+
augment /if:interfaces/interfaces-dataplane:dataplane {
213+
uses link-params;
214+
}
215+
augment /if:interfaces/interfaces-dataplane:dataplane/interfaces-dataplane:vif/interfaces-dataplane:ip {
216+
uses link-params;
217+
}
218+
augment /if:interfaces/interfaces-loopback:loopback {
219+
uses link-params;
220+
}
221+
augment /if:interfaces/interfaces-switch:switch/interfaces-switch:vif {
222+
uses link-params;
223+
}
224+
}

0 commit comments

Comments
 (0)