blob: 0fd668f869d0fb96c342271334aed0ff9a3bb0e4 [file] [log] [blame]
Jeff Groom34c28ce2018-04-26 19:42:18 -06001module ciena-waveserver-port {
2 namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-port";
3 prefix port;
4
5 import ciena-waveserver-typedefs {
6 prefix cienawstypes;
7 }
8
9 organization
10 "Ciena Corporation";
11 contact
12 "Web URL: http://www.ciena.com/
13 Postal: 7035 Ridge Road
14 Hanover, Maryland 21076
15 U.S.A.
16 Phone: +1 800-921-1144
17 Fax: +1 410-694-5750";
18 description
19 "This module defines port data for the Waveserver. Ports are related to both client and line and represent the port through which the line or client signal travels. They are automatically created by the system. By default, line ports are automatically mapped to client ports via services and service-domains.";
20
21 revision 2017-07-31 {
22 description
23 "Waveserver Platform Data Model
24 Migrated from Waveserver Classic R1.4 YANG model.
25 Updated namespace to 'ciena-waveserver'.
26 Changed 'ports' list key from integer to string type to accommodate '<slot>-<port>' format.
27 Added support for OTN and Ethernet port types.
28 Added support for ODU4 channel sub-objects.
29 Updated 'port-type' enum values and add 'port-rate' enum. Update 'port-speed' typedef.
30 Updated 'operational-state' enum values.
31 Rename 'description' to 'label'.
32 Added common and port-type-specific capabilities and properties containers, and move/rename some attributes.
33 Added finer granularity of 'conditioning-holdoff' values (10ms increments between 0-100ms).
34 Moved 'conditioning-type' and 'conditioning-holdoff' enums to ciena-waveserver-typedefs.yang
35 Removed 'xcvr-type' from properties.
36 Removed 'statistics' container and groupings.
37 Added support for otn trace attributes.";
38 reference "";
39 }
40
41 typedef port-type-enum {
42 type enumeration {
43 enum "unknown" {
44 description
45 "Port type is unknown.";
46 }
47 enum "ethernet" {
48 description
49 "Port type is Ethernet.";
50 }
51 enum "otn" {
52 description
53 "Port type is OTN.";
54 }
55 }
56 description
57 "Port type";
58 }
59
60 typedef port-rate-enum {
61 type enumeration {
62 enum "unknown" {
63 description
64 "Port rate is unknown.";
65 }
66 enum "10GE" {
67 description
68 "Port rate is 10 Gigabits per second Ethernet.";
69 }
70 enum "40GE" {
71 description
72 "Port rate is 40 Gigabits per second Ethernet.";
73 }
74 enum "100GE" {
75 description
76 "Port rate is 100 Gigabits per second Ethernet.";
77 }
78 enum "OTU4" {
79 description
80 "Port rate is OTU4.";
81 }
82 enum "OTUC1" {
83 description
84 "Port rate is OTUC1.";
85 }
86 enum "OTUC2" {
87 description
88 "Port rate is OTUC2.";
89 }
90 enum "OTUC3" {
91 description
92 "Port rate is OTUC3.";
93 }
94 enum "OTUC4" {
95 description
96 "Port rate is OTUC4.";
97 }
98 }
99 description
100 "Nominal port rate of the specified interface.";
101 }
102
103 typedef ethernet-mapping-mode {
104 type enumeration {
105 enum "None" {
106 description
107 "No ethernet mapping.";
108 }
109 enum "GMP" {
110 description
111 "Generic Mapping Procedure (GMP).";
112 }
113 }
114 description
115 "Ethernet mapping mode.";
116 }
117
118 typedef port-speed {
119 type decimal64 {
120 fraction-digits 4;
121 range "0.0 .. 1000.0";
122 }
123 units "Gbps";
124 description
125 "Port speed, in Gbps. Decimal value up to 4 digits.";
126 }
127
128 typedef port-operational-state {
129 type enumeration {
130 enum "down" {
131 value 0;
132 description
133 "The port or channel is not carrying traffic due to a failure or because it is disabled.";
134 }
135 enum "up" {
136 value 1;
137 description
138 "The port or channel is enabled and carrying traffic.";
139 }
140 enum "loopback-tx" {
141 value 4;
142 description
143 "The transmit direction of the port loops back internally at the PHY.";
144 }
145 enum "loopback-rx" {
146 value 5;
147 description
148 "The receive direction of the port loops back at the PHY to the transmit.";
149 }
150 enum "fault" {
151 value 7;
152 description
153 "Port or channel is faulted.";
154 }
155 enum "unavailable" {
156 value 11;
157 description
158 "Channel is unavailable due to bandwidth limitation of parent port rate.";
159 }
160 enum "lower-layer-down" {
161 description
162 "Parent layer is down (dependency or server signal failure).";
163 }
164 }
165 description
166 "Port operational state.";
167 }
168
169 typedef payload-type {
170 type string {
171 length "0..4";
172 }
173 description
174 "A string representation of an OPU payload type (PT) byte value in hexadecimal notation, e.g. '0x07'.";
175 }
176
177 grouping otn-trace-group {
178 description
179 "OTN trail trace identifier (TTI) properties.";
180 leaf mismatch-mode {
181 type cienawstypes:trace-mismatch-mode;
182 description
183 "The trail trace identifier (TTI) mismatch mode, indicating which fields of the TTI overhead are used for trace mismatch detection.";
184 }
185 leaf mismatch-fail-mode {
186 type cienawstypes:trace-mismatch-fail-mode;
187 description
188 "The trail trace identifier (TTI) mismatch failure mode. When TTI mismatch condition occurs, this indicates the consequent action taken, e.g. whether or not to raise an alarm.";
189 }
190 leaf tx-oper {
191 type cienawstypes:string-maxl-32;
192 description
193 "Tx operator-specific trace string, up to 32 characters. If this string value is changed the Expected Rx oper string will also be updated to the same value.";
194 }
195 leaf rx-oper {
196 type cienawstypes:string-maxl-32;
197 config false;
198 description
199 "Rx operator-specific trace string, up to 32 characters.";
200 }
201 leaf exp-oper {
202 type cienawstypes:string-maxl-32;
203 description
204 "Expected Rx operator-specific trace string, up to 32 characters. If this string value is changed the Tx oper string will also be updated to the same value.";
205 }
206 }
207
208 container waveserver-ports {
209 description
210 "Waveserver port configuration and operational data.";
211 list ports {
212 key "port-id";
213 description
214 "Configuration and operational data for the port.";
215 leaf port-id {
216 type cienawstypes:port-name;
217 description
218 "Unique, access identifier string of the port in '<slot>-<port>' format.";
219 }
220 container id {
221 description
222 "Port identification attributes.";
223 leaf name {
224 type cienawstypes:port-name;
225 config false;
226 description
227 "Name of the port interface. Format is: '<slot>-<port>' or '<slot>-<majorport>.<minorport>'.";
228 }
229 leaf label {
230 type cienawstypes:description-string;
231 description
232 "The user-specified label string for this port interface.";
233 }
234 leaf type {
235 type port-type-enum;
236 description
237 "The port interface type.";
238 }
239 leaf rate {
240 type port-rate-enum;
241 config false;
242 description
243 "The port interface rate.";
244 }
245 leaf speed {
246 type port-speed;
247 config false;
248 description
249 "The port speed in Gbps.";
250 }
251 leaf interface-type {
252 type enumeration {
253 enum "i-nni" {
254 value 0;
255 description
256 "Internal Network-to-Network Interface";
257 }
258 enum "uni" {
259 value 1;
260 description
261 "User Network Interface";
262 }
263 enum "e-nni" {
264 value 2;
265 description
266 "External Network-to-Network Interface";
267 }
268 }
269 config false;
270 description
271 "The port interface type.";
272 }
273 }
274 container state {
275 description
276 "Port administrative and operational states.";
277 leaf admin-state {
278 type enumeration {
279 enum "enabled" {
280 value 1;
281 description
282 "Port is administratively enabled and ready to carry traffic.";
283 }
284 enum "disabled" {
285 value 2;
286 description
287 "Port is administratively disabled and not ready to carry traffic.";
288 }
289 }
290 description
291 "The configured administrative state of the port.";
292 }
293 leaf operational-state {
294 type port-operational-state;
295 config false;
296 description
297 "The operational state of the port.";
298 }
299 leaf operational-state-duration {
300 type uint32;
301 units "seconds";
302 config false;
303 description
304 "Amount of time since last state transition.";
305 }
306 }
307 container capabilities {
308 config false;
309 description
310 "Port capabilities.";
311 leaf port-types {
312 type bits {
313 bit ethernet {
314 description
315 "Port is capable of Ethernet port type.";
316 }
317 bit otn {
318 description
319 "Port is capable of OTN port type.";
320 }
321 }
322 description
323 "The service types that the port can support.";
324 }
325 leaf port-rates {
326 type bits {
327 bit ethernet-10gig {
328 description
329 "Port is capable of 10 Gigabit Ethernet rate.";
330 }
331 bit ethernet-40gig {
332 description
333 "Port is capable of 40 Gigabit Ethernet rate.";
334 }
335 bit ethernet-100gig {
336 description
337 "Port is capable of 100 Gigabit Ethernet rate.";
338 }
339 bit OTU4 {
340 description
341 "Port is capable of OTU4 rate.";
342 }
343 bit OTUC1 {
344 description
345 "Port is capable of OTUC1 rate.";
346 }
347 bit OTUC2 {
348 description
349 "Port is capable of OTUC2 rate.";
350 }
351 bit OTUC3 {
352 description
353 "Port is capable of OTUC3 rate.";
354 }
355 bit OTUC4 {
356 description
357 "Port is capable of OTUC4 rate.";
358 }
359 }
360 description
361 "The rates that the port can support.";
362 }
363 leaf fec-support {
364 type cienawstypes:enabled-disabled-enum;
365 description
366 "Specifies whether this port supports forward error correction.";
367 }
368 }
369 container properties {
370 description
371 "Port properties.";
372 leaf loopback {
373 type enumeration {
374 enum "disabled" {
375 description
376 "Loopback is disabled.";
377 }
378 enum "rx" {
379 description
380 "Rx loopback is enabled.";
381 }
382 enum "tx" {
383 description
384 "Tx loopback is enabled.";
385 }
386 }
387 description
388 "Port PHY layer loopback. RX loopback is a loopback forwarding ingress traffic from RX port directly to TX port. TX loopback is a loopback forwarding egress traffic from TX port directly to RX port, TX loopback is not supported in I-NNI ports. The RX/TX loopback can only be enabled when the port admin-state is disabled. Enable an RX/TX loopback shall fail when the port has its admin-state enabled. Users shall be able to disable the xcvr/ptp when its child port loopback enabled. Enable xcvr/ptp shall not enable its child port with loopback enabled. A port shall has its operational state rx loopback when rx loopback is enabled, and tx loopback when tx loopback is enabled.";
389 }
390 leaf forward-error-correction {
391 type cienawstypes:enabled-disabled-enum;
392 description
393 "Forward error correction";
394 }
395 leaf service-index {
396 type cienawstypes:service-idx;
397 config false;
398 description
399 "The index number of the service the port is attached to. Only applies to UNI interface type.";
400 }
401 leaf service-domain-index {
402 type cienawstypes:service-domain-idx;
403 config false;
404 description
405 "The index number of the service domain the port is attached to. Only applies to I-NNI interface type.";
406 }
407 container ethernet {
408 when "../../id/type = 'ethernet'" {
409 description
410 "Ethernet properties container only applies with the port type is 'ethernet'.";
411 }
412 description
413 "Ethernet-specific properties.";
414 leaf max-frame-size {
415 type uint32 {
416 range "0|1522..16004";
417 }
418 config false;
419 description
420 "The maximum transmission unit value (bytes). Zero indicates 'none' or unsupported.";
421 }
422 leaf pause-profile {
423 type enumeration {
424 enum "discard" {
425 description
426 "Ingress pause frames will be discarded and ignored.";
427 }
428 enum "forward" {
429 description
430 "Ingress pause frames will be forwarded. This is the default.";
431 }
432 enum "peer" {
433 description
434 "Ingress pause frames will be peered.";
435 }
436 }
437 config false;
438 description
439 "Port handling of ingress flow control";
440 }
441 leaf mapping-mode {
442 type ethernet-mapping-mode;
443 description
444 "Ethernet mapping mode.";
445 }
446 leaf conditioning-type {
447 type cienawstypes:conditioning-type;
448 description
449 "Egress UNI port consequent action for an EPL service to be applied on a far-end ingress UNI failure or network failure.";
450 }
451 leaf conditioning-holdoff {
452 type cienawstypes:conditioning-holdoff;
453 description
454 "Number of milliseconds to delay Egress UNI port consequent action for an EPL service.";
455 }
456 }
457 container otn {
458 when "../../id/type = 'otn'" {
459 description
460 "OTN properties container only applies with the port type is 'otn'.";
461 }
462 description
463 "OTN-specific properties.";
464 leaf odu-termination {
465 type enumeration {
466 enum "terminated" {
467 description
468 "ODUk layer is terminated at this port.";
469 }
470 enum "passthrough" {
471 description
472 "ODUk layer is not terminated at this port.";
473 }
474 }
475 description
476 "ODUk termination mode.";
477 }
478 leaf pre-fec-otu-sf-threshold {
479 type decimal64 {
480 fraction-digits 2;
481 range "-1.0 .. 1.0";
482 }
483 units "dBQ";
484 description
485 "Pre-FEC OTU Signal Fail threshold value.";
486 }
487 leaf pre-fec-otu-sd-threshold {
488 type decimal64 {
489 fraction-digits 2;
490 range "-1.0 .. 3.50";
491 }
492 units "dBQ";
493 description
494 "Pre-FEC OTU Signal Degrade threshold value.";
495 }
496 leaf otu-sd-threshold {
497 type cienawstypes:string-sci;
498 description
499 "OTU Signal Degrade threshold value, e.g. '10E-06' to '10E-09'.";
500 }
501 leaf odu-sd-threshold {
502 type cienawstypes:string-sci;
503 description
504 "ODUk Signal Degrade threshold value, e.g. '10E-05' to '10E-09'.";
505 }
506 leaf conditioning-type {
507 type enumeration {
508 enum "otn" {
509 description
510 "Standard OTN conditioning type behavior.";
511 }
512 enum "laser-off" {
513 description
514 "Disable the transmitter consequent action.";
515 }
516 }
517 description
518 "Conditioning type for OTN ports.";
519 }
520 container trace {
521 description
522 "OTN port trace attributes";
523 container section {
524 description
525 "OTUk section trace attributes for this port.";
526 uses otn-trace-group;
527 }
528 container path {
529 description
530 "ODUk path trace attributes for this port.";
531 uses otn-trace-group;
532 }
533 }
534 }
535 }
536 list channels {
537 when "../id/type = 'otn' and ../properties/otn/odu-termination = 'terminated'" {
538 description
539 "Channels list only applies for OTUk ports that have ODUk layer terminated.";
540 }
541 key "channel-id";
542 description
543 "List of ODU4 channels within the parent OTU port object.";
544 leaf channel-id {
545 type uint8 {
546 range "1..4";
547 }
548 mandatory true;
549 description
550 "Channel number or ODU4 tributary number within the parent OTU port object. Key value for the channels list.";
551 }
552 container id {
553 description
554 "Channel identification attributes.";
555 leaf name {
556 type cienawstypes:name-string;
557 config false;
558 description
559 "Name of the channel object. Format is: '<slot>-<port>.<channel>'.";
560 }
561 leaf label {
562 type cienawstypes:description-string;
563 description
564 "The user-specified label string for this channel object.";
565 }
566 leaf type {
567 type enumeration {
568 enum "odu" {
569 description
570 "ODU channel.";
571 }
572 }
573 config false;
574 description
575 "The channel interface type.";
576 }
577 leaf rate {
578 type enumeration {
579 enum "odu4" {
580 description
581 "ODU4 rate.";
582 }
583 }
584 config false;
585 description
586 "The channel rate.";
587 }
588 leaf speed {
589 type port-speed;
590 config false;
591 description
592 "The channel speed in Gbps.";
593 }
594 }
595 container state {
596 description
597 "Channel administrative and operational states.";
598 leaf admin-state {
599 type cienawstypes:enabled-disabled-enum;
600 description
601 "The configured administrative state of the channel.";
602 }
603 leaf operational-state {
604 type port-operational-state;
605 config false;
606 description
607 "The operational state of the channel.";
608 }
609 leaf operational-state-duration {
610 type uint32;
611 units "seconds";
612 config false;
613 description
614 "Amount of time since last state transition.";
615 }
616 }
617 container properties {
618 description
619 "Channel properties.";
620 leaf service-index {
621 type cienawstypes:service-idx;
622 config false;
623 description
624 "The index number of the service the channel is attached to, if applicable.";
625 }
626 leaf service-domain-index {
627 type cienawstypes:service-domain-idx;
628 config false;
629 description
630 "The index number of the service domain the channel is attached to, if applicable.";
631 }
632 leaf odu-sd-threshold {
633 type cienawstypes:string-sci;
634 description
635 "ODU4 Signal Degrade threshold value.";
636 }
637 leaf odu-termination {
638 type enumeration {
639 enum "terminated" {
640 description
641 "ODU4 layer is terminated at this channel.";
642 }
643 enum "passthrough" {
644 description
645 "ODU4 layer is not terminated at this channel.";
646 }
647 }
648 description
649 "ODU4 channel termination mode.";
650 }
651 leaf tx-payload-type {
652 type payload-type;
653 config false;
654 description
655 "The transmitted (and expected) OPU4 payload type for this channel (e.g. 0x07).";
656 }
657 leaf rx-payload-type {
658 type payload-type;
659 config false;
660 description
661 "The actual received OPU4 payload type for this channel (e.g. 0x07).";
662 }
663 container trace {
664 description
665 "ODU4 path trace attributes for this channel.";
666 uses otn-trace-group;
667 }
668 }
669 }
670 }
671 }
672}