1 module org-openroadm-device {
2 namespace "http://org/openroadm/device";
3 prefix org-openroadm-device;
5 import ietf-yang-types {
6 prefix ietf-yang-types;
8 import ietf-inet-types {
9 prefix ietf-inet-types;
14 import org-openroadm-common-types {
15 prefix org-openroadm-common-types;
17 import org-openroadm-resource-types {
18 prefix org-openroadm-resource-types;
20 import org-openroadm-wavelength-map {
21 prefix org-openroadm-wavelength-map;
23 import org-openroadm-physical-types {
24 prefix org-openroadm-physical-types;
26 import org-openroadm-user-mgmt {
27 prefix org-openroadm-user-mgmt;
29 import org-openroadm-port-types {
30 prefix org-openroadm-port-types;
32 import org-openroadm-interfaces {
33 prefix org-openroadm-interfaces;
35 import org-openroadm-swdl {
36 prefix org-openroadm-swdl;
38 import org-openroadm-equipment-states-types {
39 prefix org-openroadm-equipment-states-types;
42 organization "Open ROADM MSA";
46 "YANG definitions of ROADM device
48 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
49 AT&T Intellectual Property. All other rights reserved.
51 Redistribution and use in source and binary forms, with or without modification,
52 are permitted provided that the following conditions are met:
54 * Redistributions of source code must retain the above copyright notice, this
55 list of conditions and the following disclaimer.
56 * Redistributions in binary form must reproduce the above copyright notice,
57 this list of conditions and the following disclaimer in the documentation and/or
58 other materials provided with the distribution.
59 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
60 contributors may be used to endorse or promote products derived from this software
61 without specific prior written permission.
63 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
64 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
65 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
66 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
67 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
68 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
69 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
70 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
71 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
72 POSSIBILITY OF SUCH DAMAGE.
74 Also contains code components extracted from IETF netconf. These code components
75 are copyrighted and licensed as follows:
77 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
80 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
81 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
82 publication of this document. Please review these documents carefully, as they
83 describe your rights and restrictions with respect to this document. Code Components
84 extracted from this document must include Simplified BSD License text as described in
85 Section 4.e of the Trust Legal Provisions and are provided without warranty as
86 described in the Simplified BSD License.";
90 "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc";
98 rpc get-connection-port-trail {
100 leaf connection-number {
106 uses org-openroadm-common-types:rpc-response-status;
108 uses org-openroadm-common-types:physical-location;
110 refine "circuit-pack-name" {
120 rpc disable-automatic-shutoff {
124 path "/org-openroadm-device/shelves/shelf-name";
128 "The shelf where amp is located";
142 uses org-openroadm-common-types:rpc-response-status;
151 leaf port-direction {
152 type org-openroadm-common-types:direction;
162 uses org-openroadm-common-types:rpc-response-status;
166 notification otdr-scan-result {
178 "Completed or Failed for the scan's final status";
185 rpc set-current-datetime {
187 "Set the info/current-datetime leaf to the specified value.";
189 leaf current-datetime {
190 type ietf-yang-types:date-and-time;
193 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
198 uses org-openroadm-common-types:rpc-response-status;
202 grouping device-common {
206 "Globally unique identifer for a device.";
212 "Number assigned to a ROADM node at a
216 type org-openroadm-common-types:node-types;
218 "Identifier for node-type e.g Roadm, xponder";
225 "Common Language Location Identifier.";
227 uses org-openroadm-physical-types:node-info;
229 type ietf-inet-types:ip-address;
231 "IP Address of device";
238 "The length of the subnet prefix";
240 leaf defaultGateway {
241 type ietf-inet-types:ip-address;
256 leaf current-ipAddress {
257 type ietf-inet-types:ip-address;
260 "Current IP Address of device";
262 leaf current-prefix-length {
268 "The current length of the subnet prefix";
270 leaf current-defaultGateway {
271 type ietf-inet-types:ip-address;
274 "Current Default Gateway";
277 type ietf-yang-types:mac-address;
279 "MAC Address of device";
282 leaf softwareVersion {
291 "Template information used in the deployment.";
293 leaf current-datetime {
294 type ietf-yang-types:date-and-time;
297 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
299 container geoLocation {
308 "[From wikipedia] Latitude is an angle (defined below)
309 which ranges from 0° at the Equator to 90° (North or
310 South) at the poles";
318 "[From wikipedia] The longitude is measured as the
319 angle east or west from the Prime Meridian, ranging
320 from 0° at the Prime Meridian to +180° eastward and
328 "slots information. To be populated by NE during retrieval.";
332 "The name of this slot.";
339 leaf provisioned-circuit-pack {
341 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
344 "The supported circuit-pack. It will be empty if no provision on this slot.";
356 "Unique identifier for this shelf within a device";
361 "The shelf type: describe the shelf with a unique string.";
367 "Reflect the shelf physical location data including floor, aisle, bay values.";
370 leaf shelf-position {
372 "Reflect the shelf vertical position within an equipment bay.";
375 leaf administrative-state {
377 "Admin State of the shelf";
378 type org-openroadm-equipment-states-types:admin-states;
380 uses org-openroadm-physical-types:common-info;
381 leaf equipment-state {
382 type org-openroadm-equipment-states-types:states;
384 "equipment state for the shelf, used to track the lifecycle state.";
387 type ietf-yang-types:date-and-time;
389 "due date for the shelf.";
393 "List of slots on this shelf. To be populated by NE during retrieval.";
400 grouping circuit-packs {
403 "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
404 key "circuit-pack-name";
405 leaf circuit-pack-type {
407 "Type of circuit-pack";
411 leaf circuit-pack-product-code {
413 "Product Code for the circuit-pack";
420 grouping circuit-pack {
421 leaf circuit-pack-name {
423 "Unique identifier for this circuit-pack within a device";
426 leaf administrative-state {
428 "Administrative state of circuit-pack";
429 type org-openroadm-equipment-states-types:admin-states;
431 uses org-openroadm-physical-types:common-info;
432 container circuit-pack-category {
434 "General type of circuit-pack";
435 uses org-openroadm-common-types:equipment-type;
438 leaf equipment-state {
440 "Equipment state, which complements operational state.";
441 type org-openroadm-equipment-states-types:states;
443 leaf circuit-pack-mode {
445 "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
451 path "/org-openroadm-device/shelves/shelf-name";
464 type ietf-yang-types:date-and-time;
466 "due date for this circuit-pack.";
468 container parent-circuit-pack {
470 "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.";
471 uses circuit-pack-name;
475 "Slot name on parent-circuit-pack.";
480 "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
488 "List of ports on this circuit-pack. For single port pluggables, the port may be modeled against the pluggable itself, or against the parent-circuit-pack. For mulit-port pluggables, it is recommended that ports be modeled against the module itself. Modeling ports as close to the equipment hierarchy as possible will help in fault correlation and isolation since common failures associated with supporting equipment can be used to help identify symptomatic failures on the contained ports.";
490 container roadm-port {
491 when "../port-qual='roadm-external'";
492 uses org-openroadm-port-types:roadm-port;
494 container transponder-port {
495 when "../port-qual='xpdr-network' or ../port-qual='xpdr-client'";
496 uses org-openroadm-port-types:common-port;
498 container otdr-port {
499 when "../port-qual='otdr'";
501 "Settings for otdr port.";
502 leaf launch-cable-length {
507 leaf port-direction {
508 type org-openroadm-common-types:direction;
514 grouping connection {
516 "Grouping used to define connections.";
517 leaf connection-number {
520 leaf wavelength-number {
524 "wavelength-number, can be used to access wavelength-map
525 to get wavelength value in nm.";
527 leaf opticalControlMode {
529 "Whether connection is currently in power or gain/loss mode";
530 type org-openroadm-common-types:optical-control-mode;
531 reference "openroadm.org: Open ROADM MSA Specification.";
534 leaf target-output-power {
535 type org-openroadm-common-types:power-dBm;
537 "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
542 path "/org-openroadm-device/interface/name";
547 container destination {
550 path "/org-openroadm-device/interface/name";
560 must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
561 error-message "Degree not supported by device ";
563 "Validating if the degree is supported by device";
566 leaf max-wavelengths {
569 "maximum number of wavelengths";
576 "list for Cards associated with a degree";
580 uses circuit-pack-name {
581 refine "circuit-pack-name" {
586 list connection-ports {
588 "Port associated with degree: One if bi-directional; two if uni-directional";
594 refine "circuit-pack-name" {
602 container otdr-port {
604 "otdr port associated with degree.";
609 grouping external-links {
611 "YANG definitions for external links..
612 - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed maually.";
614 key "external-link-name";
619 grouping external-link {
620 leaf external-link-name {
624 uses org-openroadm-resource-types:device-id {
629 uses org-openroadm-resource-types:port-name {
630 refine "circuit-pack-name" {
638 container destination {
639 uses org-openroadm-resource-types:device-id {
644 uses org-openroadm-resource-types:port-name {
645 refine "circuit-pack-name" {
655 grouping internal-links {
657 key "internal-link-name";
663 grouping internal-link {
664 leaf internal-link-name {
669 refine "circuit-pack-name" {
677 container destination {
679 refine "circuit-pack-name" {
689 grouping physical-links {
691 "YANG definitions for physical links.
692 - phyical links between cards within a ROADM, which are populated by the ROADM and cannot be added or removed manually. ";
694 key "physical-link-name";
699 grouping physical-link {
700 leaf physical-link-name {
705 refine "circuit-pack-name" {
713 container destination {
715 refine "circuit-pack-name" {
726 leaf max-add-drop-ports {
733 must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
734 error-message "invalid SRG";
736 "Validating if the srg is supported by add/drop group";
739 leaf wavelengthDuplication {
741 "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
747 "The SRG cannot handle wavelength duplication. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will result in failure.";
750 enum "onePerDegree" {
752 "The SRG can handle wavelength duplication, but only one per degree. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will succeed, so long as the connections are not using the same degree.";
760 "list for Cards associated with an add/drop group and srg";
764 uses circuit-pack-name {
765 refine "circuit-pack-name" {
772 grouping degree-number {
775 "Degree identifier. Unique within the context of a device.";
777 path "/org-openroadm-device/degree/degree-number";
782 grouping circuit-pack-name {
783 leaf circuit-pack-name {
785 "Circuit-Pack identifier. Unique within the context of a device.";
787 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
793 uses circuit-pack-name;
796 "Port identifier. Unique within the context of a circuit-pack.";
798 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
803 grouping srg-number {
806 "Shared Risk Group identifier. Unique within the context of a device.";
808 path "/org-openroadm-device/shared-risk-group/srg-number";
813 grouping supporting-port-name {
814 leaf supporting-circuit-pack-name {
816 "Identifier of the supporting circuit-pack.";
818 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
822 leaf supporting-port {
824 "Identifier of the supporting port.";
827 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
832 grouping interface-name {
833 leaf interface-name {
835 "Name of an interface. Unique within the context of a device.";
837 path "/org-openroadm-device/interface/name";
843 grouping interfaces-grp {
845 "OpenROADM Interface configuration parameters.";
849 "The list of configured interfaces on the device.";
853 "The name of the interface.";
858 "A textual description of the interface.";
862 base org-openroadm-interfaces:interface-type;
866 "The type of the interface.";
868 leaf administrative-state {
869 type org-openroadm-equipment-states-types:admin-states;
871 leaf operational-state {
872 type org-openroadm-common-types:state;
880 "circuit identifier/user label,
881 can be used in alarm correlation and/or connection management ";
883 leaf supporting-interface {
885 path "/org-openroadm-device/interface/name";
888 uses supporting-port-name;
894 "Grouping of attributes related to a port object.";
899 "Identifier for a port, unique within a circuit pack";
904 "Type of the pluggable or fixed port.";
908 enum "roadm-internal" {
911 enum "roadm-external" {
914 enum "xpdr-network" {
925 leaf port-wavelength-type {
926 type org-openroadm-port-types:port-wavelength-types;
929 "Type of port - single, multiple-wavelength, etc.";
931 leaf port-direction {
932 type org-openroadm-common-types:direction;
936 "Whether port is uni (tx/rx) or bi-directional and";
949 "circuit identifier/user label,
950 can be used in alarm correlation and/or connection management ";
953 leaf administrative-state {
954 type org-openroadm-equipment-states-types:admin-states;
956 "Administrative state of port. The value of this field independant 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 administratevely disabling this port will impact the operational state of those items unless they are using some form of port-protection schema.";
957 default "outOfService";
959 leaf operational-state {
960 type org-openroadm-common-types:state;
964 "Operational state of a port";
966 leaf-list supported-interface-capability {
968 "Interface types supported on this port";
971 base org-openroadm-port-types:supported-if-capability;
974 leaf logical-connection-point {
977 "delete or replace with list logical-ports or connections?";
979 container partner-port {
982 "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.";
985 container parent-port {
988 "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.";
994 "List of the interfaces this port supports. This is a list of names of instances in the flat instance list";
999 uses org-openroadm-device-container;
1001 grouping org-openroadm-device-container {
1002 container org-openroadm-device {
1008 "Max. number of degrees supported by device";
1014 "Max. number of SRGs in an add/drop group";
1020 "Stores a list of users";
1021 uses org-openroadm-user-mgmt:user-profile;
1023 container pending-sw {
1025 uses org-openroadm-swdl:sw-bank;
1029 uses interfaces-grp;
1030 container protocols {
1032 "Contains the supported protocols";
1034 container wavelength-map {
1036 "The wavelength-number and center frequency, wavelength mapping";
1038 uses org-openroadm-wavelength-map:wavelength-map-g;
1040 uses internal-links;
1041 uses physical-links;
1042 uses external-links;
1044 when "/org-openroadm-device/info/node-type='rdm'";
1045 key "degree-number";
1048 list shared-risk-group {
1049 when "/org-openroadm-device/info/node-type='rdm'";
1053 list roadm-connections {
1054 when "/org-openroadm-device/info/node-type='rdm'";
1055 key "connection-number";
1058 list connection-map {
1059 key "connection-map-number";
1061 leaf connection-map-number {
1063 "Unique identifier for this connection-map entry";
1067 leaf circuit-pack-name {
1069 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1075 "Port identifier. Unique within the context of a circuit-pack.";
1077 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1083 key "circuit-pack-name port-name";
1085 leaf circuit-pack-name {
1087 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1093 "Port identifier. Unique within the context of a circuit-pack.";
1095 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1104 grouping common-session-parms {
1106 "Common session parameters to identify a
1107 management session.";
1113 "Name of the user for the session.";
1117 type ietf-nc:session-id-or-zero-type;
1120 "Identifier of the session.
1121 A NETCONF session MUST be identified by a non-zero value.
1122 A non-NETCONF session MAY be identified by the value zero.";
1126 type ietf-inet-types:ip-address;
1128 "Address of the remote host for the session.";
1131 grouping changed-by-parms {
1133 "Common parameters to identify the source
1134 of a change event, such as a configuration
1135 or capability change.";
1137 container changed-by {
1139 "Indicates the source of the change.
1140 If caused by internal action, then the
1141 empty leaf 'server' will be present.
1142 If caused by a management session, then
1143 the name, remote host address, and session ID
1144 of the session that made the change will be reported.";
1145 choice server-or-user {
1149 "If present, the change was caused
1154 uses common-session-parms;
1156 } // choice server-or-user
1157 } // container changed-by-parms
1159 notification change-notification {
1161 "The Notification that a resource has been added, modified or removed.
1162 This notification can be triggered by changes in configuration and operational data.
1163 It shall contain the changed field pointed by the xpath.
1164 Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
1167 description "The time the change occurs.";
1168 type ietf-yang-types:date-and-time;
1170 uses changed-by-parms;
1175 description "The <running> datastore has changed.";
1178 description "The <startup> datastore has changed";
1183 "Indicates which configuration datastore has changed.";
1187 "An edit (change) record SHOULD be present for each distinct
1188 edit operation that the server has detected on
1189 the target datastore. This list MAY be omitted
1190 if the detailed edit operations are not known.
1191 The server MAY report entries in this list for
1192 changes not made by a NETCONF session.";
1195 type instance-identifier;
1197 "Topmost node associated with the configuration or operationa change.
1198 A server SHOULD set this object to the node within
1199 the datastore that is being altered. A server MAY
1200 set this object to one of the ancestors of the actual
1201 node that was changed, or omit this object, if the
1202 exact node is not known.";
1205 type ietf-nc:edit-operation-type;
1207 "Type of edit operation performed.
1208 A server MUST set this object to the NETCONF edit
1209 operation performed on the target datastore.";
1212 } // notification change-notification