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