fix ServiceHandler SpotBugs false positives
[transportpce.git] / tests / honeynode / 1.2.1 / honeynode-plugin-api / src / main / yang / openconfig / openconfig-terminal-device@2017-07-08.yang
1 module openconfig-terminal-device {
2
3   yang-version "1";
4
5   // namespace
6   namespace "http://openconfig.net/yang/terminal-device";
7
8   prefix "oc-opt-term";
9
10   import openconfig-types { prefix oc-types; }
11   import openconfig-transport-types { prefix oc-opt-types; }
12   import openconfig-if-ethernet { prefix oc-eth; }
13   import openconfig-platform { prefix oc-platform; }
14   import openconfig-platform-transceiver { prefix oc-transceiver; }
15   import openconfig-extensions { prefix oc-ext; }
16   import ietf-yang-types { prefix yang; }
17
18
19   // meta
20   organization "OpenConfig working group";
21
22   contact
23     "OpenConfig working group
24     www.openconfig.net";
25
26   description
27     "This module describes a terminal optics device model for
28     managing the terminal systems (client and line side) in a
29     DWDM transport network.
30
31     Elements of the model:
32
33     physical port: corresponds to a physical, pluggable client
34     port on the terminal device. Examples includes 10G, 40G, 100G
35     (e.g., 10x10G, 4x25G or 1x100G) and 400G/1T in the future.
36     Physical client ports will have associated operational state or
37     PMs.
38
39     physical channel: a physical lane or channel in the
40     physical client port.  Each physical client port has 1 or more
41     channels. An example is 100GBASE-LR4 client physical port having
42     4x25G channels. Channels have their own optical PMs and can be
43     monitored independently within a client physical port (e.g.,
44     channel power).  Physical client channels are defined in the
45     model as part of a physical client port, and are modeled
46     primarily for reading their PMs.
47
48     logical channel: a logical grouping of logical grooming elements
49     that may be assigned to subsequent grooming stages for
50     multiplexing / de-multiplexing, or to an optical channel for
51     line side transmission.  The logical channels can represent, for
52     example, an ODU/OTU logical packing of the client
53     data onto the line side.  Tributaries are similarly logical
54     groupings of demand that can be represented in this structure and
55     assigned to an optical channel.  Note that different types of
56     logical channels may be present, each with their corresponding
57     PMs.
58
59     optical channel:  corresponds to an optical carrier and is
60     assigned a wavelength/frequency.  Optical channels have PMs
61     such as power, BER, and operational mode.
62
63     Directionality:
64
65     To maintain simplicity in the model, the configuration is
66     described from client-to-line direction.  The assumption is that
67     equivalent reverse configuration is implicit, resulting in
68     the same line-to-client configuration.
69
70     Physical layout:
71
72     The model does not assume a particular physical layout of client
73     and line ports on the terminal device (e.g., such as number of
74     ports per linecard, separate linecards for client and line ports,
75     etc.).";
76
77   oc-ext:openconfig-version "1.0.0";
78
79   revision "2017-07-08" {
80     description
81       "Adds test-signal";
82     reference "1.0.0";
83   }
84
85   revision "2016-12-22" {
86     description
87       "Fixes and additions to terminal optics model";
88     reference "0.4.0";
89   }
90
91
92   grouping terminal-input-optical-power {
93     description
94       "Reusable leaves related to input optical power";
95
96     leaf input-power {
97       type decimal64 {
98         fraction-digits 2;
99       }
100       units dBm;
101       description
102         "The input optical power of this port in units of 0.01dBm.
103         If the port is an aggregate of multiple physical channels,
104         this attribute is the total power or sum of all channels.";
105     }
106   }
107
108   grouping terminal-ethernet-protocol-config {
109     description
110       "Configuration data for logical channels with Ethernet
111       framing";
112
113     //TODO:currently a empty container
114   }
115
116   grouping terminal-ethernet-protocol-state {
117     description
118       "Ethernet-specific counters when logical channel
119       is using Ethernet protocol framing, e.g., 10GE, 100GE";
120
121       uses oc-eth:ethernet-interface-state-counters;
122   }
123
124   grouping terminal-ethernet-protocol-top {
125     description
126       "Top-level grouping for data related to Ethernet protocol
127       framing on logical channels";
128
129     container ethernet {
130       description
131         "Top level container for data related to Ethernet framing
132         for the logical channel";
133
134       container config {
135         description
136           "Configuration data for Ethernet protocol framing on
137           logical channels";
138
139         uses terminal-ethernet-protocol-config;
140       }
141
142       container state {
143         config false;
144         description
145           "Operational state data for Ethernet protocol framing
146           on logical channels";
147
148         uses terminal-ethernet-protocol-state;
149       }
150     }
151   }
152
153   grouping terminal-otn-protocol-config {
154     description
155       "OTU configuration when logical channel
156       framing is using an OTU protocol, e.g., OTU1, OTU3, etc.";
157
158     leaf tti-msg-transmit {
159       type string;
160       description
161         "Trail trace identifier (TTI) message transmitted";
162     }
163
164     leaf tti-msg-expected {
165       type string;
166       description
167         "Trail trace identifier (TTI) message expected";
168     }
169
170     leaf tti-msg-auto {
171       type boolean;
172       description
173         "Trail trace identifier (TTI) transmit message automatically
174         created.  If true, then setting a custom transmit message
175         would be invalid.";
176     }
177   }
178
179   grouping terminal-otn-protocol-counter-stats {
180     description
181       "Counter based statistics containers for logical channels
182       using OTN framing";
183
184     leaf errored-seconds {
185       type yang:counter64;
186       description
187         "The number of seconds that at least one errored blocks
188         occurs, at least one code violation occurs, loss of sync is
189         detected or loss of signal is detected";
190     }
191
192     leaf severely-errored-seconds {
193       type yang:counter64;
194       description
195         "The number of seconds that loss of frame is detected OR
196         the number of errored blocks, code violations, loss of sync
197         or loss of signal is detected exceeds a predefined
198         threshold";
199     }
200
201     leaf unavailable-seconds {
202       type yang:counter64;
203       description
204         "The number of seconds during which the link is unavailable";
205     }
206
207     leaf code-violations {
208       type yang:counter64;
209       description
210         "For ethernet or fiberchannel links, the number of 8b/10b
211         coding violations. For SONET/SDH, the number of BIP (bit
212         interleaved parity) errors";
213     }
214
215     leaf fec-uncorrectable-words {
216       type yang:counter64;
217       description
218         "The number words that were uncorrectable by the FEC";
219     }
220
221     leaf fec-corrected-bytes {
222       type yang:counter64;
223       description
224         "The number of bytes that were corrected by the FEC";
225     }
226
227     leaf fec-corrected-bits {
228       type yang:counter64;
229       description
230         "The number of bits that were corrected by the FEC";
231     }
232
233     leaf background-block-errors {
234       type yang:counter64;
235       description
236         "The number of background block errors";
237     }
238   }
239
240   grouping terminal-otn-protocol-multi-stats {
241     description
242       "Multi-value statistics containers for logical channels using
243       OTN framing (e.g., max, min, avg, instant)";
244
245     container pre-fec-ber {
246       description
247         "Bit error rate before forward error correction -- computed
248         value with 18 decimal precision. Note that decimal64
249         supports values as small as i x 10^-18 where i is an
250         integer. Values smaller than this should be reported as 0
251         to inidicate error free or near error free performance.
252         Values include the instantaneous, average, minimum, and
253         maximum statistics. If avg/min/max statistics are not
254         supported, the target is expected to just supply the
255         instant value";
256
257       uses oc-opt-types:avg-min-max-instant-stats-precision18-ber;
258     }
259
260     container post-fec-ber {
261       description
262         "Bit error rate after forward error correction -- computed
263         value with 18 decimal precision. Note that decimal64
264         supports values as small as i x 10^-18 where i is an
265         integer. Values smaller than this should be reported as 0
266         to inidicate error free or near error free performance.
267         Values include the instantaneous, average, minimum, and
268         maximum statistics. If avg/min/max statistics are not
269         supported, the target is expected to just supply the
270         instant value";
271
272       uses oc-opt-types:avg-min-max-instant-stats-precision18-ber;
273     }
274
275     container q-value {
276       description
277         "Quality value (factor) in dB of a channel with two
278         decimal precision. Values include the instantaneous,
279         average, minimum, and maximum statistics. If avg/min/max
280         statistics are not supported, the target is expected
281         to just supply the instant value";
282
283       uses oc-types:avg-min-max-instant-stats-precision2-dB;
284     }
285
286     container esnr {
287       description
288         "Electrical signal to noise ratio. Baud rate
289         normalized signal to noise ratio based on
290         error vector magnitude in dB with two decimal
291         precision. Values include the instantaneous, average,
292         minimum, and maximum statistics. If avg/min/max
293         statistics are not supported, the target is expected
294         to just supply the instant value";
295
296       uses oc-types:avg-min-max-instant-stats-precision2-dB;
297     }
298   }
299
300   grouping terminal-otn-protocol-state {
301     description
302       "OTU operational state when logical channel
303       framing is using an OTU protocol, e.g., OTU1, OTU3, etc.";
304
305
306       leaf tti-msg-recv {
307         type string;
308         description
309           "Trail trace identifier (TTI) message received";
310       }
311
312       leaf rdi-msg {
313         type string;
314         description
315           "Remote defect indication (RDI) message received";
316       }
317       uses terminal-otn-protocol-counter-stats;
318       uses terminal-otn-protocol-multi-stats;
319   }
320
321   grouping terminal-otn-protocol-top {
322     description
323       "Top-level grouping for data related to OTN protocol framing";
324
325     container otn {
326       description
327         "Top level container for OTU configuration when logical
328         channel framing is using an OTU protocol, e.g., OTU1, OTU3,
329         etc.";
330
331       container config {
332         description
333           "Configuration data for OTN protocol framing";
334
335         uses terminal-otn-protocol-config;
336       }
337
338       container state {
339
340         config false;
341
342         description
343           "Operational state data for OTN protocol PMs, statistics,
344           etc.";
345
346         uses terminal-otn-protocol-config;
347         uses terminal-otn-protocol-state;
348       }
349     }
350   }
351
352   grouping terminal-client-port-assignment-config {
353     description
354       "Configuration data for assigning physical client ports to
355       logical channels";
356
357     leaf index {
358       type uint32;
359       description
360         "Index of the client port assignment";
361     }
362
363     leaf description {
364       type string;
365       description
366         "Descriptive name for the client port-to-logical channel
367         mapping";
368     }
369
370     leaf logical-channel {
371       type leafref {
372         path "/oc-opt-term:terminal-device/oc-opt-term:logical-channels" +
373           "/oc-opt-term:channel/oc-opt-term:index";
374       }
375       description
376         "Reference to the logical channel for this
377         assignment";
378     }
379
380     leaf allocation {
381       type decimal64 {
382         fraction-digits 3;
383       }
384       units Gbps;
385       description
386         "Allocation of the client physical port to the assigned
387         logical channel expressed in Gbps.  In most cases,
388         the full client physical port rate is assigned to a single
389         logical channel.";
390     }
391
392   }
393
394   grouping terminal-client-port-assignment-state {
395     description
396       "Operational state data for assigning physical client ports
397       to logical channels";
398   }
399
400   grouping terminal-client-port-assignment-top {
401     description
402       "Top-level grouping for the assigment of client physical ports
403       to logical channels";
404     //TODO: this grouping could be removed, instead reusing a common
405     //grouping for logical client assignment pointers
406
407     container logical-channel-assignments {
408       description
409         "Enclosing container for client port to logical client
410         mappings";
411
412       list assignment {
413         key "index";
414         description
415           "List of assignments to logical clients";
416
417         leaf index {
418           type leafref {
419             path "../config/index";
420           }
421           description
422             "Reference to the index of this logical client
423             assignment";
424         }
425
426         container config {
427           description
428             "Configuration data for the logical client assignment";
429
430           uses terminal-client-port-assignment-config;
431         }
432
433         container state {
434
435           config false;
436
437           description
438             "Operational state data for the logical client
439             assignment";
440
441           uses terminal-client-port-assignment-config;
442           uses terminal-client-port-assignment-state;
443         }
444       }
445     }
446   }
447
448
449   grouping terminal-logical-chan-assignment-config {
450     description
451       "Configuration data for assigning client logical channels
452       to line-side tributaries";
453
454     leaf index {
455       type uint32;
456       description
457         "Index of the current logical client channel to tributary
458         mapping";
459     }
460
461     leaf description {
462       type string;
463       description
464         "Name assigned to the logical client channel";
465     }
466
467     leaf assignment-type {
468       type enumeration {
469         enum LOGICAL_CHANNEL {
470           description
471             "Subsequent channel is a logical channel";
472         }
473         enum OPTICAL_CHANNEL {
474           description
475             "Subsequent channel is a optical channel / carrier";
476         }
477       }
478       description
479         "Each logical channel element may be assigned to subsequent
480         stages of logical elements to implement further grooming, or
481         can be assigned to a line-side optical channel for
482         transmission.  Each assignment also has an associated
483         bandwidth allocation.";
484     }
485
486     leaf logical-channel {
487       type leafref {
488         path "/oc-opt-term:terminal-device/" +
489           "oc-opt-term:logical-channels/oc-opt-term:channel/" +
490           "oc-opt-term:index";
491       }
492       must "../assignment-type = 'LOGICAL_CHANNEL'" {
493         description
494           "The assignment-type must be set to LOGICAL_CHANNEL for
495           this leaf to be valid";
496       }
497       description
498          "Reference to another stage of logical channel elements.";
499     }
500
501     leaf optical-channel {
502       type leafref {
503         path "/oc-platform:components/oc-platform:component/" +
504           "oc-platform:name";
505       }
506       must "../assignment-type = 'OPTICAL_CHANNEL'" {
507         description
508           "The assignment-type must be set to OPTICAL_CHANNEL for
509           this leaf to be valid";
510       }
511       description
512         "Reference to the line-side optical channel that should
513         carry the current logical channel element.  Use this
514         reference to exit the logical element stage.";
515     }
516
517     leaf allocation {
518       type decimal64 {
519         fraction-digits 3;
520       }
521       units Gbps;
522       description
523         "Allocation of the logical client channel to the tributary
524         or sub-channel, expressed in Gbps";
525     }
526
527   }
528
529   grouping terminal-logical-chan-assignment-state {
530     description
531       "Operational state data for the assignment of logical client
532       channel to line-side tributary";
533   }
534
535   grouping terminal-logical-chan-assignment-top {
536     description
537       "Top-level grouping for the list of logical client channel-to-
538       tributary assignments";
539
540     container logical-channel-assignments {
541       //TODO: we need a commonly understood name for this logical
542       //channel structure
543       description
544         "Enclosing container for tributary assignments";
545
546       list assignment {
547         key "index";
548         description
549           "Logical channel elements may be assigned directly to
550           optical channels for line-side transmission, or can be
551           further groomed into additional stages of logical channel
552           elements.  The grooming can multiplex (i.e., split the
553           current element into multiple elements in the subsequent
554           stage) or de-multiplex (i.e., combine the current element
555           with other elements into the same element in the subsequent
556           stage) logical elements in each stage.
557
558           Note that to support the ability to groom the logical
559           elements, the list of logical channel elements should be
560           populated with an entry for the logical elements at
561           each stage, starting with the initial assignment from the
562           respective client physical port.
563
564           Each logical element assignment consists of a pointer to
565           an element in the next stage, or to an optical channel,
566           along with a bandwidth allocation for the corresponding
567           assignment (e.g., to split or combine signal).";
568
569         leaf index {
570           type leafref {
571             path "../config/index";
572           }
573           description
574             "Reference to the index for the current tributary
575             assignment";
576         }
577
578         container config {
579           description
580             "Configuration data for tributary assignments";
581
582           uses terminal-logical-chan-assignment-config;
583         }
584
585         container state {
586
587           config false;
588
589           description
590             "Operational state data for tributary assignments";
591
592           uses terminal-logical-chan-assignment-config;
593           uses terminal-logical-chan-assignment-state;
594         }
595       }
596     }
597   }
598
599   grouping terminal-logical-channel-ingress-config {
600     description
601       "Configuration data for ingress signal to logical channel";
602
603     leaf transceiver {
604       type leafref {
605         path "/oc-platform:components/oc-platform:component/" +
606         "oc-platform:name";
607       }
608       description
609         "Reference to the transceiver carrying the input signal
610         for the logical channel.  If specific physical channels
611         are mapped to the logical channel (as opposed to all
612         physical channels carried by the transceiver), they can be
613         specified in the list of physical channel references.";
614     }
615
616     leaf-list physical-channel {
617       type leafref {
618         path "/oc-platform:components/oc-platform:component/" +
619           "oc-transceiver:transceiver/" +
620           "oc-transceiver:physical-channels/" +
621           "oc-transceiver:channel/oc-transceiver:index";
622       }
623       description
624         "This list should be populated with references
625         to the client physical channels that feed this logical
626         channel from the transceiver specified in the 'transceiver'
627         leaf, which must be specified.  If this leaf-list is empty,
628         all physical channels in the transceiver are assumed to be
629         mapped to the logical channel.";
630     }
631   }
632
633   grouping terminal-logical-channel-ingress-state {
634     description
635       "Operational state data for ingress signal to logical channel";
636   }
637
638   grouping terminal-logical-channel-ingress-top {
639     description
640       "Top-level grouping for ingress signal to logical channel";
641
642     container ingress {
643       description
644         "Top-level container for specifying references to the
645         source of signal for the logical channel, either a
646         transceiver or individual physical channels";
647
648       container config {
649         description
650           "Configuration data for the signal source for the
651           logical channel";
652
653         uses terminal-logical-channel-ingress-config;
654       }
655
656       container state {
657
658         config false;
659
660         description
661           "Operational state data for the signal source for the
662           logical channel";
663
664         uses terminal-logical-channel-ingress-config;
665         uses terminal-logical-channel-ingress-state;
666       }
667     }
668   }
669
670   grouping terminal-logical-channel-config {
671     description
672       "Configuration data for logical channels";
673
674     leaf index {
675       type uint32;
676       description
677         "Index of the current logical channel";
678     }
679
680     leaf description {
681       type string;
682       description
683         "Description of the logical channel";
684     }
685
686     leaf admin-state {
687       type oc-opt-types:admin-state-type;
688       description
689           "Sets the admin state of the logical channel";
690     }
691
692     leaf rate-class {
693       type identityref {
694         base oc-opt-types:TRIBUTARY_RATE_CLASS_TYPE;
695       }
696       description
697         "Rounded bit rate of the tributary signal. Exact bit rate
698         will be refined by protocol selection.";
699     }
700
701     leaf trib-protocol {
702       type identityref {
703         base oc-opt-types:TRIBUTARY_PROTOCOL_TYPE;
704       }
705       description
706         "Protocol framing of the tributary signal. If this
707         LogicalChannel is directly connected to a Client-Port or
708         Optical-Channel, this is the protocol of the associated port.
709         If the LogicalChannel is connected to other LogicalChannels,
710         the TributaryProtocol of the LogicalChannels will define a
711         specific mapping/demapping or multiplexing/demultiplexing
712         function.
713
714         Not all protocols are valid, depending on the value
715         of trib-rate-class.  The expectation is that the NMS
716         will validate that a correct combination of rate class
717         and protocol are specfied.  Basic combinations are:
718
719         rate class: 1G
720         protocols: 1GE
721
722         rate class: 2.5G
723         protocols: OC48, STM16
724
725         rate class: 10G
726         protocols:  10GE LAN, 10GE WAN, OC192, STM64, OTU2, OTU2e,
727                     OTU1e, ODU2, ODU2e, ODU1e
728
729         rate class: 40G
730         protocols:  40GE, OC768, STM256, OTU3, ODU3
731
732         rate class: 100G
733         protocols:  100GE, 100G MLG, OTU4, OTUCn, ODU4";
734     }
735
736     leaf logical-channel-type {
737       type identityref {
738         base oc-opt-types:LOGICAL_ELEMENT_PROTOCOL_TYPE;
739       }
740       description
741         "The type / stage of the logical element determines the
742         configuration and operational state parameters (PMs)
743         available for the logical element";
744     }
745
746     leaf loopback-mode {
747       type oc-opt-types:loopback-mode-type;
748       description
749         "Sets the loopback type on the logical channel. Setting the
750         mode to something besides NONE activates the loopback in
751         the specified mode.";
752     }
753
754     leaf test-signal {
755       type boolean;
756       description
757         "When enabled the logical channel's DSP will generate a pseudo
758         randmon bit stream (PRBS) which can be used during testing.";
759     }
760   }
761
762
763   grouping terminal-logical-channel-state {
764     description
765       "Operational state data for logical client channels";
766
767     leaf link-state {
768       type enumeration {
769         enum UP {
770           description
771             "Logical channel is operationally up";
772         }
773         enum DOWN {
774           description
775             "Logical channel is operationally down";
776         }
777       }
778       description
779         "Link-state of the Ethernet protocol on the logical channel,
780         SONET / SDH framed signal, etc.";
781     }
782
783   }
784
785   grouping terminal-logical-channel-top {
786     description
787       "Top-level grouping for logical channels";
788
789     container logical-channels {
790       description
791         "Enclosing container the list of logical channels";
792
793       list channel {
794         key "index";
795         description
796           "List of logical channels";
797         //TODO: naming for this list of logical elements should be
798         //revisited.
799
800         leaf index {
801           type leafref {
802             path "../config/index";
803           }
804           description
805             "Reference to the index of the logical channel";
806         }
807
808         container config {
809           description
810             "Configuration data for logical channels";
811
812           uses terminal-logical-channel-config;
813
814         }
815
816         container state {
817
818           config false;
819
820           description
821             "Operational state data for logical channels";
822
823           uses terminal-logical-channel-config;
824           uses terminal-logical-channel-state;
825         }
826
827         uses terminal-otn-protocol-top {
828           when "config/logical-channel-type = 'PROT_OTN'" {
829             description
830               "Include the OTN protocol data only when the
831               channel is using OTN framing.";
832           }
833         }
834         uses terminal-ethernet-protocol-top {
835           when "config/logical-channel-type = 'PROT_ETHERNET'" {
836             description
837               "Include the Ethernet protocol statistics only when the
838               protocol used by the link is Ethernet.";
839           }
840         }
841         uses terminal-logical-channel-ingress-top;
842         uses terminal-logical-chan-assignment-top;
843       }
844     }
845   }
846
847
848   grouping terminal-optical-channel-config {
849     description
850       "Configuration data for describing optical channels";
851
852     leaf frequency {
853       type oc-opt-types:frequency-type;
854       description
855         "Frequency of the optical channel, expressed in MHz";
856     }
857
858     leaf target-output-power {
859       type decimal64 {
860         fraction-digits 2;
861       }
862       units dBm;
863       description
864         "Target output optical power level of the optical channel,
865         expressed in increments of 0.01 dBm (decibel-milliwats)";
866     }
867
868     leaf operational-mode {
869       type uint16;
870       description
871         "Vendor-specific mode identifier -- sets the operational
872         mode for the channel.  The specified operational mode must
873         exist in the list of supported operational modes supplied
874         by the device";
875       //
876       // Ideally, this leaf should be a leafref to the supported
877       // operational modes, but YANG 1.0 does not allow a r/w
878       // leaf to be a leafref to a r/o leaf.
879     }
880
881
882     leaf line-port {
883       type leafref {
884         path "/oc-platform:components/oc-platform:component/" +
885           "oc-platform:name";
886       }
887       description
888         "Reference to the line-side physical port that carries
889         this optical channel.  The target port should be
890         a component in the physical inventory data model.";
891     }
892   }
893
894   grouping terminal-optical-channel-state {
895     description
896       "Operational state data for optical channels";
897
898     leaf group-id {
899       type uint32;
900       description
901         "If the device places constraints on which optical
902         channels must be managed together (e.g., transmitted on the
903         same line port), it can indicate that by setting the group-id
904         to the same value across related optical channels.";
905     }
906
907     uses oc-transceiver:optical-power-state;
908
909     container chromatic-dispersion {
910       description
911         "Chromatic Dispersion of an optical channel in
912         picoseconds / nanometer (ps/nm) as reported by receiver
913         with two decimal precision. Values include the instantaneous,
914         average, minimum, and maximum statistics. If avg/min/max
915         statistics are not supported, the target is expected to just
916         supply the instant value";
917
918       uses oc-opt-types:avg-min-max-instant-stats-precision2-ps-nm;
919     }
920
921     container polarization-mode-dispersion {
922       description
923         "Polarization Mode Dispersion of an optical channel
924         in picosends (ps) as reported by receiver with two decimal
925         precision. Values include the instantaneous, average,
926         minimum, and maximum statistics. If avg/min/max statistics
927         are not supported, the target is expected to just supply the
928         instant value";
929
930       uses oc-opt-types:avg-min-max-instant-stats-precision2-ps;
931     }
932
933     container second-order-polarization-mode-dispersion {
934       description
935         "Second Order Polarization Mode Dispersion of an optical
936         channel in picoseconds squared (ps^2) as reported by
937         receiver with two decimal precision. Values include the
938         instantaneous, average, minimum, and maximum statistics.
939         If avg/min/max statistics are not supported, the target
940         is expected to just supply the instant value";
941
942       uses oc-opt-types:avg-min-max-instant-stats-precision2-ps2;
943     }
944
945     container polarization-dependent-loss {
946       description
947         "Polarization Dependent Loss of an optical channel
948         in dB as reported by receiver with two decimal precision.
949         Values include the instantaneous, average, minimum, and
950         maximum statistics. If avg/min/max statistics are not
951         supported, the target is expected to just supply the
952         instant value";
953
954       uses oc-types:avg-min-max-instant-stats-precision2-dB;
955     }
956   }
957
958   grouping terminal-optical-channel-top {
959     description
960       "Top-level grouping for optical channel data";
961
962     container optical-channel {
963       description
964         "Enclosing container for the list of optical channels";
965
966       container config {
967         description
968           "Configuration data for optical channels";
969
970         uses terminal-optical-channel-config;
971       }
972
973       container state {
974
975         config false;
976
977         description
978           "Operational state data for optical channels";
979
980         uses terminal-optical-channel-config;
981         uses terminal-optical-channel-state;
982       }
983     }
984   }
985
986   grouping terminal-operational-mode-config {
987     description
988       "Configuration data for vendor-supported operational modes";
989   }
990
991   grouping terminal-operational-mode-state {
992     description
993       "Operational state data for vendor-supported operational
994       modes";
995
996       leaf mode-id {
997         type uint16;
998         description
999           "Two-octet encoding of the vendor-defined operational
1000           mode";
1001       }
1002
1003       leaf description {
1004         type string;
1005         description
1006           "Vendor-supplied textual description of the characteristics
1007           of this operational mode to enable operators to select the
1008           appropriate mode for the application.";
1009       }
1010
1011       //TODO: examples of the kind of info that would be useful to
1012       //report in the operational mode:
1013       //Symbol rate (32G, 40G, 43G, 64G, etc.)
1014       //Modulation (QPSK, 8-QAM, 16-QAM, etc.)
1015       //Differential encoding (on, off/pilot symbol, etc)
1016       //State of polarization tracking mode (default, med.
1017       //high-speed, etc.)
1018       //Pulse shaping (RRC, RC, roll-off factor)
1019       //FEC mode (SD, HD, % OH)
1020
1021       leaf vendor-id {
1022         type string;
1023         description
1024           "Identifier to represent the vendor / supplier of the
1025           platform and the associated operational mode information";
1026       }
1027   }
1028
1029   grouping terminal-operational-mode-top {
1030     description
1031       "Top-level grouping for vendor-supported operational modes";
1032
1033     container operational-modes {
1034       description
1035         "Enclosing container for list of operational modes";
1036
1037       list mode {
1038         key "mode-id";
1039         config false;
1040         description
1041           "List of operational modes supported by the platform.
1042           The operational mode provides a platform-defined summary
1043           of information such as symbol rate, modulation, pulse
1044           shaping, etc.";
1045
1046         leaf mode-id {
1047           type leafref {
1048             path "../state/mode-id";
1049           }
1050           description
1051             "Reference to mode-id";
1052         }
1053
1054         container config {
1055           description
1056             "Configuration data for operational mode";
1057
1058           uses terminal-operational-mode-config;
1059         }
1060
1061         container state {
1062
1063           config false;
1064
1065           description
1066             "Operational state data for the platform-defined
1067             operational mode";
1068
1069           uses terminal-operational-mode-config;
1070           uses terminal-operational-mode-state;
1071         }
1072       }
1073     }
1074   }
1075
1076
1077   grouping terminal-device-config {
1078     description
1079       "Configuration data for transport terminal devices at a
1080       device-wide level";
1081   }
1082
1083   grouping terminal-device-state {
1084     description
1085       "Operational state data for transport terminal devices at a
1086       device-wide level";
1087   }
1088
1089   grouping terminal-device-top {
1090     description
1091       "Top-level grouping for data for terminal devices";
1092
1093     container terminal-device {
1094       description
1095         "Top-level container for the terminal device";
1096
1097       container config {
1098         description
1099           "Configuration data for global terminal-device";
1100
1101         uses terminal-device-config;
1102       }
1103
1104       container state {
1105
1106         config false;
1107
1108         description
1109           "Operational state data for global terminal device";
1110
1111         uses terminal-device-config;
1112         uses terminal-device-state;
1113       }
1114
1115       uses terminal-logical-channel-top;
1116       uses terminal-operational-mode-top;
1117
1118     }
1119   }
1120
1121   // data definition statements
1122
1123   uses terminal-device-top;
1124
1125   // augment statements
1126
1127   augment "/oc-platform:components/oc-platform:component" {
1128     when "/oc-platform:components/oc-platform:component/" +
1129       "oc-platform:state/oc-platform:type = 'OPTICAL_CHANNEL'" {
1130       description
1131         "Augment is active when component is of type
1132         OPTICAL_CHANNEL";
1133     }
1134     description
1135       "Adding optical channel data to physical inventory";
1136
1137     uses terminal-optical-channel-top {
1138     }
1139   }
1140
1141 }