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;
23 revision-date 2016-10-14;
25 import org-openroadm-physical-types {
26 prefix org-openroadm-physical-types;
28 import org-openroadm-user-mgmt {
29 prefix org-openroadm-user-mgmt;
31 import org-openroadm-port-types {
32 prefix org-openroadm-port-types;
34 import org-openroadm-interfaces {
35 prefix org-openroadm-interfaces;
37 import org-openroadm-swdl {
38 prefix org-openroadm-swdl;
40 import org-openroadm-equipment-states-types {
41 prefix org-openroadm-equipment-states-types;
44 organization "Open ROADM MSA";
48 "YANG definitions of ROADM device
50 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
51 AT&T Intellectual Property. All other rights reserved.
53 Redistribution and use in source and binary forms, with or without modification,
54 are permitted provided that the following conditions are met:
56 * Redistributions of source code must retain the above copyright notice, this
57 list of conditions and the following disclaimer.
58 * Redistributions in binary form must reproduce the above copyright notice,
59 this list of conditions and the following disclaimer in the documentation and/or
60 other materials provided with the distribution.
61 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
62 contributors may be used to endorse or promote products derived from this software
63 without specific prior written permission.
65 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
66 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
67 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
68 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
69 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
70 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
71 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
72 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
73 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
74 POSSIBILITY OF SUCH DAMAGE.
76 Also contains code components extracted from IETF netconf. These code components
77 are copyrighted and licensed as follows:
79 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
82 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
83 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
84 publication of this document. Please review these documents carefully, as they
85 describe your rights and restrictions with respect to this document. Code Components
86 extracted from this document must include Simplified BSD License text as described in
87 Section 4.e of the Trust Legal Provisions and are provided without warranty as
88 described in the Simplified BSD License.";
92 "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc";
100 rpc get-connection-port-trail {
102 leaf connection-number {
108 uses org-openroadm-common-types:rpc-response-status;
110 uses org-openroadm-common-types:physical-location;
112 refine "circuit-pack-name" {
122 rpc disable-automatic-shutoff {
126 path "/org-openroadm-device/shelves/shelf-name";
130 "The shelf where amp is located";
144 uses org-openroadm-common-types:rpc-response-status;
153 leaf port-direction {
154 type org-openroadm-common-types:direction;
164 uses org-openroadm-common-types:rpc-response-status;
168 notification otdr-scan-result {
180 "Completed or Failed for the scan's final status";
187 rpc set-current-datetime {
189 "Set the info/current-datetime leaf to the specified value.";
191 leaf current-datetime {
192 type ietf-yang-types:date-and-time;
195 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
200 uses org-openroadm-common-types:rpc-response-status;
204 grouping device-common {
208 "Globally unique identifer for a device.";
214 "Number assigned to a ROADM node at a
218 type org-openroadm-common-types:node-types;
220 "Identifier for node-type e.g Roadm, xponder";
227 "Common Language Location Identifier.";
229 uses org-openroadm-physical-types:node-info;
231 type ietf-inet-types:ip-address;
233 "IP Address of device";
240 "The length of the subnet prefix";
242 leaf defaultGateway {
243 type ietf-inet-types:ip-address;
258 leaf current-ipAddress {
259 type ietf-inet-types:ip-address;
262 "Current IP Address of device";
264 leaf current-prefix-length {
270 "The current length of the subnet prefix";
272 leaf current-defaultGateway {
273 type ietf-inet-types:ip-address;
276 "Current Default Gateway";
279 type ietf-yang-types:mac-address;
281 "MAC Address of device";
284 leaf softwareVersion {
293 "Template information used in the deployment.";
295 leaf current-datetime {
296 type ietf-yang-types:date-and-time;
299 "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
301 container geoLocation {
310 "[From wikipedia] Latitude is an angle (defined below)
311 which ranges from 0° at the Equator to 90° (North or
312 South) at the poles";
320 "[From wikipedia] The longitude is measured as the
321 angle east or west from the Prime Meridian, ranging
322 from 0° at the Prime Meridian to +180° eastward and
330 "slots information. To be populated by NE during retrieval.";
334 "The name of this slot.";
341 leaf provisioned-circuit-pack {
343 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
346 "The supported circuit-pack. It will be empty if no provision on this slot.";
358 "Unique identifier for this shelf within a device";
363 "The shelf type: describe the shelf with a unique string.";
369 "Reflect the shelf physical location data including floor, aisle, bay values.";
372 leaf shelf-position {
374 "Reflect the shelf vertical position within an equipment bay.";
377 leaf administrative-state {
379 "Admin State of the shelf";
380 type org-openroadm-equipment-states-types:admin-states;
382 uses org-openroadm-physical-types:common-info;
383 leaf equipment-state {
384 type org-openroadm-equipment-states-types:states;
386 "equipment state for the shelf, used to track the lifecycle state.";
389 type ietf-yang-types:date-and-time;
391 "due date for the shelf.";
395 "List of slots on this shelf. To be populated by NE during retrieval.";
402 grouping circuit-packs {
405 "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
406 key "circuit-pack-name";
407 leaf circuit-pack-type {
409 "Type of circuit-pack";
413 leaf circuit-pack-product-code {
415 "Product Code for the circuit-pack";
422 grouping circuit-pack {
423 leaf circuit-pack-name {
425 "Unique identifier for this circuit-pack within a device";
428 leaf administrative-state {
430 "Administrative state of circuit-pack";
431 type org-openroadm-equipment-states-types:admin-states;
433 uses org-openroadm-physical-types:common-info;
434 container circuit-pack-category {
436 "General type of circuit-pack";
437 uses org-openroadm-common-types:equipment-type;
440 leaf equipment-state {
442 "Equipment state, which complements operational state.";
443 type org-openroadm-equipment-states-types:states;
445 leaf circuit-pack-mode {
447 "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
453 path "/org-openroadm-device/shelves/shelf-name";
466 type ietf-yang-types:date-and-time;
468 "due date for this circuit-pack.";
470 container parent-circuit-pack {
472 "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.";
473 uses circuit-pack-name;
477 "Slot name on parent-circuit-pack.";
482 "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
490 "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.";
492 container roadm-port {
493 when "../port-qual='roadm-external'";
494 uses org-openroadm-port-types:roadm-port;
496 container transponder-port {
497 when "../port-qual='xpdr-network' or ../port-qual='xpdr-client'";
498 uses org-openroadm-port-types:common-port;
500 container otdr-port {
501 when "../port-qual='otdr'";
503 "Settings for otdr port.";
504 leaf launch-cable-length {
509 leaf port-direction {
510 type org-openroadm-common-types:direction;
516 grouping connection {
518 "Grouping used to define connections.";
519 leaf connection-number {
522 leaf wavelength-number {
526 "wavelength-number, can be used to access wavelength-map
527 to get wavelength value in nm.";
529 leaf opticalControlMode {
531 "Whether connection is currently in power or gain/loss mode";
532 type org-openroadm-common-types:optical-control-mode;
533 reference "openroadm.org: Open ROADM MSA Specification.";
536 leaf target-output-power {
537 type org-openroadm-common-types:power-dBm;
539 "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
544 path "/org-openroadm-device/interface/name";
549 container destination {
552 path "/org-openroadm-device/interface/name";
562 must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
563 error-message "Degree not supported by device ";
565 "Validating if the degree is supported by device";
568 leaf max-wavelengths {
571 "maximum number of wavelengths";
578 "list for Cards associated with a degree";
582 uses circuit-pack-name {
583 refine "circuit-pack-name" {
588 list connection-ports {
590 "Port associated with degree: One if bi-directional; two if uni-directional";
596 refine "circuit-pack-name" {
604 container otdr-port {
606 "otdr port associated with degree.";
611 grouping external-links {
613 "YANG definitions for external links..
614 - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed maually.";
616 key "external-link-name";
621 grouping external-link {
622 leaf external-link-name {
626 uses org-openroadm-resource-types:device-id {
631 uses org-openroadm-resource-types:port-name {
632 refine "circuit-pack-name" {
640 container destination {
641 uses org-openroadm-resource-types:device-id {
646 uses org-openroadm-resource-types:port-name {
647 refine "circuit-pack-name" {
657 grouping internal-links {
659 key "internal-link-name";
665 grouping internal-link {
666 leaf internal-link-name {
671 refine "circuit-pack-name" {
679 container destination {
681 refine "circuit-pack-name" {
691 grouping physical-links {
693 "YANG definitions for physical links.
694 - phyical links between cards within a ROADM, which are populated by the ROADM and cannot be added or removed manually. ";
696 key "physical-link-name";
701 grouping physical-link {
702 leaf physical-link-name {
707 refine "circuit-pack-name" {
715 container destination {
717 refine "circuit-pack-name" {
728 leaf max-add-drop-ports {
735 must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
736 error-message "invalid SRG";
738 "Validating if the srg is supported by add/drop group";
741 leaf wavelengthDuplication {
743 "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
749 "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.";
752 enum "onePerDegree" {
754 "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.";
762 "list for Cards associated with an add/drop group and srg";
766 uses circuit-pack-name {
767 refine "circuit-pack-name" {
774 grouping degree-number {
777 "Degree identifier. Unique within the context of a device.";
779 path "/org-openroadm-device/degree/degree-number";
784 grouping circuit-pack-name {
785 leaf circuit-pack-name {
787 "Circuit-Pack identifier. Unique within the context of a device.";
789 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
795 uses circuit-pack-name;
798 "Port identifier. Unique within the context of a circuit-pack.";
800 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
805 grouping srg-number {
808 "Shared Risk Group identifier. Unique within the context of a device.";
810 path "/org-openroadm-device/shared-risk-group/srg-number";
815 grouping supporting-port-name {
816 leaf supporting-circuit-pack-name {
818 "Identifier of the supporting circuit-pack.";
820 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
824 leaf supporting-port {
826 "Identifier of the supporting port.";
829 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
834 grouping interface-name {
835 leaf interface-name {
837 "Name of an interface. Unique within the context of a device.";
839 path "/org-openroadm-device/interface/name";
845 grouping interfaces-grp {
847 "OpenROADM Interface configuration parameters.";
851 "The list of configured interfaces on the device.";
855 "The name of the interface.";
860 "A textual description of the interface.";
864 base org-openroadm-interfaces:interface-type;
868 "The type of the interface.";
870 leaf administrative-state {
871 type org-openroadm-equipment-states-types:admin-states;
873 leaf operational-state {
874 type org-openroadm-common-types:state;
882 "circuit identifier/user label,
883 can be used in alarm correlation and/or connection management ";
885 leaf supporting-interface {
887 path "/org-openroadm-device/interface/name";
890 uses supporting-port-name;
896 "Grouping of attributes related to a port object.";
901 "Identifier for a port, unique within a circuit pack";
906 "Type of the pluggable or fixed port.";
910 enum "roadm-internal" {
913 enum "roadm-external" {
916 enum "xpdr-network" {
927 leaf port-wavelength-type {
928 type org-openroadm-port-types:port-wavelength-types;
931 "Type of port - single, multiple-wavelength, etc.";
933 leaf port-direction {
934 type org-openroadm-common-types:direction;
938 "Whether port is uni (tx/rx) or bi-directional and";
951 "circuit identifier/user label,
952 can be used in alarm correlation and/or connection management ";
955 leaf administrative-state {
956 type org-openroadm-equipment-states-types:admin-states;
958 "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.";
959 default "outOfService";
961 leaf operational-state {
962 type org-openroadm-common-types:state;
966 "Operational state of a port";
968 leaf-list supported-interface-capability {
970 "Interface types supported on this port";
973 base org-openroadm-port-types:supported-if-capability;
976 leaf logical-connection-point {
979 "delete or replace with list logical-ports or connections?";
981 container partner-port {
984 "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.";
987 container parent-port {
990 "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.";
996 "List of the interfaces this port supports. This is a list of names of instances in the flat instance list";
1001 uses org-openroadm-device-container;
1003 grouping org-openroadm-device-container {
1004 container org-openroadm-device {
1010 "Max. number of degrees supported by device";
1016 "Max. number of SRGs in an add/drop group";
1022 "Stores a list of users";
1023 uses org-openroadm-user-mgmt:user-profile;
1025 container pending-sw {
1027 uses org-openroadm-swdl:sw-bank;
1031 uses interfaces-grp;
1032 container protocols {
1034 "Contains the supported protocols";
1036 container wavelength-map {
1038 "The wavelength-number and center frequency, wavelength mapping";
1040 uses org-openroadm-wavelength-map:wavelength-map-g;
1042 uses internal-links;
1043 uses physical-links;
1044 uses external-links;
1046 when "/org-openroadm-device/info/node-type='rdm'";
1047 key "degree-number";
1050 list shared-risk-group {
1051 when "/org-openroadm-device/info/node-type='rdm'";
1055 list roadm-connections {
1056 when "/org-openroadm-device/info/node-type='rdm'";
1057 key "connection-number";
1060 list connection-map {
1061 key "connection-map-number";
1063 leaf connection-map-number {
1065 "Unique identifier for this connection-map entry";
1069 leaf circuit-pack-name {
1071 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1077 "Port identifier. Unique within the context of a circuit-pack.";
1079 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1085 key "circuit-pack-name port-name";
1087 leaf circuit-pack-name {
1089 path "/org-openroadm-device/circuit-packs/circuit-pack-name";
1095 "Port identifier. Unique within the context of a circuit-pack.";
1097 path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
1106 grouping common-session-parms {
1108 "Common session parameters to identify a
1109 management session.";
1115 "Name of the user for the session.";
1119 type ietf-nc:session-id-or-zero-type;
1122 "Identifier of the session.
1123 A NETCONF session MUST be identified by a non-zero value.
1124 A non-NETCONF session MAY be identified by the value zero.";
1128 type ietf-inet-types:ip-address;
1130 "Address of the remote host for the session.";
1133 grouping changed-by-parms {
1135 "Common parameters to identify the source
1136 of a change event, such as a configuration
1137 or capability change.";
1139 container changed-by {
1141 "Indicates the source of the change.
1142 If caused by internal action, then the
1143 empty leaf 'server' will be present.
1144 If caused by a management session, then
1145 the name, remote host address, and session ID
1146 of the session that made the change will be reported.";
1147 choice server-or-user {
1151 "If present, the change was caused
1156 uses common-session-parms;
1158 } // choice server-or-user
1159 } // container changed-by-parms
1161 notification change-notification {
1163 "The Notification that a resource has been added, modified or removed.
1164 This notification can be triggered by changes in configuration and operational data.
1165 It shall contain the changed field pointed by the xpath.
1166 Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
1169 description "The time the change occurs.";
1170 type ietf-yang-types:date-and-time;
1172 uses changed-by-parms;
1177 description "The <running> datastore has changed.";
1180 description "The <startup> datastore has changed";
1185 "Indicates which configuration datastore has changed.";
1189 "An edit (change) record SHOULD be present for each distinct
1190 edit operation that the server has detected on
1191 the target datastore. This list MAY be omitted
1192 if the detailed edit operations are not known.
1193 The server MAY report entries in this list for
1194 changes not made by a NETCONF session.";
1197 type instance-identifier;
1199 "Topmost node associated with the configuration or operationa change.
1200 A server SHOULD set this object to the node within
1201 the datastore that is being altered. A server MAY
1202 set this object to one of the ancestors of the actual
1203 node that was changed, or omit this object, if the
1204 exact node is not known.";
1207 type ietf-nc:edit-operation-type;
1209 "Type of edit operation performed.
1210 A server MUST set this object to the NETCONF edit
1211 operation performed on the target datastore.";
1214 } // notification change-notification