blob: 311b315554956a83a52e477b9892b4c79ac46858 [file] [log] [blame]
Thomas Vachuska8ca75a22017-08-24 16:12:59 -07001module openconfig-transport-line-protection {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/optical-transport-line-protection";
7
8 prefix "oc-line-protect";
9
10 import openconfig-extensions { prefix oc-ext; }
11 import openconfig-types { prefix oc-types; }
12 import openconfig-platform { prefix oc-platform; }
13
14 // meta
15 organization "OpenConfig working group";
16
17 contact
18 "OpenConfig working group
19 www.openconfig.net";
20
21 description
22 "This model describes configuration and operational state data
23 for optical line protection elements, deployed as part of a
24 transport line system. An Automatic Protection Switch (APS)
25 is typically installed in the same device as the amplifiers
26 and wave-router, however an APS can also be a standalone
27 device. In both scenarios, it serves the same purpose of
28 providing protection using two dark fiber pairs to ensure the
29 amplifiers can still receive a signal if one of the two fiber
30 pairs is broken.";
31
32 //
33 // Automatic Protection Switch (APS) port details and directionality.
34 // _________
35 // | |
36 // | | <=== LINE-PRIMARY-IN
37 // | |
38 // COMMON-IN ===> | | ===> LINE-PRIMARY-OUT
39 // | |
40 // | APS |
41 // COMMON-OUT <=== | |
42 // | | <=== LINE-SECONDARY-IN
43 // | |
44 // | | ===> LINE-SECONDARY-OUT
45 // |_______|
46 //
47
48 oc-ext:openconfig-version "0.3.0";
49
50 revision "2017-07-08" {
51 description
52 "Support multiple OCMs, add monitor port type
53 and refs to hw ports, ";
54 reference "0.3.0";
55 }
56
57 revision "2017-03-28" {
58 description
59 "Added min/max/avg stats, status for media channels, OCM, APS";
60 reference "0.2.0";
61 }
62
63 revision "2016-08-05" {
64 description
65 "Initial public release";
66 reference "0.1.0";
67 }
68
69 // extension statements
70
71 // feature statements
72
73 // identity statements
74
75 identity APS_PATHS {
76 description
77 "Base identity for identifying the line paths on an
78 automatic protection switch";
79 }
80
81 identity PRIMARY {
82 base APS_PATHS;
83 description
84 "The primary line path connected to an automatic protection
85 switch port indicating the primary/preferred path";
86 }
87
88 identity SECONDARY {
89 base APS_PATHS;
90 description
91 "The secondary line path connected to an automatic protection
92 switch port indicating the secondary path";
93 }
94
95 // grouping statements
96
97 grouping aps-input-port-config {
98 description
99 "Grouping for config related to unidirectional automatic
100 protection switch input ports";
101
102 leaf enabled {
103 type boolean;
104 default "true";
105 description
106 "This leaf contains the configured, desired state of the
107 port. Disabling the port turns off alarm reporting for
108 the port";
109 }
110
111 leaf target-attenuation {
112 type decimal64 {
113 fraction-digits 2;
114 }
115 units dB;
116 description
117 "Target attenuation of the variable optical attenuator
118 associated with the port in increments of 0.01 dB.";
119 }
120 }
121
122 grouping aps-output-port-config {
123 description
124 "Grouping for config related to unidirectional automatic
125 protection switch output ports";
126
127 leaf target-attenuation {
128 type decimal64 {
129 fraction-digits 2;
130 }
131 units dB;
132 description
133 "Target attenuation of the variable optical attenuator
134 associated with the port in increments of 0.01 dB";
135 }
136 }
137
138 grouping aps-input-port-state {
139 description
140 "Grouping for state related to unidirectional automatic
141 protection switch input ports";
142
143 leaf attenuation {
144 type decimal64 {
145 fraction-digits 2;
146 }
147 units dB;
148 description
149 "The attenuation of the variable optical attenuator
150 associated with the port in increments of 0.01 dB.";
151 }
152
153 container optical-power {
154 description
155 "The optical input power of this port in units of
156 0.01dBm. Optical input power represents the signal
157 traversing from an external destination into the module.
158 The power is measured before any attenuation. If avg/min/max
159 statistics are not supported, the target is expected to
160 just supply the instant value";
161
162 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
163 }
164 }
165
166 grouping aps-output-port-state {
167 description
168 "Grouping for state related to unidirectional automatic
169 protection switch output ports";
170
171 leaf attenuation {
172 type decimal64 {
173 fraction-digits 2;
174 }
175 units dB;
176 description
177 "The attenuation of the variable optical attenuator
178 associated with the port in increments of 0.01 dB";
179 }
180
181 container optical-power {
182 description
183 "The optical output power of this port in units of
184 0.01dBm. Optical output power represents the signal
185 traversing from the module to an external destination. The
186 power is measured after any attenuation. If avg/min/max
187 statistics are not supported, the target is expected to
188 just supply the instant value";
189
190 uses oc-types:avg-min-max-instant-stats-precision2-dBm;
191 }
192 }
193
194 grouping aps-ports {
195 description
196 "Top level grouping for automatic protection switch ports";
197
198 container line-primary-in {
199 description
200 "Container for information related to the line primary
201 input port";
202
203 container config {
204 description
205 "Configuration data for the line primary input port";
206
207 uses aps-input-port-config;
208 }
209
210 container state {
211
212 config false;
213
214 description
215 "State data for the line primary input port";
216
217 uses aps-input-port-config;
218 uses aps-input-port-state;
219 }
220
221 }
222
223 container line-primary-out {
224 description
225 "Container for information related to the line primary
226 output port";
227
228 container config {
229 description
230 "Configuration data for the line primary output port";
231
232 uses aps-output-port-config;
233 }
234
235 container state {
236
237 config false;
238
239 description
240 "State data for the line primary output port";
241
242 uses aps-output-port-config;
243 uses aps-output-port-state;
244 }
245 }
246
247 container line-secondary-in {
248 description
249 "Container for information related to the line secondary
250 input port";
251
252 container config {
253 description
254 "Configuration data for the line secondary input port";
255
256 uses aps-input-port-config;
257 }
258
259 container state {
260
261 config false;
262
263 description
264 "State data for the line secondary input port";
265
266 uses aps-input-port-config;
267 uses aps-input-port-state;
268 }
269 }
270
271 container line-secondary-out {
272 description
273 "Container for information related to the line secondary
274 output port";
275
276 container config {
277 description
278 "Configuration data for the line secondary output port";
279
280 uses aps-output-port-config;
281 }
282
283 container state {
284
285 config false;
286
287 description
288 "State data for the line secondary output port";
289
290 uses aps-output-port-config;
291 uses aps-output-port-state;
292 }
293 }
294
295 container common-in {
296 description
297 "Container for information related to the line common
298 input port";
299
300 container config {
301 description
302 "Configuration data for the line common input port";
303
304 uses aps-input-port-config;
305 }
306
307 container state {
308
309 config false;
310
311 description
312 "State data for the line common input port";
313
314 uses aps-input-port-config;
315 uses aps-input-port-state;
316 }
317 }
318
319 container common-output {
320 description
321 "Container for information related to the line common
322 output port";
323
324 container config {
325 description
326 "Configuration data for the line common output port";
327
328 uses aps-output-port-config;
329 }
330
331 container state {
332
333 config false;
334
335 description
336 "State data for the line common output port";
337
338 uses aps-output-port-config;
339 uses aps-output-port-state;
340 }
341 }
342 }
343
344 grouping aps-config {
345 description
346 "Configuration data for automatic protection switch modules";
347
348 leaf name {
349 type leafref {
350 path "/oc-platform:components/oc-platform:component/" +
351 "oc-platform:name";
352 }
353 description
354 "Reference to the component name (in the platform model)
355 corresponding to this automatic protection switch module
356 in the device";
357 }
358
359 leaf revertive {
360 type boolean;
361 description
362 "Revertive behavior of the module.
363 If True, then automatically revert after protection switch
364 once the fault is restored.";
365 }
366
367 leaf primary-switch-threshold {
368 type decimal64 {
369 fraction-digits 2;
370 }
371 units dBm;
372 description
373 "The threshold at which the primary line port will switch to
374 the opposite line port in increments of 0.01 dBm. If the
375 hardware supports only one switch threshold for primary and
376 and secondary ports then it is recommended to set both
377 primary-switch-threshold and secondary-switch-threshold to
378 the same value to be explicit";
379 }
380
381 leaf primary-switch-hysteresis {
382 type decimal64 {
383 fraction-digits 2;
384 }
385 units dB;
386 description
387 "The delta in 0.01 dB between the primary-switch-threshold
388 and the signal received before initiating a reversion in
389 order to prevent toggling between ports when an input
390 signal is very close to threshold. If the hardware supports
391 only one switch hysteresis for primary and secondary ports
392 then it is recommended to set both primary-switch-threshold
393 and secondary-switch-threshold to the same value to be
394 explicit";
395 }
396
397 leaf secondary-switch-threshold {
398 type decimal64 {
399 fraction-digits 2;
400 }
401 units dBm;
402 description
403 "The threshold at which the secondary line port will switch to
404 the opposite line port in increments of 0.01 dBm. If the
405 hardware supports only one switch threshold for primary and
406 and secondary ports then it is recommended to set both
407 primary-switch-threshold and secondary-switch-threshold to
408 the same value to be explicit";
409 }
410
411 leaf secondary-switch-hysteresis {
412 type decimal64 {
413 fraction-digits 2;
414 }
415 units dB;
416 description
417 "The delta in 0.01 dB between the secondary-switch-threshold
418 and the signal received before initiating a reversion in
419 order to prevent toggling between ports when an input
420 signal is very close to threshold. If the hardware supports
421 only one switch hysteresis for primary and secondary ports
422 then it is recommended to set both primary-switch-threshold
423 and secondary-switch-threshold to the same value to be
424 explicit";
425 }
426 }
427
428 grouping aps-state {
429 description
430 "State data for automatic protection switch modules";
431
432 leaf active-path {
433 type identityref {
434 base APS_PATHS;
435 }
436 description
437 "Indicates which line path on the automatic protection switch
438 is currently the active path connected to the common port";
439 }
440 }
441
442 grouping automatic-protection-switch-top {
443 description
444 "Top level grouping for automatic protection switch data";
445
446 container aps-modules {
447 description
448 "Enclosing container for list of automatic protection
449 switch modules";
450
451 list aps-module {
452 key "name";
453 description
454 "List of automatic protection switch modules present
455 in the device";
456
457 leaf name {
458 type leafref {
459 path "../config/name";
460 }
461 description
462 "Reference to the config name list key";
463 }
464
465 container config {
466 description
467 "Configuration data for an automatic protection
468 switch module";
469
470 uses aps-config;
471 }
472
473 container state {
474
475 config false;
476
477 description
478 "Operational state data for an automatic protection
479 switch module";
480
481 uses aps-config;
482 uses aps-state;
483 }
484
485 container ports {
486 description
487 "Top level grouping for automatic protection switch ports";
488
489 uses aps-ports;
490 }
491 }
492 }
493 }
494
495 grouping transport-line-protection-top {
496 description
497 "Top level grouping for transport line protection data";
498
499 container aps {
500 description
501 "Top level grouping for automatic protection switch data";
502
503 uses automatic-protection-switch-top;
504 }
505 }
506
507 // data definition statements
508
509 uses transport-line-protection-top;
510
511}