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.";
93 rpc get-connection-port-trail {
95 leaf connection-number {
101 uses org-openroadm-common-types:rpc-response-status;
103 uses org-openroadm-common-types:physical-location;
105 refine "circuit-pack-name" {
115 rpc disable-automatic-shutoff {
119 path "/org-openroadm-device/shelves/shelf-name";
123 "The shelf where amp is located";
137 uses org-openroadm-common-types:rpc-response-status;
146 leaf port-direction {
147 type org-openroadm-common-types:direction;
157 uses org-openroadm-common-types:rpc-response-status;
161 notification otdr-scan-result {
173 "Completed or Failed for the scan's final status";
180 rpc set-current-datetime {
182 "Set the info/current-datetime leaf to the specified value.";
184 leaf current-datetime {
185 type ietf-yang-types:date-and-time {
186 pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}';
190 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
195 uses org-openroadm-common-types:rpc-response-status;
199 grouping device-common {
203 "Globally unique identifer for a device.";
209 "Number assigned to a ROADM node at a
213 type org-openroadm-common-types:node-types;
215 "Identifier for node-type e.g Roadm, xponder";
222 "Common Language Location Identifier.";
224 uses org-openroadm-physical-types:node-info;
226 type ietf-inet-types:ip-address;
228 "IP Address of device";
235 "The length of the subnet prefix";
237 leaf defaultGateway {
238 type ietf-inet-types:ip-address;
253 leaf current-ipAddress {
254 type ietf-inet-types:ip-address;
257 "Current IP Address of device";
259 leaf current-prefix-length {
265 "The current length of the subnet prefix";
267 leaf current-defaultGateway {
268 type ietf-inet-types:ip-address;
271 "Current Default Gateway";
274 type ietf-yang-types:mac-address;
276 "MAC Address of device";
279 leaf softwareVersion {
288 "Template information used in the deployment.";
290 leaf current-datetime {
291 type ietf-yang-types:date-and-time {
292 pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?';
296 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
298 container geoLocation {
307 "[From wikipedia] Latitude is an angle (defined below)
308 which ranges from 0° at the Equator to 90° (North or
309 South) at the poles";
317 "[From wikipedia] The longitude is measured as the
318 angle east or west from the Prime Meridian, ranging
319 from 0° at the Prime Meridian to +180° eastward and
327 "slots information. To be populated by NE during retrieval.";
331 "The name of this slot.";
338 leaf provisioned-circuit-pack {
340 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
343 "The supported circuit-pack. It will be empty if no provision on this slot.";
355 "Unique identifier for this shelf within a device";
360 "The shelf type: describe the shelf with a unique string.";
366 "Reflect the shelf physical location data including floor, aisle, bay values.";
369 leaf shelf-position {
371 "Reflect the shelf vertical position within an equipment bay.";
374 leaf administrative-state {
376 "Admin State of the shelf";
377 type org-openroadm-equipment-states-types:admin-states;
379 uses org-openroadm-physical-types:common-info;
380 leaf equipment-state {
381 type org-openroadm-equipment-states-types:states;
383 "equipment state for the shelf, used to track the lifecycle state.";
386 type ietf-yang-types:date-and-time;
388 "due date for the shelf.";
392 "List of slots on this shelf. To be populated by NE during retrieval.";
399 grouping circuit-packs {
402 "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
403 key "circuit-pack-name";
404 leaf circuit-pack-type {
406 "Type of circuit-pack";
410 leaf circuit-pack-product-code {
412 "Product Code for the circuit-pack";
419 grouping circuit-pack {
420 leaf circuit-pack-name {
422 "Unique identifier for this circuit-pack within a device";
425 leaf administrative-state {
427 "Administrative state of circuit-pack";
428 type org-openroadm-equipment-states-types:admin-states;
430 uses org-openroadm-physical-types:common-info;
431 container circuit-pack-category {
433 "General type of circuit-pack";
434 uses org-openroadm-common-types:equipment-type;
437 leaf equipment-state {
439 "Equipment state, which complements operational state.";
440 type org-openroadm-equipment-states-types:states;
442 leaf circuit-pack-mode {
444 "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
450 path "/org-openroadm-device/shelves/shelf-name";
463 type ietf-yang-types:date-and-time;
465 "due date for this circuit-pack.";
467 container parent-circuit-pack {
469 "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.";
470 uses circuit-pack-name;
474 "Slot name on parent-circuit-pack.";
479 "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
487 "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.";
489 container roadm-port {
490 when "../port-qual='roadm-external'";
491 uses org-openroadm-port-types:roadm-port;
493 container transponder-port {
494 when "../port-qual='xpdr-network' or ../port-qual='xpdr-client'";
495 uses org-openroadm-port-types:common-port;
497 container otdr-port {
498 when "../port-qual='otdr'";
500 "Settings for otdr port.";
501 leaf launch-cable-length {
506 leaf port-direction {
507 type org-openroadm-common-types:direction;
513 grouping connection {
515 "Grouping used to define connections.";
516 leaf connection-number {
519 leaf wavelength-number {
523 "wavelength-number, can be used to access wavelength-map
524 to get wavelength value in nm.";
526 leaf opticalControlMode {
528 "Whether connection is currently in power or gain/loss mode";
529 type org-openroadm-common-types:optical-control-mode;
530 reference "openroadm.org: Open ROADM MSA Specification.";
533 leaf target-output-power {
534 type org-openroadm-common-types:power-dBm;
536 "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
541 path "/org-openroadm-device/interface/name";
546 container destination {
549 path "/org-openroadm-device/interface/name";
559 must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
560 error-message "Degree not supported by device ";
562 "Validating if the degree is supported by device";
565 leaf max-wavelengths {
568 "maximum number of wavelengths";
575 "list for Cards associated with a degree";
579 uses circuit-pack-name {
580 refine "circuit-pack-name" {
585 list connection-ports {
587 "Port associated with degree: One if bi-directional; two if uni-directional";
593 refine "circuit-pack-name" {
601 container otdr-port {
603 "otdr port associated with degree.";
608 grouping external-links {
610 "YANG definitions for external links..
611 - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed maually.";
613 key "external-link-name";
618 grouping external-link {
619 leaf external-link-name {
623 uses org-openroadm-resource-types:device-id {
628 uses org-openroadm-resource-types:port-name {
629 refine "circuit-pack-name" {
637 container destination {
638 uses org-openroadm-resource-types:device-id {
643 uses org-openroadm-resource-types:port-name {
644 refine "circuit-pack-name" {
654 grouping internal-links {
656 key "internal-link-name";
662 grouping internal-link {
663 leaf internal-link-name {
668 refine "circuit-pack-name" {
676 container destination {
678 refine "circuit-pack-name" {
688 grouping physical-links {
690 "YANG definitions for physical links.
691 - phyical links between cards within a ROADM, which are populated by the ROADM and cannot be added or removed manually. ";
693 key "physical-link-name";
698 grouping physical-link {
699 leaf physical-link-name {
704 refine "circuit-pack-name" {
712 container destination {
714 refine "circuit-pack-name" {
725 leaf max-add-drop-ports {
732 must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
733 error-message "invalid SRG";
735 "Validating if the srg is supported by add/drop group";
738 leaf wavelengthDuplication {
740 "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
746 "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.";
749 enum "onePerDegree" {
751 "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.";
759 "list for Cards associated with an add/drop group and srg";
763 uses circuit-pack-name {
764 refine "circuit-pack-name" {
771 grouping degree-number {
774 "Degree identifier. Unique within the context of a device.";
776 path "/org-openroadm-device/degree/degree-number";
781 grouping circuit-pack-name {
782 leaf circuit-pack-name {
784 "Circuit-Pack identifier. Unique within the context of a device.";
786 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
792 uses circuit-pack-name;
795 "Port identifier. Unique within the context of a circuit-pack.";
797 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
802 grouping srg-number {
805 "Shared Risk Group identifier. Unique within the context of a device.";
807 path "/org-openroadm-device/shared-risk-group/srg-number";
812 grouping supporting-port-name {
813 leaf supporting-circuit-pack-name {
815 "Identifier of the supporting circuit-pack.";
817 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
821 leaf supporting-port {
823 "Identifier of the supporting port.";
826 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
831 grouping interface-name {
832 leaf interface-name {
834 "Name of an interface. Unique within the context of a device.";
836 path "/org-openroadm-device/interface/name";
842 grouping interfaces-grp {
844 "OpenROADM Interface configuration parameters.";
848 "The list of configured interfaces on the device.";
852 "The name of the interface.";
857 "A textual description of the interface.";
861 base org-openroadm-interfaces:interface-type;
865 "The type of the interface.";
867 leaf administrative-state {
868 type org-openroadm-equipment-states-types:admin-states;
870 leaf operational-state {
871 type org-openroadm-common-types:state;
879 "circuit identifier/user label,
880 can be used in alarm correlation and/or connection management ";
882 leaf supporting-interface {
884 path "/org-openroadm-device/interface/name";
887 uses supporting-port-name;
893 "Grouping of attributes related to a port object.";
898 "Identifier for a port, unique within a circuit pack";
903 "Type of the pluggable or fixed port.";
907 enum "roadm-internal" {
910 enum "roadm-external" {
913 enum "xpdr-network" {
924 leaf port-wavelength-type {
925 type org-openroadm-port-types:port-wavelength-types;
928 "Type of port - single, multiple-wavelength, etc.";
930 leaf port-direction {
931 type org-openroadm-common-types:direction;
935 "Whether port is uni (tx/rx) or bi-directional and";
948 "circuit identifier/user label,
949 can be used in alarm correlation and/or connection management ";
952 leaf administrative-state {
953 type org-openroadm-equipment-states-types:admin-states;
955 "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.";
956 default "outOfService";
958 leaf operational-state {
959 type org-openroadm-common-types:state;
963 "Operational state of a port";
965 leaf-list supported-interface-capability {
967 "Interface types supported on this port";
970 base org-openroadm-port-types:supported-if-capability;
973 leaf logical-connection-point {
976 "delete or replace with list logical-ports or connections?";
978 container partner-port {
981 "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.";
984 container parent-port {
987 "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.";
993 "List of the interfaces this port supports. This is a list of names of instances in the flat instance list";
998 uses org-openroadm-device-container;
1000 grouping org-openroadm-device-container {
1001 container org-openroadm-device {
1007 "Max. number of degrees supported by device";
1013 "Max. number of SRGs in an add/drop group";
1019 "Stores a list of users";
1020 uses org-openroadm-user-mgmt:user-profile;
1022 container pending-sw {
1024 uses org-openroadm-swdl:sw-bank;
1028 uses interfaces-grp;
1029 container protocols {
1031 "Contains the supported protocols";
1033 container wavelength-map {
1035 "The wavelength-number and center frequency, wavelength mapping";
1037 uses org-openroadm-wavelength-map:wavelength-map-g;
1039 uses internal-links;
1040 uses physical-links;
1041 uses external-links;
1043 when "/org-openroadm-device/info/node-type='rdm'";
1044 key "degree-number";
1047 list shared-risk-group {
1048 when "/org-openroadm-device/info/node-type='rdm'";
1052 list roadm-connections {
1053 when "/org-openroadm-device/info/node-type='rdm'";
1054 key "connection-number";
1057 list connection-map {
1058 key "connection-map-number";
1060 leaf connection-map-number {
1062 "Unique identifier for this connection-map entry";
1066 leaf circuit-pack-name {
1068 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1074 "Port identifier. Unique within the context of a circuit-pack.";
1076 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1082 key "circuit-pack-name port-name";
1084 leaf circuit-pack-name {
1086 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1092 "Port identifier. Unique within the context of a circuit-pack.";
1094 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1103 grouping common-session-parms {
1105 "Common session parameters to identify a
1106 management session.";
1112 "Name of the user for the session.";
1116 type ietf-nc:session-id-or-zero-type;
1119 "Identifier of the session.
1120 A NETCONF session MUST be identified by a non-zero value.
1121 A non-NETCONF session MAY be identified by the value zero.";
1125 type ietf-inet-types:ip-address;
1127 "Address of the remote host for the session.";
1130 grouping changed-by-parms {
1132 "Common parameters to identify the source
1133 of a change event, such as a configuration
1134 or capability change.";
1136 container changed-by {
1138 "Indicates the source of the change.
1139 If caused by internal action, then the
1140 empty leaf 'server' will be present.
1141 If caused by a management session, then
1142 the name, remote host address, and session ID
1143 of the session that made the change will be reported.";
1144 choice server-or-user {
1148 "If present, the change was caused
1153 uses common-session-parms;
1155 } // choice server-or-user
1156 } // container changed-by-parms
1158 notification change-notification {
1160 "The Notification that a resource has been added, modified or removed.
1161 This notification can be triggered by changes in configuration and operational data.
1162 It shall contain the changed field pointed by the xpath.
1163 Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
1166 description "The time the change occurs.";
1167 type ietf-yang-types:date-and-time;
1169 uses changed-by-parms;
1174 description "The <running> datastore has changed.";
1177 description "The <startup> datastore has changed";
1182 "Indicates which configuration datastore has changed.";
1186 "An edit (change) record SHOULD be present for each distinct
1187 edit operation that the server has detected on
1188 the target datastore. This list MAY be omitted
1189 if the detailed edit operations are not known.
1190 The server MAY report entries in this list for
1191 changes not made by a NETCONF session.";
1194 type instance-identifier;
1196 "Topmost node associated with the configuration or operationa change.
1197 A server SHOULD set this object to the node within
1198 the datastore that is being altered. A server MAY
1199 set this object to one of the ancestors of the actual
1200 node that was changed, or omit this object, if the
1201 exact node is not known.";
1204 type ietf-nc:edit-operation-type;
1206 "Type of edit operation performed.
1207 A server MUST set this object to the NETCONF edit
1208 operation performed on the target datastore.";
1211 } // notification change-notification