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;
16 revision-date 2016-10-14;
18 import org-openroadm-resource-types {
19 prefix org-openroadm-resource-types;
21 import org-openroadm-wavelength-map {
22 prefix org-openroadm-wavelength-map;
24 import org-openroadm-physical-types {
25 prefix org-openroadm-physical-types;
27 import org-openroadm-user-mgmt {
28 prefix org-openroadm-user-mgmt;
30 import org-openroadm-port-types {
31 prefix org-openroadm-port-types;
33 import org-openroadm-interfaces {
34 prefix org-openroadm-interfaces;
36 import org-openroadm-swdl {
37 prefix org-openroadm-swdl;
39 import org-openroadm-equipment-states-types {
40 prefix org-openroadm-equipment-states-types;
43 organization "Open ROADM MSA";
47 "YANG definitions of ROADM device
49 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
50 AT&T Intellectual Property. All other rights reserved.
52 Redistribution and use in source and binary forms, with or without modification,
53 are permitted provided that the following conditions are met:
55 * Redistributions of source code must retain the above copyright notice, this
56 list of conditions and the following disclaimer.
57 * Redistributions in binary form must reproduce the above copyright notice,
58 this list of conditions and the following disclaimer in the documentation and/or
59 other materials provided with the distribution.
60 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
61 contributors may be used to endorse or promote products derived from this software
62 without specific prior written permission.
64 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
65 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
66 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
67 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
68 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
69 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
70 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
71 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
72 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
73 POSSIBILITY OF SUCH DAMAGE.
75 Also contains code components extracted from IETF netconf. These code components
76 are copyrighted and licensed as follows:
78 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
81 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
82 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
83 publication of this document. Please review these documents carefully, as they
84 describe your rights and restrictions with respect to this document. Code Components
85 extracted from this document must include Simplified BSD License text as described in
86 Section 4.e of the Trust Legal Provisions and are provided without warranty as
87 described in the Simplified BSD License.";
91 "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc";
99 rpc get-connection-port-trail {
101 leaf connection-number {
107 uses org-openroadm-common-types:rpc-response-status;
109 uses org-openroadm-common-types:physical-location;
111 refine "circuit-pack-name" {
121 rpc disable-automatic-shutoff {
125 path "/org-openroadm-device/shelves/shelf-name";
129 "The shelf where amp is located";
143 uses org-openroadm-common-types:rpc-response-status;
152 leaf port-direction {
153 type org-openroadm-common-types:direction;
163 uses org-openroadm-common-types:rpc-response-status;
167 notification otdr-scan-result {
179 "Completed or Failed for the scan's final status";
186 rpc set-current-datetime {
188 "Set the info/current-datetime leaf to the specified value.";
190 leaf current-datetime {
191 type ietf-yang-types:date-and-time;
194 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
199 uses org-openroadm-common-types:rpc-response-status;
203 grouping device-common {
207 "Globally unique identifer for a device.";
213 "Number assigned to a ROADM node at a
217 type org-openroadm-common-types:node-types;
219 "Identifier for node-type e.g Roadm, xponder";
226 "Common Language Location Identifier.";
228 uses org-openroadm-physical-types:node-info;
230 type ietf-inet-types:ip-address;
232 "IP Address of device";
239 "The length of the subnet prefix";
241 leaf defaultGateway {
242 type ietf-inet-types:ip-address;
257 leaf current-ipAddress {
258 type ietf-inet-types:ip-address;
261 "Current IP Address of device";
263 leaf current-prefix-length {
269 "The current length of the subnet prefix";
271 leaf current-defaultGateway {
272 type ietf-inet-types:ip-address;
275 "Current Default Gateway";
278 type ietf-yang-types:mac-address;
280 "MAC Address of device";
283 leaf softwareVersion {
292 "Template information used in the deployment.";
294 leaf current-datetime {
295 type ietf-yang-types:date-and-time;
298 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
300 container geoLocation {
309 "[From wikipedia] Latitude is an angle (defined below)
310 which ranges from 0° at the Equator to 90° (North or
311 South) at the poles";
319 "[From wikipedia] The longitude is measured as the
320 angle east or west from the Prime Meridian, ranging
321 from 0° at the Prime Meridian to +180° eastward and
329 "slots information. To be populated by NE during retrieval.";
333 "The name of this slot.";
340 leaf provisioned-circuit-pack {
342 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
345 "The supported circuit-pack. It will be empty if no provision on this slot.";
357 "Unique identifier for this shelf within a device";
362 "The shelf type: describe the shelf with a unique string.";
368 "Reflect the shelf physical location data including floor, aisle, bay values.";
371 leaf shelf-position {
373 "Reflect the shelf vertical position within an equipment bay.";
376 leaf administrative-state {
378 "Admin State of the shelf";
379 type org-openroadm-equipment-states-types:admin-states;
381 uses org-openroadm-physical-types:common-info;
382 leaf equipment-state {
383 type org-openroadm-equipment-states-types:states;
385 "equipment state for the shelf, used to track the lifecycle state.";
388 type ietf-yang-types:date-and-time;
390 "due date for the shelf.";
394 "List of slots on this shelf. To be populated by NE during retrieval.";
401 grouping circuit-packs {
404 "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
405 key "circuit-pack-name";
406 leaf circuit-pack-type {
408 "Type of circuit-pack";
412 leaf circuit-pack-product-code {
414 "Product Code for the circuit-pack";
421 grouping circuit-pack {
422 leaf circuit-pack-name {
424 "Unique identifier for this circuit-pack within a device";
427 leaf administrative-state {
429 "Administrative state of circuit-pack";
430 type org-openroadm-equipment-states-types:admin-states;
432 uses org-openroadm-physical-types:common-info;
433 container circuit-pack-category {
435 "General type of circuit-pack";
436 uses org-openroadm-common-types:equipment-type;
439 leaf equipment-state {
441 "Equipment state, which complements operational state.";
442 type org-openroadm-equipment-states-types:states;
444 leaf circuit-pack-mode {
446 "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
452 path "/org-openroadm-device/shelves/shelf-name";
465 type ietf-yang-types:date-and-time;
467 "due date for this circuit-pack.";
469 container parent-circuit-pack {
471 "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.";
472 uses circuit-pack-name;
476 "Slot name on parent-circuit-pack.";
481 "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
489 "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.";
491 container roadm-port {
492 when "../port-qual='roadm-external'";
493 uses org-openroadm-port-types:roadm-port;
495 container transponder-port {
496 when "../port-qual='xpdr-network' or ../port-qual='xpdr-client'";
497 uses org-openroadm-port-types:common-port;
499 container otdr-port {
500 when "../port-qual='otdr'";
502 "Settings for otdr port.";
503 leaf launch-cable-length {
508 leaf port-direction {
509 type org-openroadm-common-types:direction;
515 grouping connection {
517 "Grouping used to define connections.";
518 leaf connection-number {
521 leaf wavelength-number {
525 "wavelength-number, can be used to access wavelength-map
526 to get wavelength value in nm.";
528 leaf opticalControlMode {
530 "Whether connection is currently in power or gain/loss mode";
531 type org-openroadm-common-types:optical-control-mode;
532 reference "openroadm.org: Open ROADM MSA Specification.";
535 leaf target-output-power {
536 type org-openroadm-common-types:power-dBm;
538 "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
543 path "/org-openroadm-device/interface/name";
548 container destination {
551 path "/org-openroadm-device/interface/name";
561 must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
562 error-message "Degree not supported by device ";
564 "Validating if the degree is supported by device";
567 leaf max-wavelengths {
570 "maximum number of wavelengths";
577 "list for Cards associated with a degree";
581 uses circuit-pack-name {
582 refine "circuit-pack-name" {
587 list connection-ports {
589 "Port associated with degree: One if bi-directional; two if uni-directional";
595 refine "circuit-pack-name" {
603 container otdr-port {
605 "otdr port associated with degree.";
610 grouping external-links {
612 "YANG definitions for external links..
613 - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed maually.";
615 key "external-link-name";
620 grouping external-link {
621 leaf external-link-name {
625 uses org-openroadm-resource-types:device-id {
630 uses org-openroadm-resource-types:port-name {
631 refine "circuit-pack-name" {
639 container destination {
640 uses org-openroadm-resource-types:device-id {
645 uses org-openroadm-resource-types:port-name {
646 refine "circuit-pack-name" {
656 grouping internal-links {
658 key "internal-link-name";
664 grouping internal-link {
665 leaf internal-link-name {
670 refine "circuit-pack-name" {
678 container destination {
680 refine "circuit-pack-name" {
690 grouping physical-links {
692 "YANG definitions for physical links.
693 - phyical links between cards within a ROADM, which are populated by the ROADM and cannot be added or removed manually. ";
695 key "physical-link-name";
700 grouping physical-link {
701 leaf physical-link-name {
706 refine "circuit-pack-name" {
714 container destination {
716 refine "circuit-pack-name" {
727 leaf max-add-drop-ports {
734 must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
735 error-message "invalid SRG";
737 "Validating if the srg is supported by add/drop group";
740 leaf wavelengthDuplication {
742 "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
748 "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.";
751 enum "onePerDegree" {
753 "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.";
761 "list for Cards associated with an add/drop group and srg";
765 uses circuit-pack-name {
766 refine "circuit-pack-name" {
773 grouping degree-number {
776 "Degree identifier. Unique within the context of a device.";
778 path "/org-openroadm-device/degree/degree-number";
783 grouping circuit-pack-name {
784 leaf circuit-pack-name {
786 "Circuit-Pack identifier. Unique within the context of a device.";
788 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
794 uses circuit-pack-name;
797 "Port identifier. Unique within the context of a circuit-pack.";
799 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
804 grouping srg-number {
807 "Shared Risk Group identifier. Unique within the context of a device.";
809 path "/org-openroadm-device/shared-risk-group/srg-number";
814 grouping supporting-port-name {
815 leaf supporting-circuit-pack-name {
817 "Identifier of the supporting circuit-pack.";
819 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
823 leaf supporting-port {
825 "Identifier of the supporting port.";
828 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
833 grouping interface-name {
834 leaf interface-name {
836 "Name of an interface. Unique within the context of a device.";
838 path "/org-openroadm-device/interface/name";
844 grouping interfaces-grp {
846 "OpenROADM Interface configuration parameters.";
850 "The list of configured interfaces on the device.";
854 "The name of the interface.";
859 "A textual description of the interface.";
863 base org-openroadm-interfaces:interface-type;
867 "The type of the interface.";
869 leaf administrative-state {
870 type org-openroadm-equipment-states-types:admin-states;
872 leaf operational-state {
873 type org-openroadm-common-types:state;
881 "circuit identifier/user label,
882 can be used in alarm correlation and/or connection management ";
884 leaf supporting-interface {
886 path "/org-openroadm-device/interface/name";
889 uses supporting-port-name;
895 "Grouping of attributes related to a port object.";
900 "Identifier for a port, unique within a circuit pack";
905 "Type of the pluggable or fixed port.";
909 enum "roadm-internal" {
912 enum "roadm-external" {
915 enum "xpdr-network" {
926 leaf port-wavelength-type {
927 type org-openroadm-port-types:port-wavelength-types;
930 "Type of port - single, multiple-wavelength, etc.";
932 leaf port-direction {
933 type org-openroadm-common-types:direction;
937 "Whether port is uni (tx/rx) or bi-directional and";
950 "circuit identifier/user label,
951 can be used in alarm correlation and/or connection management ";
954 leaf administrative-state {
955 type org-openroadm-equipment-states-types:admin-states;
957 "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.";
958 default "outOfService";
960 leaf operational-state {
961 type org-openroadm-common-types:state;
965 "Operational state of a port";
967 leaf-list supported-interface-capability {
969 "Interface types supported on this port";
972 base org-openroadm-port-types:supported-if-capability;
975 leaf logical-connection-point {
978 "delete or replace with list logical-ports or connections?";
980 container partner-port {
983 "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.";
986 container parent-port {
989 "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.";
995 "List of the interfaces this port supports. This is a list of names of instances in the flat instance list";
1000 uses org-openroadm-device-container;
1002 grouping org-openroadm-device-container {
1003 container org-openroadm-device {
1009 "Max. number of degrees supported by device";
1015 "Max. number of SRGs in an add/drop group";
1021 "Stores a list of users";
1022 uses org-openroadm-user-mgmt:user-profile;
1024 container pending-sw {
1026 uses org-openroadm-swdl:sw-bank;
1030 uses interfaces-grp;
1031 container protocols {
1033 "Contains the supported protocols";
1035 container wavelength-map {
1037 "The wavelength-number and center frequency, wavelength mapping";
1039 uses org-openroadm-wavelength-map:wavelength-map-g;
1041 uses internal-links;
1042 uses physical-links;
1043 uses external-links;
1045 when "/org-openroadm-device/info/node-type='rdm'";
1046 key "degree-number";
1049 list shared-risk-group {
1050 when "/org-openroadm-device/info/node-type='rdm'";
1054 list roadm-connections {
1055 when "/org-openroadm-device/info/node-type='rdm'";
1056 key "connection-number";
1059 list connection-map {
1060 key "connection-map-number";
1062 leaf connection-map-number {
1064 "Unique identifier for this connection-map entry";
1068 leaf circuit-pack-name {
1070 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1076 "Port identifier. Unique within the context of a circuit-pack.";
1078 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1084 key "circuit-pack-name port-name";
1086 leaf circuit-pack-name {
1088 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1094 "Port identifier. Unique within the context of a circuit-pack.";
1096 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1105 grouping common-session-parms {
1107 "Common session parameters to identify a
1108 management session.";
1114 "Name of the user for the session.";
1118 type ietf-nc:session-id-or-zero-type;
1121 "Identifier of the session.
1122 A NETCONF session MUST be identified by a non-zero value.
1123 A non-NETCONF session MAY be identified by the value zero.";
1127 type ietf-inet-types:ip-address;
1129 "Address of the remote host for the session.";
1132 grouping changed-by-parms {
1134 "Common parameters to identify the source
1135 of a change event, such as a configuration
1136 or capability change.";
1138 container changed-by {
1140 "Indicates the source of the change.
1141 If caused by internal action, then the
1142 empty leaf 'server' will be present.
1143 If caused by a management session, then
1144 the name, remote host address, and session ID
1145 of the session that made the change will be reported.";
1146 choice server-or-user {
1150 "If present, the change was caused
1155 uses common-session-parms;
1157 } // choice server-or-user
1158 } // container changed-by-parms
1160 notification change-notification {
1162 "The Notification that a resource has been added, modified or removed.
1163 This notification can be triggered by changes in configuration and operational data.
1164 It shall contain the changed field pointed by the xpath.
1165 Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
1168 description "The time the change occurs.";
1169 type ietf-yang-types:date-and-time;
1171 uses changed-by-parms;
1176 description "The <running> datastore has changed.";
1179 description "The <startup> datastore has changed";
1184 "Indicates which configuration datastore has changed.";
1188 "An edit (change) record SHOULD be present for each distinct
1189 edit operation that the server has detected on
1190 the target datastore. This list MAY be omitted
1191 if the detailed edit operations are not known.
1192 The server MAY report entries in this list for
1193 changes not made by a NETCONF session.";
1196 type instance-identifier;
1198 "Topmost node associated with the configuration or operationa change.
1199 A server SHOULD set this object to the node within
1200 the datastore that is being altered. A server MAY
1201 set this object to one of the ancestors of the actual
1202 node that was changed, or omit this object, if the
1203 exact node is not known.";
1206 type ietf-nc:edit-operation-type;
1208 "Type of edit operation performed.
1209 A server MUST set this object to the NETCONF edit
1210 operation performed on the target datastore.";
1213 } // notification change-notification