c08187c467d6000bafe2a5e24ebdeb5f23f45b6e
[transportpce.git] / tests / honeynode / 2.2.1 / honeynode-plugin-impl / src / main / resources / honeycomb-minimal-resources / config / yang / devices / org-openroadm-device@2018-10-19.yang
1 module org-openroadm-device {
2   namespace "http://org/openroadm/device";
3   prefix org-openroadm-device;
4
5   import ietf-yang-types {
6     prefix ietf-yang-types;
7     revision-date 2013-07-15;
8   }
9   import ietf-inet-types {
10     prefix ietf-inet-types;
11     revision-date 2013-07-15;
12   }
13   import ietf-netconf {
14     prefix ietf-nc;
15     revision-date 2011-06-01;
16   }
17   import org-openroadm-common-types {
18     prefix org-openroadm-common-types;
19     revision-date 2018-10-19;
20   }
21   import org-openroadm-resource-types {
22     prefix org-openroadm-resource-types;
23     revision-date 2018-10-19;
24   }
25   import org-openroadm-physical-types {
26     prefix org-openroadm-physical-types;
27     revision-date 2018-10-19;
28   }
29   import org-openroadm-user-mgmt {
30     prefix org-openroadm-user-mgmt;
31     revision-date 2017-12-15;
32   }
33   import org-openroadm-port-types {
34     prefix org-openroadm-port-types;
35     revision-date 2018-10-19;
36   }
37   import org-openroadm-interfaces {
38     prefix org-openroadm-interfaces;
39     revision-date 2017-06-26;
40   }
41   import org-openroadm-swdl {
42     prefix org-openroadm-swdl;
43     revision-date 2018-10-19;
44   }
45   import org-openroadm-equipment-states-types {
46     prefix org-openroadm-equipment-states-types;
47     revision-date 2017-12-15;
48   }
49   import org-openroadm-switching-pool-types {
50     prefix org-openroadm-switching-pool-types;
51     revision-date 2017-12-15;
52   }
53
54   organization
55     "Open ROADM MSA";
56   contact
57     "OpenROADM.org";
58   description
59     "YANG definitions of ROADM device
60
61      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
62      AT&T Intellectual Property.  All other rights reserved.
63
64      Redistribution and use in source and binary forms, with or without modification,
65      are permitted provided that the following conditions are met:
66
67      * Redistributions of source code must retain the above copyright notice, this
68        list of conditions and the following disclaimer.
69      * Redistributions in binary form must reproduce the above copyright notice,
70        this list of conditions and the following disclaimer in the documentation and/or
71        other materials provided with the distribution.
72      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
73        contributors may be used to endorse or promote products derived from this software
74        without specific prior written permission.
75
76      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
77      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
78      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
79      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
80      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
81      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
82      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
83      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
84      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
85      POSSIBILITY OF SUCH DAMAGE.
86
87      Also contains code components extracted from IETF netconf.  These code components
88      are copyrighted and licensed as follows:
89
90      Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
91      All rights reserved.
92
93      This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
94      to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
95      publication of this document. Please review these documents carefully, as they
96      describe your rights and restrictions with respect to this document. Code Components
97      extracted from this document must include Simplified BSD License text as described in
98      Section 4.e of the Trust Legal Provisions and are provided without warranty as
99      described in the Simplified BSD License.";
100
101   revision 2018-10-19 {
102     description
103       "Version 2.2.1";
104   }
105   revision 2017-12-15 {
106     description
107       "Version 2.2";
108   }
109   revision 2017-09-29 {
110     description
111       "Version 2.1";
112   }
113   revision 2017-07-28 {
114     description
115       "Version 2.0.1 - added revision-date to imports";
116   }
117   revision 2017-06-26 {
118     description
119       "Version 2.0";
120   }
121   revision 2017-02-06 {
122     description
123       "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc";
124   }
125   revision 2016-10-14 {
126     description
127       "Version 1.2";
128   }
129
130   grouping create-tech-info-group {
131     leaf shelf-id {
132       type leafref {
133         path "/org-openroadm-device/shelves/shelf-name";
134       }
135       description
136         "shelf ID";
137     }
138     leaf log-file-name {
139       type string;
140       description
141         "The log file name a vendor can specify for a given log collection operation";
142     }
143   }
144
145   grouping device-common {
146     leaf node-id {
147       type org-openroadm-common-types:node-id-type;
148       default "openroadm";
149       description
150         "Globally unique identifier for a device.";
151     }
152     leaf node-number {
153       type uint32;
154       description
155         "Number assigned to a ROADM node at a
156          given office";
157     }
158     leaf node-type {
159       type org-openroadm-common-types:node-types;
160       config true;
161       mandatory true;
162       description
163         "Identifier for node-type e.g Roadm, xponder.
164          Once the node-type is configured, it should not be modified.";
165     }
166     leaf clli {
167       type string;
168       description
169         "Common Language Location Identifier.";
170     }
171     uses org-openroadm-physical-types:node-info;
172     leaf ipAddress {
173       type ietf-inet-types:ip-address;
174       description
175         "IP Address of device";
176     }
177     leaf prefix-length {
178       type uint8 {
179         range "0..128";
180       }
181       description
182         "The length of the subnet prefix";
183     }
184     leaf defaultGateway {
185       type ietf-inet-types:ip-address;
186       description
187         "Default Gateway";
188     }
189     leaf source {
190       type enumeration {
191         enum "static" {
192           value 1;
193         }
194         enum "dhcp" {
195           value 2;
196         }
197       }
198       config false;
199     }
200     leaf current-ipAddress {
201       type ietf-inet-types:ip-address;
202       config false;
203       description
204         "Current IP Address of device";
205     }
206     leaf current-prefix-length {
207       type uint8 {
208         range "0..128";
209       }
210       config false;
211       description
212         "The current length of the subnet prefix";
213     }
214     leaf current-defaultGateway {
215       type ietf-inet-types:ip-address;
216       config false;
217       description
218         "Current Default Gateway";
219     }
220     leaf macAddress {
221       type ietf-yang-types:mac-address;
222       config false;
223       description
224         "MAC Address of device";
225     }
226     leaf softwareVersion {
227       type string;
228       config false;
229       description
230         "Software version";
231     }
232     leaf openroadm-version {
233       type org-openroadm-common-types:openroadm-version-type;
234       config false;
235       description
236         "openroadm version used on the device";
237     }
238     leaf template {
239       type string;
240       description
241         "Template information used in the deployment.";
242     }
243     leaf current-datetime {
244       type ietf-yang-types:date-and-time;
245       config false;
246       description
247         "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
248     }
249     container geoLocation {
250       description
251         "GPS location";
252       leaf latitude {
253         type decimal64 {
254           fraction-digits 16;
255           range "-90 .. 90";
256         }
257         description
258           "[From wikipedia] Latitude is an angle (defined below)
259            which ranges from 0 at the Equator to 90 (North or
260            South) at the poles";
261       }
262       leaf longitude {
263         type decimal64 {
264           fraction-digits 16;
265           range "-180 .. 180";
266         }
267         description
268           "[From wikipedia] The longitude is measured as the
269            angle east or west from the Prime Meridian, ranging
270            from 0 at the Prime Meridian to +180 eastward and
271            -180 westward.";
272       }
273     }
274   }
275
276   grouping slot-info {
277     description
278       "slots information. To be populated by NE during retrieval.";
279     leaf slot-name {
280       type string;
281       description
282         "The name of this slot.";
283     }
284     leaf label {
285       type string;
286       description
287         "Faceplate label";
288     }
289     leaf provisioned-circuit-pack {
290       type leafref {
291         path "/org-openroadm-device/circuit-packs/circuit-pack-name";
292       }
293       description
294         "The supported circuit-pack. It will be empty if holder status is empty-not-prov, or installed-not-prov";
295     }
296     leaf slot-status {
297       type enumeration {
298         enum "empty-not-prov" {
299           value 1;
300           description
301             "Slot is empty and not provisioned";
302         }
303         enum "empty-prov-match" {
304           value 2;
305           description
306             "Slot is empty and expected type is provisioned";
307         }
308         enum "empty-prov-mismatch" {
309           value 3;
310           description
311             "Slot is empty and an unsupported type is provisioned";
312         }
313         enum "installed-not-prov" {
314           value 4;
315           description
316             "Slot is occupied but not provisioned";
317         }
318         enum "installed-prov-match" {
319           value 5;
320           description
321             "Slot is occupied with matching provisioned type";
322         }
323         enum "installed-prov-mismatch" {
324           value 6;
325           description
326             "Slot is occupied with mismatched provisioned type";
327         }
328       }
329     }
330   }
331
332   grouping shelves {
333     list shelves {
334       key "shelf-name";
335       uses shelf;
336     }
337   }
338
339   grouping shelf {
340     leaf shelf-name {
341       type string;
342       description
343         "Unique identifier for this shelf within a device";
344     }
345     leaf shelf-type {
346       type string;
347       mandatory true;
348       description
349         "The shelf type: describe the shelf with a unique string.";
350     }
351     leaf rack {
352       type string;
353       description
354         "Reflect the shelf physical location data including floor, aisle, bay values.";
355     }
356     leaf shelf-position {
357       type string;
358       description
359         "Reflect the shelf vertical position within an equipment bay.";
360     }
361     leaf administrative-state {
362       type org-openroadm-equipment-states-types:admin-states;
363       description
364         "Admin State of the shelf";
365     }
366     uses org-openroadm-physical-types:common-info;
367     leaf equipment-state {
368       type org-openroadm-equipment-states-types:states;
369       description
370         "equipment state for the shelf, used to track the lifecycle state.";
371     }
372     leaf due-date {
373       type ietf-yang-types:date-and-time;
374       description
375         "due date for the shelf.";
376     }
377     list slots {
378       key "slot-name";
379       config false;
380       description
381         "List of slots on this shelf. To be populated by NE during retrieval.";
382       uses slot-info;
383     }
384   }
385
386   grouping circuit-packs {
387     list circuit-packs {
388       key "circuit-pack-name";
389       description
390         "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
391       leaf circuit-pack-type {
392         type string;
393         mandatory true;
394         description
395           "Type of circuit-pack";
396       }
397       leaf circuit-pack-product-code {
398         type string;
399         description
400           "Product Code for the circuit-pack";
401       }
402       uses circuit-pack;
403     }
404   }
405
406   grouping circuit-pack-features {
407     leaf software-load-version {
408       type string;
409       config false;
410       description
411         "Software version running on the circuit pack.";
412     }
413     list circuit-pack-features {
414       config false;
415       container feature {
416         description
417           "List of features supported by the installed load and indications on whether the features have been applied or not.";
418         leaf description {
419           type string;
420           description
421             "Feature description.";
422         }
423         leaf activated {
424           type boolean;
425           description
426             "Indicator if the feature has been activated.";
427         }
428       }
429     }
430     list circuit-pack-components {
431       config false;
432       container component {
433         description
434           "Optional list of components on the circuit-pack and the load information applicable to those components.  If a load is not up to date and will upgrade when a cold restart occurs, the version that will be applied should also be listed.  If there is no misalignment, this does not need to be reported.";
435         leaf name {
436           type string;
437           description
438             "Name of a component on the circuit-pack that can have a load applied to it.";
439         }
440         leaf current-version {
441           type string;
442           description
443             "Name of the load version currently running on the component.";
444         }
445         leaf version-to-apply {
446           type string;
447           description
448             "Name of the load version for the component that will be applied when cold restart occurs on the circuit-pack.";
449         }
450       }
451     }
452   }
453
454   grouping circuit-pack {
455     leaf circuit-pack-name {
456       type string;
457       description
458         "Unique identifier for this circuit-pack within a device";
459     }
460     leaf administrative-state {
461       type org-openroadm-equipment-states-types:admin-states;
462       description
463         "Administrative state of circuit-pack";
464     }
465     uses org-openroadm-physical-types:common-info;
466     container circuit-pack-category {
467       config false;
468       description
469         "General type of circuit-pack";
470       uses org-openroadm-common-types:equipment-type;
471     }
472     leaf equipment-state {
473       type org-openroadm-equipment-states-types:states;
474       description
475         "Equipment state, which complements operational state.";
476     }
477     leaf circuit-pack-mode {
478       type string;
479       default "NORMAL";
480       description
481         "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
482     }
483     leaf shelf {
484       type leafref {
485         path "/org-openroadm-device/shelves/shelf-name";
486       }
487       mandatory true;
488     }
489     leaf slot {
490       type string;
491       mandatory true;
492     }
493     leaf subSlot {
494       type string;
495       mandatory false;
496     }
497     leaf is-pluggable-optics {
498       type boolean;
499       config false;
500       mandatory true;
501       description
502         "True if circuitpack is pluggable optics";
503     }
504     leaf due-date {
505       type ietf-yang-types:date-and-time;
506       description
507         "due date for this circuit-pack.";
508     }
509     container parent-circuit-pack {
510       description
511         "In the case of circuit packs that contain other equipment (modules or pluggables), this captures the hierarchy of that equipment.  It is a vendor specific design decision if the ports for single-port pluggables are modeled as children of the parent circuit-pack, or as children of the pluggable circuit-pack contained in the parent circuit-pack.  For modules with multiple ports, it is recommended that ports be children of the module and not the carrier, to help in fault correlation and isolation in the case of a module failure.";
512       uses circuit-pack-name;
513       leaf cp-slot-name {
514         type string;
515         description
516           "Slot name on parent-circuit-pack.";
517       }
518     }
519     list cp-slots {
520       key "slot-name";
521       config false;
522       description
523         "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
524       uses slot-info;
525       leaf slot-type {
526         type enumeration {
527           enum "pluggable-optics-holder" {
528             value 1;
529             description
530               "slot accepts dedicated pluggable port circuit-pack";
531           }
532           enum "other" {
533             value 2;
534             description
535               "slot accepts parent circuit-pack";
536           }
537         }
538       }
539     }
540     uses circuit-pack-features;
541     list ports {
542       key "port-name";
543       description
544         "List of ports on this circuit-pack. Note that pluggables are considered independent circuit-packs.  All ports that are physically present on a pluggable, need to be modeled as a port against that pluggable circuit-pack, and not against the parent circuit-pack.";
545       uses port;
546       container roadm-port {
547         when "../port-qual='roadm-external'";
548         uses org-openroadm-port-types:roadm-port;
549       }
550       container transponder-port {
551         when "../port-qual='xpdr-network' or ../port-qual='xpdr-client' or ../port-qual='switch-network' or ../port-qual='switch-client'";
552         uses org-openroadm-port-types:common-port;
553       }
554       container otdr-port {
555         when "../port-qual='otdr'";
556         description
557           "Settings for otdr port.";
558         leaf launch-cable-length {
559           type uint32;
560           units "m";
561           default "30";
562         }
563         leaf port-direction {
564           type org-openroadm-common-types:direction;
565         }
566       }
567       container ila-port {
568         when "../port-qual='ila-external'";
569         uses org-openroadm-port-types:common-port;
570       }
571     }
572   }
573
574   grouping odu-connection {
575     description
576       "Grouping used to define odu-connections.";
577     leaf connection-name {
578       type string;
579       description
580         "roadm-connection and odu-connection share the same resource-type and resource definition (e.g. connection)";
581     }
582     leaf direction {
583       type enumeration {
584         enum "unidirectional" {
585           value 1;
586         }
587         enum "bidirectional" {
588           value 2;
589         }
590       }
591       default "bidirectional";
592       description
593         "Directionality of connection. If bidirectional, both directions are created.";
594     }
595     container source {
596       leaf src-if {
597         type leafref {
598           path "/org-openroadm-device/interface/name";
599         }
600         mandatory true;
601       }
602     }
603     container destination {
604       leaf dst-if {
605         type leafref {
606           path "/org-openroadm-device/interface/name";
607         }
608         mandatory true;
609       }
610     }
611   }
612
613   grouping connection {
614     description
615       "Grouping used to define connections.";
616     leaf connection-name {
617       type string;
618     }
619     leaf opticalControlMode {
620       type org-openroadm-common-types:optical-control-mode;
621       default "off";
622       description
623         "Whether connection is currently in power or gain/loss mode";
624       reference "openroadm.org: Open ROADM MSA Specification.";
625     }
626     leaf target-output-power {
627       type org-openroadm-common-types:power-dBm;
628       description
629         "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
630     }
631     container source {
632       leaf src-if {
633         type leafref {
634           path "/org-openroadm-device/interface/name";
635         }
636         mandatory true;
637       }
638     }
639     container destination {
640       leaf dst-if {
641         type leafref {
642           path "/org-openroadm-device/interface/name";
643         }
644         mandatory true;
645       }
646     }
647   }
648
649   grouping degree {
650     leaf degree-number {
651       type uint16;
652       must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
653         error-message "Degree not supported by device ";
654         description
655           "Validating if the degree is supported by device";
656       }
657     }
658     leaf max-wavelengths {
659       type uint16;
660       config false;
661       mandatory true;
662       description
663         "maximum number of wavelengths";
664     }
665     list circuit-packs {
666       key "index";
667       description
668         "list for Cards associated with a degree";
669       leaf index {
670         type uint32;
671       }
672       uses circuit-pack-name {
673         refine "circuit-pack-name" {
674           mandatory true;
675         }
676       }
677     }
678     list connection-ports {
679       key "index";
680       description
681         "Port associated with degree: One if bi-directional; two if uni-directional";
682       leaf index {
683         type uint32;
684       }
685       uses port-name {
686         refine "circuit-pack-name" {
687           mandatory true;
688         }
689         refine "port-name" {
690           mandatory true;
691         }
692       }
693     }
694     container otdr-port {
695       description
696         "otdr port associated with degree.";
697       uses port-name;
698     }
699     uses mc-capabilities-g;
700   }
701
702   grouping amplifier {
703     leaf amp-number {
704       type uint8 {
705         range "1..128";
706       }
707       description
708         "Unique identifier/number for the amplifier entry which corresponds to a logical amplifier";
709     }
710     leaf amp-type {
711       type org-openroadm-common-types:amplifier-types;
712       config false;
713       mandatory true;
714       description
715         "Amplifier type";
716     }
717     leaf control-mode {
718       type org-openroadm-common-types:line-amplifier-control-mode;
719       default "off";
720       description
721         "Whether the line amplifier is currently in off or gainLoss mode. control-mode can only be set to gainLoss when target-gain, target-tilt and egress-average-channel-power are set and the OMS interfaces are provisioned. The amplifier will be turned off when the control-mode is set to off";
722     }
723     leaf amp-gain-range {
724       type org-openroadm-common-types:amplifier-gain-range;
725       default "gain-range-1";
726       config false;
727       description
728         "Amplifier gain-range (gain-range 1 to 4 for switched gain amplifiers)
729          gain-range-1 (default value) for standard amplifiers";
730     }
731     leaf target-gain {
732       type org-openroadm-common-types:ratio-dB;
733       config true;
734       description
735         "Target overall Amplifier Signal gain, excluding ASE, including VOA attenuation.
736          Defined as optional for ODL support, but shall be considered as mandatory and provided
737          by the controller when the control-mode is set to gainLoss for amplifier setting";
738     }
739     leaf target-tilt {
740       type org-openroadm-common-types:ratio-dB;
741       config true;
742       description
743         "Target tilt configured in case of smart EDFA.
744          Tilt value provided as specified in Open-ROADM-MSA-specifications spreadsheet
745          Defined as optional for ODL support, but shall be considered as mandatory and provided
746          by the controller when the control-mode is set to gainLoss for amplifier setting";
747     }
748     leaf egress-average-channel-power {
749       type org-openroadm-common-types:power-dBm;
750       config true;
751       description
752         "Based upon the total max power across the 4.8 THz passband.
753          Defined as optional for ODL support, but shall be considered as mandatory and provided
754          by the controller when the control-mode is set to gainLoss for amplifier setting";
755     }
756     leaf out-voa-att {
757       type org-openroadm-common-types:ratio-dB;
758       config false;
759       description
760         "Used to provide the value output VOA attenuation, optional";
761     }
762     leaf partner-amp {
763       type leafref {
764         path "../amp-number";
765       }
766       config false;
767       description
768         "amp-number of amp module that is functionally associated to the amplifier
769          in the opposite direction";
770     }
771     leaf ila-direction-label {
772       type string;
773       description
774         "Amplifier direction. Each operators may have its own naming convention.
775          Shall be consistent with tx-instance-port-direction-label and rx-instance-port-direction-label.";
776     }
777   }
778
779   grouping external-links {
780     description
781       "YANG definitions for external links..
782        - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed manually.";
783     list external-link {
784       key "external-link-name";
785       uses external-link;
786     }
787   }
788
789   grouping external-link {
790     leaf external-link-name {
791       type string;
792     }
793     container source {
794       uses org-openroadm-resource-types:device-id {
795         refine "node-id" {
796           mandatory true;
797         }
798       }
799       uses org-openroadm-resource-types:port-name {
800         refine "circuit-pack-name" {
801           mandatory true;
802         }
803         refine "port-name" {
804           mandatory true;
805         }
806       }
807     }
808     container destination {
809       uses org-openroadm-resource-types:device-id {
810         refine "node-id" {
811           mandatory true;
812         }
813       }
814       uses org-openroadm-resource-types:port-name {
815         refine "circuit-pack-name" {
816           mandatory true;
817         }
818         refine "port-name" {
819           mandatory true;
820         }
821       }
822     }
823   }
824
825   grouping internal-links {
826     list internal-link {
827       key "internal-link-name";
828       config false;
829       uses internal-link;
830     }
831   }
832
833   grouping internal-link {
834     leaf internal-link-name {
835       type string;
836     }
837     container source {
838       uses port-name {
839         refine "circuit-pack-name" {
840           mandatory true;
841         }
842         refine "port-name" {
843           mandatory true;
844         }
845       }
846     }
847     container destination {
848       uses port-name {
849         refine "circuit-pack-name" {
850           mandatory true;
851         }
852         refine "port-name" {
853           mandatory true;
854         }
855       }
856     }
857   }
858
859   grouping physical-links {
860     description
861       "YANG definitions for physical links.
862        - physical links (fiber, cables,etc.) between ports within a node. ";
863     list physical-link {
864       key "physical-link-name";
865       uses physical-link;
866     }
867   }
868
869   grouping physical-link {
870     leaf physical-link-name {
871       type string;
872     }
873     container source {
874       uses port-name {
875         refine "circuit-pack-name" {
876           mandatory true;
877         }
878         refine "port-name" {
879           mandatory true;
880         }
881       }
882     }
883     container destination {
884       uses port-name {
885         refine "circuit-pack-name" {
886           mandatory true;
887         }
888         refine "port-name" {
889           mandatory true;
890         }
891       }
892     }
893   }
894
895   grouping srg {
896     leaf max-add-drop-ports {
897       type uint16;
898       config false;
899       mandatory true;
900       description
901         "The max number of ports available for a given srg";
902     }
903     leaf current-provisioned-add-drop-ports {
904       type uint16;
905       config false;
906       mandatory true;
907       description
908         "The number of ports currently provisioned for a given srg.";
909     }
910     leaf srg-number {
911       type uint16;
912       must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
913         error-message "invalid SRG";
914         description
915           "Validating if the srg is supported by add/drop group";
916       }
917     }
918     leaf wavelength-duplication {
919       type org-openroadm-common-types:wavelength-duplication-type;
920       config false;
921       mandatory true;
922       description
923         "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
924     }
925     list circuit-packs {
926       key "index";
927       description
928         "list for Cards associated with an add/drop group and srg";
929       leaf index {
930         type uint32;
931       }
932       uses circuit-pack-name {
933         refine "circuit-pack-name" {
934           mandatory true;
935         }
936       }
937     }
938     uses mc-capabilities-g;
939   }
940
941   grouping xponder {
942     leaf xpdr-number {
943       type uint16;
944       must "current() > 0" {
945         error-message "Xponder not supported by device ";
946         description
947           "Validating if the Xponder is supported by device";
948       }
949     }
950     leaf xpdr-type {
951       type org-openroadm-common-types:xpdr-node-types;
952       mandatory true;
953       description
954         "Identifier for xponder-type e.g Transponder, Muxponder";
955     }
956     leaf recolor {
957       type boolean;
958       config false;
959       description
960         "Indication if recolor is supported";
961     }
962     list xpdr-port {
963       key "index";
964       description
965         "Network Ports with in a Xponder";
966       leaf index {
967         type uint32;
968       }
969       uses port-name {
970         refine "circuit-pack-name" {
971           mandatory true;
972         }
973         refine "port-name" {
974           mandatory true;
975         }
976       }
977       leaf eqpt-srg-id {
978         type uint32;
979         description
980           "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
981       }
982     }
983   }
984
985   grouping degree-number {
986     leaf degree-number {
987       type leafref {
988         path "/org-openroadm-device/degree/degree-number";
989       }
990       description
991         "Degree identifier. Unique within the context of a device.";
992     }
993   }
994
995   grouping circuit-pack-name {
996     leaf circuit-pack-name {
997       type leafref {
998         path "/org-openroadm-device/circuit-packs/circuit-pack-name";
999       }
1000       description
1001         "Circuit-Pack identifier. Unique within the context of a device.";
1002     }
1003   }
1004
1005   grouping port-name {
1006     uses circuit-pack-name;
1007     leaf port-name {
1008       type leafref {
1009         path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1010       }
1011       description
1012         "Port identifier. Unique within the context of a circuit-pack.";
1013     }
1014   }
1015
1016   grouping srg-number {
1017     leaf srg-number {
1018       type leafref {
1019         path "/org-openroadm-device/shared-risk-group/srg-number";
1020       }
1021       description
1022         "Shared Risk Group identifier. Unique within the context of a device.";
1023     }
1024   }
1025
1026   grouping supporting-port-name {
1027     leaf supporting-circuit-pack-name {
1028       type leafref {
1029         path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1030       }
1031       description
1032         "Identifier of the supporting circuit-pack.";
1033     }
1034     leaf supporting-port {
1035       type leafref {
1036         path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
1037       }
1038       description
1039         "Identifier of the supporting port.";
1040     }
1041   }
1042
1043   grouping interface-name {
1044     leaf interface-name {
1045       type leafref {
1046         path "/org-openroadm-device/interface/name";
1047       }
1048       config false;
1049       description
1050         "Name of an interface. Unique within the context of a device.";
1051     }
1052   }
1053
1054   grouping interfaces-grp {
1055     description
1056       "OpenROADM Interface configuration parameters.";
1057     list interface {
1058       key "name";
1059       description
1060         "The list of configured interfaces on the device.";
1061       leaf name {
1062         type string;
1063         description
1064           "The name of the interface.";
1065       }
1066       leaf description {
1067         type string;
1068         description
1069           "A textual description of the interface.";
1070       }
1071       leaf type {
1072         type identityref {
1073           base org-openroadm-interfaces:interface-type;
1074         }
1075         mandatory true;
1076         description
1077           "The type of the interface.";
1078       }
1079       leaf administrative-state {
1080         type org-openroadm-equipment-states-types:admin-states;
1081       }
1082       leaf operational-state {
1083         type org-openroadm-common-types:state;
1084         config false;
1085       }
1086       leaf circuit-id {
1087         type string {
1088           length "0..45";
1089         }
1090         description
1091           "circuit identifier/user label,
1092            can be used in alarm correlation and/or connection management ";
1093       }
1094       leaf supporting-interface {
1095         type leafref {
1096           path "/org-openroadm-device/interface/name";
1097         }
1098       }
1099       uses supporting-port-name;
1100     }
1101   }
1102
1103   grouping protection-groups {
1104     description
1105       "OpenROADM facility protection configuration parameters.";
1106     container protection-grps {
1107       description
1108         "The list of configured protection groups on the device.";
1109     }
1110   }
1111
1112   grouping port {
1113     description
1114       "Grouping of attributes related to a port object.";
1115     leaf port-name {
1116       type string;
1117       mandatory true;
1118       description
1119         "Identifier for a port, unique within a circuit pack";
1120     }
1121     leaf port-type {
1122       type string;
1123       description
1124         "Type of the pluggable or fixed port.";
1125     }
1126     leaf port-qual {
1127       type org-openroadm-common-types:port-qual;
1128     }
1129     leaf port-wavelength-type {
1130       type org-openroadm-port-types:port-wavelength-types;
1131       config false;
1132       description
1133         "Type of port - single, multiple-wavelength, etc.";
1134     }
1135     leaf port-direction {
1136       type org-openroadm-common-types:direction;
1137       config false;
1138       mandatory true;
1139       description
1140         "Whether port is uni (tx/rx) or bi-directional and";
1141     }
1142     leaf label {
1143       type string;
1144       config false;
1145       description
1146         "Faceplate label";
1147     }
1148     leaf circuit-id {
1149       type string {
1150         length "0..45";
1151       }
1152       description
1153         "circuit identifier/user label,
1154          can be used in alarm correlation and/or connection management ";
1155     }
1156     leaf administrative-state {
1157       type org-openroadm-equipment-states-types:admin-states;
1158       default "outOfService";
1159       description
1160         "Administrative state of port. The value of this field independent of the state of its contained and containing resources.  Setting this a port to administratively down will impact both its operational state, as well the operational state of its contained resources.  If this port is an endpoint to a connection, internal-link, physical-link, etc, then administratively disabling this port will impact the operational state of those items unless they are using some form of port-protection schema.";
1161     }
1162     leaf operational-state {
1163       type org-openroadm-common-types:state;
1164       config false;
1165       mandatory true;
1166       description
1167         "Operational state of a port";
1168     }
1169     leaf-list supported-interface-capability {
1170       type identityref {
1171         base org-openroadm-port-types:supported-if-capability;
1172       }
1173       config false;
1174       description
1175         "Interface types supported on this port";
1176     }
1177     leaf logical-connection-point {
1178       type string;
1179       description
1180         "delete or replace with list logical-ports or connections?";
1181     }
1182     container partner-port {
1183       config false;
1184       description
1185         "For ports which are not identified as having a direction of bidirectional, this field is used to identify the port which corresponds to the reverse direction. A port pair should include a port for each direction (tx, rx) and report their mate as partner-port.";
1186       uses port-name;
1187     }
1188     container parent-port {
1189       config false;
1190       description
1191         "In the case of port hierarchy, this is the parent port, which is also modeled as port within this circuit-pack. This is used in the case of a port that supports a parallel connector that contains subports.  The parent-port of the subport will be the port that contains this subport.  This can be used to help isolate faults when a single fault on a parallel connector introduces symptomatic failures on the contained subports.";
1192       uses port-name;
1193     }
1194     list interfaces {
1195       config false;
1196       description
1197         "List of the interfaces this port supports.  This is a list of names of instances in the flat instance list";
1198       uses interface-name;
1199     }
1200   }
1201
1202   grouping org-openroadm-device-container {
1203     container org-openroadm-device {
1204       container info {
1205         uses device-common;
1206         leaf max-degrees {
1207           type uint16;
1208           config false;
1209           description
1210             "Max. number of degrees supported by device";
1211         }
1212         leaf max-srgs {
1213           type uint16;
1214           config false;
1215           description
1216             "Max. number of SRGs in an add/drop group";
1217         }
1218         leaf max-num-bin-15min-historical-pm {
1219           type uint16;
1220           config false;
1221           description
1222             "Max. number of bin the NE support for 15min historical PM";
1223         }
1224         leaf max-num-bin-24hour-historical-pm {
1225           type uint16;
1226           config false;
1227           description
1228             "Max. number of bin the NE support for 24hour historical PM";
1229         }
1230       }
1231       container users {
1232         description
1233           "Stores a list of users";
1234         uses org-openroadm-user-mgmt:user-profile;
1235       }
1236       container pending-sw {
1237         config false;
1238         uses org-openroadm-swdl:sw-bank;
1239       }
1240       uses shelves;
1241       uses circuit-packs;
1242       uses interfaces-grp;
1243       uses protection-groups;
1244       container protocols {
1245         description
1246           "Contains the supported protocols";
1247       }
1248       uses internal-links;
1249       uses physical-links;
1250       uses external-links;
1251       list degree {
1252         when "/org-openroadm-device/info/node-type='rdm'";
1253         key "degree-number";
1254         uses degree;
1255       }
1256       list shared-risk-group {
1257         when "/org-openroadm-device/info/node-type='rdm'";
1258         key "srg-number";
1259         uses srg;
1260       }
1261       list line-amplifier {
1262         when "/org-openroadm-device/info/node-type='ila'";
1263         key "amp-number";
1264         description
1265           "lists amplifiers in different directions";
1266         uses amplifier;
1267         list circuit-pack {
1268           key "index";
1269           description
1270             "list for Cards associated with an amplifier";
1271           leaf index {
1272             type uint32;
1273           }
1274           uses circuit-pack-name {
1275             refine "circuit-pack-name" {
1276               mandatory true;
1277             }
1278           }
1279         }
1280         list line-port {
1281           key "port-direction";
1282           description
1283             "Port associated with an amplifier which face the line (ila-external): traffic port.";
1284           leaf port-direction {
1285             type org-openroadm-common-types:direction;
1286             config true;
1287             mandatory true;
1288             description
1289               "partly allows identifying ports associated with logical amp :TX for egress, RX for ingress
1290                TXRX in case of bidirectional port";
1291           }
1292           leaf tx-instance-port-direction-label {
1293             type string;
1294             config true;
1295             description
1296               "Complements ports identification. Used notably in case of bidirectional ports,
1297                and/or in multi-degree amplifier nodes. Allows associating one of the directions
1298                specified in ila-direction-label. Shall be consistent with ila-direction-label";
1299           }
1300           leaf rx-instance-port-direction-label {
1301             type string;
1302             config true;
1303             description
1304               "Complements ports identification. Used notably in case of bidirectional ports,
1305                and/or in multi-degree amplifier nodes. Allows associating one of the directions
1306                specified in ila-direction-label. Shall be consistent with ila-direction-label";
1307           }
1308           uses port-name {
1309             refine "circuit-pack-name" {
1310               mandatory true;
1311             }
1312             refine "port-name" {
1313               mandatory true;
1314             }
1315           }
1316         }
1317         list osc-port {
1318           key "port-direction";
1319           description
1320             "Ports associated with OSC";
1321           leaf port-direction {
1322             type org-openroadm-common-types:direction;
1323             config true;
1324             mandatory true;
1325             description
1326               "allows identifying ports associated with logical amp :
1327                TX for OSC circuit-pack IN RX for OSC circuit-pack OUT";
1328           }
1329           uses port-name {
1330             refine "circuit-pack-name" {
1331               mandatory true;
1332             }
1333             refine "port-name" {
1334               mandatory true;
1335             }
1336           }
1337         }
1338         list otdr-port {
1339           key "otdr-direction";
1340           description
1341             "otdr ports associated with an ILA";
1342           leaf otdr-direction {
1343             type string;
1344             config true;
1345             description
1346               "allows identifying associated logical amp port in which OTDR is launched:
1347                corresponds to rx-instance-port-direction-label of corresponding amplifier line-port";
1348           }
1349           uses port-name {
1350             refine "circuit-pack-name" {
1351               mandatory true;
1352             }
1353             refine "port-name" {
1354               mandatory true;
1355             }
1356           }
1357         }
1358       }
1359       list xponder {
1360         when "/org-openroadm-device/info/node-type='xpdr'";
1361         key "xpdr-number";
1362         uses xponder;
1363       }
1364       list roadm-connections {
1365         when "/org-openroadm-device/info/node-type='rdm'";
1366         key "connection-name";
1367         uses connection;
1368       }
1369       list odu-connection {
1370         when "/org-openroadm-device/info/node-type='xpdr'";
1371         key "connection-name";
1372         uses odu-connection;
1373       }
1374       list connection-map {
1375         key "connection-map-number";
1376         config false;
1377         leaf connection-map-number {
1378           type uint32;
1379           description
1380             "Unique identifier for this connection-map entry";
1381         }
1382         container source {
1383           leaf circuit-pack-name {
1384             type leafref {
1385               path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1386             }
1387             mandatory true;
1388           }
1389           leaf port-name {
1390             type leafref {
1391               path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1392             }
1393             mandatory true;
1394             description
1395               "Port identifier. Unique within the context of a circuit-pack.";
1396           }
1397         }
1398         list destination {
1399           key "circuit-pack-name port-name";
1400           min-elements 1;
1401           leaf circuit-pack-name {
1402             type leafref {
1403               path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1404             }
1405             mandatory true;
1406           }
1407           leaf port-name {
1408             type leafref {
1409               path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1410             }
1411             mandatory true;
1412             description
1413               "Port identifier. Unique within the context of a circuit-pack.";
1414           }
1415         }
1416       }
1417       list odu-switching-pools {
1418         when "/org-openroadm-device/info/node-type='xpdr'";
1419         key "switching-pool-number";
1420         config false;
1421         leaf switching-pool-number {
1422           type uint16;
1423           description
1424             "Unique identifier for this odu-switching-pool";
1425         }
1426         leaf switching-pool-type {
1427           type org-openroadm-switching-pool-types:switching-pool-types;
1428         }
1429         list non-blocking-list {
1430           key "nbl-number";
1431           config false;
1432           description
1433             "List of ports in a non-blocking switch element";
1434           leaf nbl-number {
1435             type uint16;
1436             description
1437               "Identifier for this non-blocking-list. Unique within odu-switching-pool";
1438           }
1439           leaf interconnect-bandwidth-unit {
1440             type uint32;
1441             config false;
1442             description
1443               "Switch fabric interconnect bandwidth unit rate in bits per second.
1444                Represents granularity of switch fabric";
1445           }
1446           leaf interconnect-bandwidth {
1447             type uint32;
1448             config false;
1449             description
1450               "Total interconnect bandwidth for a non-blocking element expressed as
1451                number of inter-connect-bandwidth units";
1452           }
1453           list port-list {
1454             key "circuit-pack-name port-name";
1455             leaf circuit-pack-name {
1456               type leafref {
1457                 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1458               }
1459               config false;
1460             }
1461             leaf port-name {
1462               type leafref {
1463                 path "/org-openroadm-device/circuit-packs/ports/port-name";
1464               }
1465               config false;
1466               description
1467                 "Port name. Unique within device";
1468             }
1469           }
1470           list pluggable-optics-holder-list {
1471             key "circuit-pack-name slot-name";
1472             leaf circuit-pack-name {
1473               type leafref {
1474                 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1475               }
1476               config false;
1477               description
1478                 "Name of parent circuit-pack";
1479             }
1480             leaf slot-name {
1481               type leafref {
1482                 path "/org-openroadm-device/circuit-packs/cp-slots/slot-name";
1483               }
1484               config false;
1485               description
1486                 "Name of pluggable-optics-holder";
1487             }
1488           }
1489         }
1490       }
1491     }
1492   }
1493
1494   grouping mc-capabilities-g {
1495     container mc-capabilities {
1496       config false;
1497       description
1498         "Capabilities of the media channel on a degree or SRG.  This is used to validate mc-ttp provisioning on degrees and SRGs.";
1499       leaf slot-width-granularity {
1500         type org-openroadm-common-types:frequency-GHz;
1501         default "50";
1502         config false;
1503         description
1504           "Width of a slot measured in GHz.";
1505       }
1506       leaf center-freq-granularity {
1507         type org-openroadm-common-types:frequency-GHz;
1508         default "50";
1509         config false;
1510         description
1511           "Granularity of allowed center frequencies.  The base frequency for this computation is 193.1 THz (G.694.1)";
1512       }
1513       leaf min-slots {
1514         type uint32;
1515         default "1";
1516         config false;
1517         description
1518           "Minimum number of slots permitted to be joined together to form a media channel.  Must be less than or equal to the max-slots";
1519       }
1520       leaf max-slots {
1521         type uint32;
1522         default "1";
1523         config false;
1524         description
1525           "Maximum number of slots permitted to be joined together to form a media channel.  Must be greater than or equal to the min-slots";
1526       }
1527     }
1528   }
1529
1530   grouping common-session-parms {
1531     description
1532       "Common session parameters to identify a
1533        management session.";
1534     leaf username {
1535       type org-openroadm-user-mgmt:username-type;
1536       mandatory true;
1537       description
1538         "Name of the user for the session.";
1539     }
1540     leaf session-id {
1541       type ietf-nc:session-id-or-zero-type;
1542       mandatory true;
1543       description
1544         "Identifier of the session.
1545          A NETCONF session MUST be identified by a non-zero value.
1546          A non-NETCONF session MAY be identified by the value zero.";
1547     }
1548     leaf source-host {
1549       type ietf-inet-types:ip-address;
1550       description
1551         "Address of the remote host for the session.";
1552     }
1553   }
1554
1555   grouping changed-by-parms {
1556     description
1557       "Common parameters to identify the source
1558        of a change event, such as a configuration
1559        or capability change.";
1560     container changed-by {
1561       description
1562         "Indicates the source of the change.
1563          If caused by internal action, then the
1564          empty leaf 'server' will be present.
1565          If caused by a management session, then
1566          the name, remote host address, and session ID
1567          of the session that made the change will be reported.";
1568       choice server-or-user {
1569         leaf server {
1570           type empty;
1571           description
1572             "If present, the change was caused
1573              by the server.";
1574         }
1575         case by-user {
1576           uses common-session-parms;
1577         }
1578       }
1579     }
1580   }
1581
1582   rpc led-control {
1583     description
1584       "This command is used to allow user to find an entity on the NE,
1585        The specified entity will have LED blinking.
1586        The equipmentLedOn alarm will be raised and cleared for the indication";
1587     input {
1588       choice equipment-entity {
1589         mandatory true;
1590         case shelf {
1591           leaf shelf-name {
1592             type leafref {
1593               path "/org-openroadm-device/shelves/shelf-name";
1594             }
1595             mandatory true;
1596             description
1597               "shelf-name for the operation";
1598           }
1599         }
1600         case circuit-pack {
1601           leaf circuit-pack-name {
1602             type leafref {
1603               path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1604             }
1605             mandatory true;
1606             description
1607               "circuit-pack-name for the operation";
1608           }
1609         }
1610       }
1611       leaf enabled {
1612         type boolean;
1613         mandatory true;
1614         description
1615           "led-control enabled flag.
1616            when enabled=true,  equipmentLedOn alarm will be raised
1617            when enabled=false, equipmentLedOn alarm will be cleared";
1618       }
1619     }
1620     output {
1621       uses org-openroadm-common-types:rpc-response-status;
1622     }
1623   }
1624   rpc create-tech-info {
1625     description
1626       "Collects all log data for debugging and place it in a location accessible via ftp/sftp.
1627        This model assumes ASYNC operation, i.e. the command will return after the device accepts the command,
1628        A create-tech-info-notification will be send out later for the result of the operation.
1629        The log-file is cleared at the start of every create-tech-info operation in order to ensure
1630        the up-to-date logs are collected. If a vendor does not support concurrent log collection, the second
1631        create-tech-info command will be rejected.";
1632     input {
1633       leaf shelf-id {
1634         type leafref {
1635           path "/org-openroadm-device/shelves/shelf-name";
1636         }
1637         description
1638           "This optional field is used to specify the shelf for log collection.
1639            When this filed is not provided, it is expected to collect logs for the whole node.
1640            Vendor should reject the command if the whole node log collection is not supported.";
1641       }
1642       leaf log-option {
1643         type string;
1644         description
1645           "The log type a vendor can specify. Maybe used in future";
1646       }
1647     }
1648     output {
1649       uses create-tech-info-group;
1650       uses org-openroadm-common-types:rpc-response-status;
1651     }
1652   }
1653   rpc get-connection-port-trail {
1654     input {
1655       leaf connection-name {
1656         type string;
1657         mandatory true;
1658       }
1659     }
1660     output {
1661       uses org-openroadm-common-types:rpc-response-status;
1662       list ports {
1663         uses org-openroadm-common-types:physical-location;
1664         uses port-name {
1665           refine "circuit-pack-name" {
1666             mandatory true;
1667           }
1668           refine "port-name" {
1669             mandatory true;
1670           }
1671         }
1672       }
1673     }
1674   }
1675   rpc disable-automatic-shutoff {
1676     input {
1677       choice degree-or-amp {
1678         mandatory true;
1679         description
1680           "The choice describes the option to specify the entity for the disable-automatic-shutoff RPC. It can be degree-number for rdm and amp-number for ila";
1681         case degree {
1682           leaf degree-number {
1683             type leafref {
1684               path "/org-openroadm-device/degree/degree-number";
1685             }
1686             mandatory true;
1687             description
1688               "The degree-number defined in degree";
1689           }
1690         }
1691         case amp {
1692           leaf amp-number {
1693             type leafref {
1694               path "/org-openroadm-device/line-amplifier/amp-number";
1695             }
1696             mandatory true;
1697             description
1698               "The amp-number defined in line-amplifier";
1699           }
1700         }
1701       }
1702       leaf support-timer {
1703         type uint16 {
1704           range "1..600";
1705         }
1706         default "20";
1707       }
1708     }
1709     output {
1710       uses org-openroadm-common-types:rpc-response-status;
1711     }
1712   }
1713   rpc start-scan {
1714     input {
1715       choice degree-or-amp {
1716         mandatory true;
1717         description
1718           "The choice describes the option to specify the entity for the start-scan RPC. It can be degree-number for rdm and amp-number for ila";
1719         case degree {
1720           leaf degree-number {
1721             type leafref {
1722               path "/org-openroadm-device/degree/degree-number";
1723             }
1724             mandatory true;
1725             description
1726               "The degree-number defined in degree";
1727           }
1728         }
1729         case amp {
1730           leaf amp-number {
1731             type leafref {
1732               path "/org-openroadm-device/line-amplifier/amp-number";
1733             }
1734             mandatory true;
1735             description
1736               "The amp-number defined in line-amplifier";
1737           }
1738         }
1739       }
1740       leaf port-direction {
1741         type org-openroadm-common-types:direction;
1742       }
1743       leaf distance {
1744         type uint32;
1745       }
1746       leaf resolution {
1747         type uint32;
1748       }
1749     }
1750     output {
1751       uses org-openroadm-common-types:rpc-response-status;
1752     }
1753   }
1754   rpc set-current-datetime {
1755     description
1756       "Set the info/current-datetime leaf to the specified value.";
1757     input {
1758       leaf current-datetime {
1759         type ietf-yang-types:date-and-time;
1760         mandatory true;
1761         description
1762           "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
1763       }
1764     }
1765     output {
1766       uses org-openroadm-common-types:rpc-response-status;
1767     }
1768   }
1769   notification create-tech-info-notification {
1770     description
1771       "This Notification is sent when the create-tech-info is complete or failed.";
1772     uses create-tech-info-group;
1773     uses org-openroadm-common-types:rpc-response-status;
1774   }
1775   notification otdr-scan-result {
1776     leaf status {
1777       type enumeration {
1778         enum "Completed" {
1779           value 1;
1780         }
1781         enum "Failed" {
1782           value 2;
1783         }
1784       }
1785       mandatory true;
1786       description
1787         "Completed or Failed for the scan's final status";
1788     }
1789     leaf result-file {
1790       type string;
1791     }
1792   }
1793   notification change-notification {
1794     description
1795       "The Notification that a resource has been added, modified or removed.
1796        This notification can be triggered by changes in configuration and operational data.
1797        It shall contain the changed field pointed by the xpath.
1798        Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
1799     leaf change-time {
1800       type ietf-yang-types:date-and-time;
1801       description
1802         "The time the change occurs.";
1803     }
1804     uses changed-by-parms;
1805     leaf datastore {
1806       type enumeration {
1807         enum "running" {
1808           description
1809             "The <running> datastore has changed.";
1810         }
1811         enum "startup" {
1812           description
1813             "The <startup> datastore has changed";
1814         }
1815       }
1816       default "running";
1817       description
1818         "Indicates which configuration datastore has changed.";
1819     }
1820     list edit {
1821       description
1822         "An edit (change) record SHOULD be present for each distinct
1823          edit operation that the server has detected on
1824          the target datastore.  This list MAY be omitted
1825          if the detailed edit operations are not known.
1826          The server MAY report entries in this list for
1827          changes not made by a NETCONF session.";
1828       leaf target {
1829         type instance-identifier;
1830         description
1831           "Top most node associated with the configuration or operational change.
1832            A server SHOULD set this object to the node within
1833            the datastore that is being altered.  A server MAY
1834            set this object to one of the ancestors of the actual
1835            node that was changed, or omit this object, if the
1836            exact node is not known.";
1837       }
1838       leaf operation {
1839         type ietf-nc:edit-operation-type;
1840         description
1841           "Type of edit operation performed.
1842            A server MUST set this object to the NETCONF edit
1843            operation performed on the target datastore.";
1844       }
1845     }
1846   }
1847   uses org-openroadm-device-container;
1848 }