Add OpenROADM 7.1.0 device and common models 31/92431/23
authorBalagangadhar Bathula <bb4341@att.com>
Thu, 10 Sep 2020 03:05:30 +0000 (23:05 -0400)
committerguillaume.lambert <guillaume.lambert@orange.com>
Fri, 20 Nov 2020 09:59:50 +0000 (10:59 +0100)
- add OpenROADM device and common models version 7.1.0
  (previous models 1.2.1 and 2.2.1 are kept)
- keep only essential OpenConfig models used by OpenROADM
- add a NOTICE and an openconfig.LICENSE files in the jar ressources

OpenConfig YANG models are published under the Apache License version 2
a.k.a. ALv2 but they do not precise it in their description.
Though Alv2 allows redistribution under other licenses, it includes a
redistribution clause (4) that instructs to give any other recipients
of the work or the derivative works a copy of the original license.

JIRA: TRNSPRTPCE-225
Change-Id: Idebe4e20f0cb0554dd572c4c667d692c8a6dfcb5
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
71 files changed:
ordmodels/common/src/main/yang/org-openroadm-alarm@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-alarm-pm-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-attributes@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-link-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-node-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-state-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-common-types@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-interfaces@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-layerRate@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-manifest-file@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-network-resource@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-pm-types@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-pm@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-port-types@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-probable-cause@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-resource-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-resource@2020-05-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-service-format@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-tca@2020-03-27.yang [new file with mode: 0644]
ordmodels/common/src/main/yang/org-openroadm-user-mgmt@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/resources/NOTICE [new file with mode: 0644]
ordmodels/device/src/main/resources/openconfig.LICENSE [new file with mode: 0644]
ordmodels/device/src/main/yang/openconfig-extensions@2017-04-11.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/openconfig-telemetry-types@2017-08-24.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-database@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-de-operations@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-device-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-device@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-dhcp@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ethernet-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-file-transfer@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-fwdl@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-gcc-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-gnmi@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ip@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ipv4-unicast-routing@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ipv6-unicast-routing@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-key-chain@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-lldp@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-maintenance-loopback@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-maintenance-testsignal@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-media-channel-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-network-media-channel-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-optical-channel-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-optical-operational-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-optical-transport-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-optical-tributary-signal-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ospf@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-otn-common@2020-03-27.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-otn-odu-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-otn-otu-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-otsi-group-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-physical-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-pluggable-optics-holder-capability@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-port-capability@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-ppp-interfaces@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-prot-otn-linear-aps@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-routing@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-rstp@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-security@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-swdl@2020-05-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-syslog@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-telemetry-types@2019-11-29.yang [new file with mode: 0644]
ordmodels/device/src/main/yang/org-openroadm-wavelength-map@2019-11-29.yang [new file with mode: 0644]
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/RendererServiceOperationsImpl.java

diff --git a/ordmodels/common/src/main/yang/org-openroadm-alarm@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-alarm@2020-05-29.yang
new file mode 100644 (file)
index 0000000..57cdc61
--- /dev/null
@@ -0,0 +1,190 @@
+module org-openroadm-alarm {
+  namespace "http://org/openroadm/alarm";
+  prefix org-openroadm-alarm;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-resource {
+    prefix org-openroadm-resource;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-probable-cause {
+    prefix org-openroadm-probable-cause;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of an alarm.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef severity {
+    type enumeration {
+      enum critical {
+        value 1;
+      }
+      enum major {
+        value 2;
+      }
+      enum minor {
+        value 3;
+      }
+      enum warning {
+        value 4;
+      }
+      enum clear {
+        value 5;
+      }
+      enum indeterminate {
+        value 6;
+      }
+    }
+    description
+      "Severity, based on X.733 perceived severity";
+  }
+
+  grouping alarm {
+    leaf id {
+      type string;
+      mandatory true;
+      description
+        "Uniquely id for this alarm, within the given management domain";
+    }
+    container resource {
+      description
+        "Resource under alarm";
+      uses org-openroadm-resource:resource;
+    }
+    container probableCause {
+      description
+        "Probable cause of alarm";
+      uses org-openroadm-probable-cause:probable-cause;
+    }
+    leaf raiseTime {
+      type yang:date-and-time;
+      mandatory true;
+      description
+        "Time alarm was raised";
+    }
+    leaf severity {
+      type severity;
+      mandatory true;
+      description
+        "Severity of alarm. Based on X.733 perceived severity.";
+    }
+    leaf circuit-id {
+      type string;
+      description
+        "Circuit-id for alarm correlation.";
+    }
+    leaf additional-detail {
+      type string;
+      description
+        "Provide additional descriptive text about the probable cause.";
+    }
+    leaf corrective-action {
+      type string;
+      description
+        "Provide recommended corrective actions for this probable cause, i.e. replace or restart a circuit pack, check wiring for the reported source, or secondary failure to be correlated ";
+    }
+  }
+
+  notification alarm-notification {
+    description
+      "Notification sent on initial alarm creation, as well as any time the alarm changes state, including clear";
+    uses alarm;
+  }
+
+  container active-alarm-list {
+    config false;
+    description
+      "List of currently active alarms. An alarm is removed from this table when the state transitions to clear.";
+    list activeAlarms {
+      key "id";
+      uses alarm;
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-alarm-pm-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-alarm-pm-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..d13b85b
--- /dev/null
@@ -0,0 +1,81 @@
+module org-openroadm-common-alarm-pm-types {
+  namespace "http://org/openroadm/common-alarm-pm-types";
+  prefix org-openroadm-common-alarm-pm-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common alarm and pm types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef direction {
+    type enumeration {
+      enum tx {
+        value 1;
+      }
+      enum rx {
+        value 2;
+      }
+      enum bidirectional {
+        value 3;
+      }
+      enum notApplicable {
+        value 4;
+      }
+    }
+  }
+
+  typedef location {
+    type enumeration {
+      enum notApplicable {
+        value 1;
+      }
+      enum nearEnd {
+        value 2;
+      }
+      enum farEnd {
+        value 3;
+      }
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-amplifier-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..d5500a1
--- /dev/null
@@ -0,0 +1,99 @@
+module org-openroadm-common-amplifier-types {
+  namespace "http://org/openroadm/common-amplifier-types";
+  prefix org-openroadm-common-amplifier-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef amplifier-types {
+    type enumeration {
+      enum standard {
+        value 1;
+      }
+    }
+    description
+      "identifier for amplifier type
+       1. standard for amplifier as defined initially in the ROADM MSA specifications
+       To be completed if/when additional amplifier types are required ";
+  }
+
+  typedef line-amplifier-control-mode {
+    type enumeration {
+      enum gainLoss {
+        value 2;
+      }
+      enum off {
+        value 3;
+      }
+    }
+    description
+      "Identifies the line amplifier control mode, either off or gain.";
+  }
+
+  typedef amplifier-gain-range {
+    type enumeration {
+      enum gain-range-1 {
+        value 1;
+      }
+      enum gain-range-2 {
+        value 2;
+      }
+      enum gain-range-3 {
+        value 3;
+      }
+      enum gain-range-4 {
+        value 4;
+      }
+    }
+    description
+      "Operational mode for the amplifier:
+       this parameter allows modeling different operational modes (gain ranges) ,notably for switched-gain amplifiers.
+       It indicates which performance model shall be used by the path feasibility engine.
+       For standard amplifier, or when performance evaluation is based on incremental noise, use gain-range-1.
+       When performance evaluation is based on advanced parameters, specify used gain-range (1 to 4).
+       Up to release 2.1, only gain-range-1 is to be used (default value) ";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-attributes@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-common-attributes@2020-03-27.yang
new file mode 100644 (file)
index 0000000..115271a
--- /dev/null
@@ -0,0 +1,188 @@
+module org-openroadm-common-attributes {
+  namespace "http://org/openroadm/common-attributes";
+  prefix org-openroadm-common-attributes;
+
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common attributes.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+
+  grouping parent-odu-allocation {
+    description
+      "parent odu allocation group";
+    container parent-odu-allocation {
+      presence "Explicit assignment of parent ODU trib-slot and trib-port allocation. ";
+      description
+        "parent odu allocation";
+      leaf trib-port-number {
+        type uint16 {
+          range "1 .. 80";
+        }
+        mandatory true;
+        description
+          "Assigned tributary port number in parent OPU";
+      }
+      choice trib-slots-choice {
+        description
+          "trib slot selection";
+        case opu {
+          leaf-list trib-slots {
+            type uint16 {
+              range "1 .. 80";
+            }
+            min-elements 1;
+            max-elements 80;
+            description
+              "Assigned trib slots occupied in parent OPU MSI";
+          }
+        }
+        case opucn {
+          leaf-list opucn-trib-slots {
+            type org-openroadm-otn-common-types:opucn-trib-slot-def;
+            description
+              "Specify the list of OPUCn 5G tributary slots in the form of
+               TS #A.B (G.709 Figure 20-9) in the case of provisioning the low
+                order ODUk to the parent server ODUCn";
+          }
+        }
+      }
+    }
+  }
+
+  grouping deg-threshold {
+    description
+      "Deg threshold grouping";
+    leaf degm-intervals {
+      type uint8 {
+        range "2 .. 10";
+      }
+      default "2";
+      description
+        "G.806 - Consecutive bad intervals required for declare dDEG";
+    }
+    leaf degthr-percentage {
+      type uint16 {
+        range "1 .. 10000";
+      }
+      default "100";
+      description
+        "Percentage of errored blocks required to declare an interval bad, in units of 0.01%";
+    }
+  }
+
+  grouping trail-trace-tx {
+    description
+      "Trail trace tx grouping";
+    leaf tx-sapi {
+      type string {
+        length "0 .. 15";
+      }
+      description
+        "The provisioned 15 character transmit trace SAPI. Implementations shall add the [0] field automatically per ITU-T G.709";
+    }
+    leaf tx-dapi {
+      type string {
+        length "0 .. 15";
+      }
+      description
+        "The provisioned 15 character transmit trace DAPI. Implementations shall add the [0] field automatically per ITU-T G.709";
+    }
+    leaf tx-operator {
+      type string {
+        length "0 .. 32";
+      }
+      description
+        "The provisioned 32 character Operator Specific field";
+    }
+  }
+
+  grouping trail-trace-other {
+    description
+      "Trail trace other grouping";
+    leaf expected-sapi {
+      type string {
+        length "0 .. 15";
+      }
+      description
+        "The provisioned expected SAPI, to be compared with accepted TTI";
+    }
+    leaf expected-dapi {
+      type string {
+        length "0 .. 15";
+      }
+      description
+        "The provisioned expected DAPI, to be compared with accepted TTI";
+    }
+    leaf tim-act-enabled {
+      type boolean;
+      default "false";
+      description
+        "Enables TTI Mismatch consequent actions.";
+    }
+    leaf tim-detect-mode {
+      type enumeration {
+        enum Disabled {
+          description
+            "TTI is ignored";
+        }
+        enum SAPI {
+          description
+            "Expected SAPI is compared to the Accepted TTI. Other TTI fields are ignored";
+        }
+        enum DAPI {
+          description
+            "Expected DAPI is compared to the Accepted TTI. Other TTI fields are ignored";
+        }
+        enum SAPI-and-DAPI {
+          description
+            "Expected SAPI and Expected DAPI are compared to the Accepted TTI. Operator specific TTI field is ignored";
+        }
+      }
+      default "Disabled";
+      description
+        "tim detect mode leaf";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-equipment-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..f5189c3
--- /dev/null
@@ -0,0 +1,102 @@
+module org-openroadm-common-equipment-types {
+  namespace "http://org/openroadm/common-equipment-types";
+  prefix org-openroadm-common-equipment-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef optic-types {
+    type enumeration {
+      enum gray {
+        value 1;
+      }
+      enum dwdm {
+        value 2;
+      }
+    }
+  }
+
+  typedef equipment-type-enum {
+    type enumeration {
+      enum other {
+        value 1;
+      }
+      enum powerSupply {
+        value 2;
+      }
+      enum shelfProcessor {
+        value 3;
+      }
+      enum crossConnect {
+        value 4;
+      }
+      enum fan {
+        value 5;
+      }
+      enum accessPanel {
+        value 6;
+      }
+      enum circuitPack {
+        value 7;
+      }
+    }
+  }
+
+  grouping equipment-type {
+    leaf type {
+      type equipment-type-enum;
+      config false;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      config false;
+      mandatory false;
+      description
+        "Populated with equipment type when enum value is set to 'other'";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-link-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-link-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..25bc8fb
--- /dev/null
@@ -0,0 +1,95 @@
+module org-openroadm-common-link-types {
+  namespace "http://org/openroadm/common-link-types";
+  prefix org-openroadm-common-link-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common link types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef power-dBm {
+    type decimal64 {
+      fraction-digits 2;
+    }
+    units "dBm";
+    description
+      "Power value in dBm.";
+  }
+
+  typedef ratio-dB {
+    type decimal64 {
+      fraction-digits 3;
+    }
+    units "dB";
+    description
+      "Power ratio in dB.";
+  }
+
+  typedef fiber-pmd {
+    type decimal64 {
+      fraction-digits 2;
+    }
+    units "ps/(km[1/2])";
+    description
+      "Polarization Mode Dispersion expressed in ps/km(1/2).";
+  }
+
+  typedef optical-control-mode {
+    type enumeration {
+      enum power {
+        value 1;
+      }
+      enum gainLoss {
+        value 2;
+      }
+      enum off {
+        value 3;
+      }
+    }
+    description
+      "Optical Control Mode: identifies specific algorithm related to power management and general optical control.";
+    reference
+      "openroadm.org: Open ROADM MSA Specification.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-node-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-node-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..d8a914b
--- /dev/null
@@ -0,0 +1,69 @@
+module org-openroadm-common-node-types {
+  namespace "http://org/openroadm/common-node-types";
+  prefix org-openroadm-common-node-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common node types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef node-id-type {
+    type string {
+      length "7..63";
+      pattern '([a-zA-Z][a-zA-Z0-9-]{5,61}[a-zA-Z0-9])' {
+        error-message
+          "A node-id must be 7 to 63 characters in length.
+           A node-id can contain letters, numbers, and hyphens.
+           The first character must be a letter.
+           The last character must be a letter or number.";
+      }
+    }
+    description
+      "Globally unique identifier for a device.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-optical-channel-types@2020-05-29.yang
new file mode 100644 (file)
index 0000000..3fc027b
--- /dev/null
@@ -0,0 +1,297 @@
+module org-openroadm-common-optical-channel-types {
+  namespace "http://org/openroadm/common-optical-channel-types";
+  prefix org-openroadm-common-optical-channel-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common optical channel types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  identity optical-rate-identity {
+    description
+      "base for otsi and och idenity";
+  }
+
+  identity och-rate-identity {
+    base optical-rate-identity;
+    description
+      "A unique och rate identification";
+  }
+
+  identity otsi-rate-identity {
+    base optical-rate-identity;
+    description
+      "A unique OTSi rate identification";
+  }
+
+  identity foic-identity {
+    description
+      "A unique FOICx.k identification (G.709.3 FlexO-LR and
+       G.709.1 FlexO-SR)";
+  }
+
+  identity foic1.2 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity foic1.4 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1 and G.709.3";
+  }
+
+  identity foic2.4 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1";
+  }
+
+  identity foic2.8 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity foic3.6 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in future";
+  }
+
+  identity foic4.8 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.709.1";
+  }
+
+  identity foic4.16 {
+    base foic-identity;
+    description
+      "Applicable to the FlexO type defined in G.Sup58";
+  }
+
+  identity R400G-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R300G-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R200G-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R200G {
+    base och-rate-identity;
+    description
+      "Identity for 200G Rate";
+  }
+
+  identity R100G-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R100G {
+    base och-rate-identity;
+    description
+      "Identity for 100G Rate";
+  }
+
+  identity R56G-foic-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R28G-foic-otsi {
+    base otsi-rate-identity;
+    description
+      "Applicable instance for otsi rate identity";
+  }
+
+  identity R10.7G {
+    base och-rate-identity;
+    description
+      "Identity for 10.7G Rate";
+  }
+
+  identity R11.1G {
+    base och-rate-identity;
+    description
+      "Identity for 11.1G Rate";
+  }
+
+  typedef frequency-THz {
+    type decimal64 {
+      fraction-digits 8;
+    }
+    units "THz";
+    description
+      "Frequency value in THz.";
+  }
+
+  typedef frequency-GHz {
+    type decimal64 {
+      fraction-digits 5;
+    }
+    units "GHz";
+    description
+      "Frequency value in GHz.";
+  }
+
+  typedef wavelength-duplication-type {
+    type enumeration {
+      enum one-per-srg {
+        value 1;
+        description
+          "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.";
+      }
+      enum one-per-degree {
+        value 2;
+        description
+          "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.";
+      }
+    }
+    description
+      "One per srg is applied to C/D add/drop group
+       one per degree is applied to C/D/C add drop group";
+  }
+
+  typedef modulation-format {
+    type enumeration {
+      enum bpsk {
+        value 0;
+        description
+          "binary phase-shift keying";
+      }
+      enum dc-dp-bpsk {
+        value 1;
+        description
+          "DC dual-polarization binary phase-shift keying";
+      }
+      enum qpsk {
+        value 2;
+        description
+          "quadrature phase-shift keying";
+      }
+      enum dp-qpsk {
+        value 3;
+        description
+          "dual-polarization binary phase-shift keying";
+      }
+      enum qam16 {
+        value 4;
+        description
+          "quadrature amplitude modulation 16";
+      }
+      enum dp-qam16 {
+        value 5;
+        description
+          "dual-polarization quadrature amplitude modulation 16";
+      }
+      enum dc-dp-qam16 {
+        value 6;
+        description
+          "DC dual-polarization quadrature amplitude modulation 16";
+      }
+      enum qam8 {
+        value 7;
+        description
+          "quadrature amplitude modulation 8";
+      }
+      enum dp-qam8 {
+        value 8;
+        description
+          "dual-polarization quadrature amplitude modulation 8";
+      }
+      enum dc-dp-qam8 {
+        value 9;
+        description
+          "DC dual-polarization quadrature amplitude modulation 8";
+      }
+    }
+    description
+      "Modulation format";
+  }
+
+  typedef provision-mode-type {
+    type enumeration {
+      enum explicit;
+      enum profile;
+    }
+    description
+      "Provision Mode Type On Optical Channel";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-state-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-state-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..901a013
--- /dev/null
@@ -0,0 +1,113 @@
+module org-openroadm-common-state-types {
+  namespace "http://org/openroadm/common-state-types";
+  prefix org-openroadm-common-state-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef lifecycle-state {
+    type enumeration {
+      enum deployed {
+        value 1;
+      }
+      enum planned {
+        value 2;
+      }
+      enum maintenance {
+        value 3;
+      }
+      enum deploying {
+        value 4;
+      }
+      enum undeploying {
+        value 5;
+      }
+      enum undeployed {
+        value 6;
+      }
+      enum proposed {
+        value 7;
+      }
+      enum draft {
+        value 8;
+      }
+      enum deploy-failed {
+        value 9;
+      }
+      enum undeploy-failed {
+        value 10;
+      }
+      enum deployed-augmented {
+        value 11;
+      }
+      enum deployed-updating {
+        value 12;
+      }
+    }
+    description
+      "Lifecycle state.";
+  }
+
+  typedef state {
+    type enumeration {
+      enum inService {
+        value 1;
+      }
+      enum outOfService {
+        value 2;
+      }
+      enum degraded {
+        value 3;
+      }
+    }
+    description
+      "State that indicates whether the resource is able to provide fulfill its role - carry traffic, etc.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-common-types@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-common-types@2020-05-29.yang
new file mode 100644 (file)
index 0000000..e35b454
--- /dev/null
@@ -0,0 +1,427 @@
+module org-openroadm-common-types {
+  namespace "http://org/openroadm/common-types";
+  prefix org-openroadm-common-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef activate-notification-type {
+    type enumeration {
+      enum activate {
+        value 1;
+        description
+          "software or database activation";
+      }
+      enum commit {
+        value 2;
+        description
+          "commit the software or database.
+           For software activate, this event can happen in the following scenarios:
+             1) immediately when user issue sw-activate command without validationTimer
+                or if the validationTimer is specified as 00-00-00;
+             2) when user issue cancel-validation-timer before it expires and with accept=true.
+           For database activate, this event can occur in the following scenarios:
+             1) immediately when user issue db-activate command without rollBackTimer
+                or if the rollBackTimer is specified as 00-00-00;
+             2) when user issue cancel-rollback-timer before it expires and with accept=true.";
+      }
+      enum cancel {
+        value 3;
+        description
+          "cancel the database or software activation operation.
+           For software activate, this event can happen in the following cases:
+             1) when the validationTimer expires;
+             2) when the user issues cancel-validation-timer with accept=false.
+           For database activate, this event can happen in the following cases:
+             1) when the rollBackTimer expires;
+             2) when the user issues cancel-rollback-timer with accept=false.";
+      }
+    }
+    description
+      "Type of notification on software or database activation events";
+  }
+
+  typedef rpc-status {
+    type enumeration {
+      enum Successful {
+        value 1;
+      }
+      enum Failed {
+        value 2;
+      }
+    }
+    description
+      "status of RPC ";
+  }
+
+  typedef extended-rpc-status {
+    type enumeration {
+      enum Successful {
+        value 1;
+      }
+      enum Failed {
+        value 2;
+      }
+      enum In-progress {
+        value 3;
+      }
+    }
+    description
+      "status of RPC ";
+  }
+
+  typedef openroadm-version-type {
+    type enumeration {
+      enum 1.0 {
+        value 1;
+        description
+          "value for 1.0";
+      }
+      enum 2.0 {
+        value 2;
+        description
+          "value for 2.0";
+      }
+      enum 2.1 {
+        value 3;
+        description
+          "value for 2.1";
+      }
+      enum 2.2 {
+        value 4;
+        description
+          "value for 2.2";
+      }
+      enum 3.0 {
+        value 5;
+        description
+          "value for 3.0";
+      }
+      enum 3.1 {
+        value 6;
+        description
+          "value for 3.1";
+      }
+      enum 4.0 {
+        value 7;
+        description
+          "value for 4.0";
+      }
+      enum 2.2.1 {
+        value 8;
+        description
+          "value for 2.2.1";
+      }
+      enum 4.1 {
+        value 9;
+        description
+          "value for 4.1";
+      }
+      enum 3.1.1 {
+        value 10;
+        description
+          "value for 3.1.1";
+      }
+      enum 5.0 {
+        value 11;
+        description
+          "value for 5.0";
+      }
+      enum 5.1 {
+        value 12;
+        description
+          "value for 5.1";
+      }
+      enum 6.0 {
+        value 13;
+        description
+          "value for 6.0";
+      }
+      enum 6.1 {
+        value 14;
+        description
+          "value for 6.1";
+      }
+      enum 7.0 {
+        value 15;
+        description
+          "value for 7.0";
+      }
+      enum 7.1 {
+        value 16;
+        description
+          "value for 7.1";
+      }
+    }
+    description
+      "OpenROADM version enum type";
+  }
+
+  grouping rpc-response-status {
+    leaf status {
+      type rpc-status;
+      mandatory true;
+      description
+        "Successful or Failed";
+    }
+    leaf status-message {
+      type string;
+      description
+        "Gives a more detailed status";
+    }
+  }
+
+  grouping extended-rpc-response-status {
+    leaf status {
+      type extended-rpc-status;
+      mandatory true;
+      description
+        "Successful, Failed or In-progress";
+    }
+    leaf status-message {
+      type string;
+      description
+        "Gives a more detailed status.";
+    }
+  }
+
+  grouping eth-rate-and-burst-size {
+    description
+      "Grouping of ethernet committed rate and burst size.";
+    leaf committed-info-rate {
+      type uint32;
+      mandatory true;
+      description
+        "Committed Information Rate (CIR), unit in Mbps. For example, 1250 Mbps";
+    }
+    leaf committed-burst-size {
+      type uint16;
+      mandatory true;
+      description
+        "Committed Burst Size, unit in 1KB (K Byte).
+                Range 16 | 32 | 64 | 128 | 512 | 1024. Default: 16";
+    }
+  }
+
+  identity otn-protection-type {
+    description
+      "OTN base protection identity from which
+         specific protection types are derived.";
+  }
+
+  typedef tcm-direction-capability-type {
+    type enumeration {
+      enum up-tcm {
+        description
+          "Port supports up TCM termination, e.g., direction facing the switch fabric";
+      }
+      enum down-tcm {
+        description
+          "Port supports down TCM termination, e.g., direction facing out of the equipment ";
+      }
+      enum up-down-tcm {
+        description
+          "Port supports both up and down TCM terminations";
+      }
+    }
+    description
+      "TCM direction capability for the port";
+  }
+
+
+
+
+
+
+  //
+  // Identities for FEC -- used for Device and Service models
+  //
+
+  // Base Identity
+  identity fec-identity {
+    description
+      "A unique FEC identification";
+  }
+
+  // FEC Off (duplications for backwards compatibility)
+  identity off-fec {
+    status deprecated;
+    base fec-identity;
+    description
+      "FEC Off";
+  }
+  identity off {
+    base fec-identity;
+    description
+      "FEC Off";
+  }
+
+  // Staircase FEC (duplications for backwards compatibility)
+  identity sc-fec {
+    status deprecated;
+    base fec-identity;
+    description
+      "Staircase FEC identification";
+  }
+  identity scfec {
+    base fec-identity;
+    description
+      "Staircase FEC identification";
+  }
+
+  // Reed Solomon FEC (duplication for backwards compatibility)
+  identity rs-fec {
+    status deprecated;
+    base fec-identity;
+    description
+      "Reed Solomon FEC identification";
+  }
+  identity rsfec {
+    base fec-identity;
+    description
+      "Reed Solomon FEC identification";
+  }
+
+  // OpenROADM FEC (duplication for backwards compatibility)
+  identity o-fec {
+    status deprecated;
+    base fec-identity;
+    description
+      "OpenROADM FEC identification";
+  }
+  identity ofec {
+    base fec-identity;
+    description
+      "OpenROADM FEC identification";
+  }
+
+  // G.975.1 I.4
+  identity efec {
+    base fec-identity;
+    description
+      "G.975.1 I.4";
+  }
+
+  // G.975.1 I.7
+  identity ufec {
+    base fec-identity;
+    description
+      "G.975.1 I.7";
+  }
+
+  // Soft Decision FEC
+  identity sdfec {
+    base fec-identity;
+    description
+      "Soft Decision FEC";
+  }
+
+  // Clariphy SDFEC
+  identity sdfeca1 {
+    base fec-identity;
+    description
+      "Clariphy SDFEC";
+  }
+
+  // SDFEC with SCFED
+  identity sdfecb1 {
+    base fec-identity;
+    description
+      "SDFEC with SCFEC";
+  }
+
+
+  grouping fec-grouping {
+    leaf fec {
+      type identityref {
+        base org-openroadm-common-types:fec-identity;
+      }
+      description
+        "FEC / Forward Error Correction";
+    }
+  }
+
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-equipment-states-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..ccfca19
--- /dev/null
@@ -0,0 +1,147 @@
+module org-openroadm-equipment-states-types {
+  namespace "http://org/openroadm/equipment/states/types";
+  prefix org-openroadm-equipment-states-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for types of states of equipment (slot/subslot).
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef admin-states {
+    type enumeration {
+      enum inService {
+        value 1;
+      }
+      enum outOfService {
+        value 2;
+      }
+      enum maintenance {
+        value 3;
+      }
+    }
+  }
+
+  typedef states {
+    type enumeration {
+      enum reserved-for-facility-planned {
+        value 1;
+        description
+          "equipment is planned for use by a service";
+      }
+      enum not-reserved-planned {
+        value 2;
+        description
+          "equipment is planned by not reserved for any purpose";
+      }
+      enum reserved-for-maintenance-planned {
+        value 3;
+        description
+          "equipment is planned for use as a maintenance spare";
+      }
+      enum reserved-for-facility-unvalidated {
+        value 4;
+        description
+          "equipment is reserved for use by a service but not
+           validated against planned equipment";
+      }
+      enum not-reserved-unvalidated {
+        value 5;
+        description
+          "equipment is not reserved for any purpose and
+           not validated against planned equipment";
+      }
+      enum unknown-unvalidated {
+        value 6;
+        description
+          "unknown equipment not validated against planned equipment";
+      }
+      enum reserved-for-maintenance-unvalidated {
+        value 7;
+        description
+          "equipment is to be used for use as a maintenance spare
+           but not validated against planned equipment";
+      }
+      enum reserved-for-facility-available {
+        value 8;
+        description
+          "reserved for use by a service and available";
+      }
+      enum not-reserved-available {
+        value 9;
+        description
+          "not reserved for use by a service and available";
+      }
+      enum reserved-for-maintenance-available {
+        value 10;
+        description
+          "reserved as a maintenance spare and available";
+      }
+      enum reserved-for-reversion-inuse {
+        value 11;
+        description
+          "equipment that is reserved as part of a home path
+           for a service that has been temporarily re-routed";
+      }
+      enum not-reserved-inuse {
+        value 12;
+        description
+          "equipment in use for a service";
+      }
+      enum reserved-for-maintenance-inuse {
+        value 13;
+        description
+          "maintenance spare equipment that is in use as a
+           maintenance spare";
+      }
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-interfaces@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-interfaces@2019-11-29.yang
new file mode 100644 (file)
index 0000000..618c1e5
--- /dev/null
@@ -0,0 +1,181 @@
+module org-openroadm-interfaces {
+  namespace "http://org/openroadm/interfaces";
+  prefix openROADM-if;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility interfaces.
+     Reused ietf-interfaces and some interface-type defined in iana-if-type.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  identity interface-type {
+    description
+      "Base identity from which specific interface types are
+       derived.";
+  }
+
+  identity ethernetCsmacd {
+    base interface-type;
+    description
+      "For all Ethernet-like interfaces, regardless of speed,
+       as per RFC 3635.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+
+  identity ip {
+    base interface-type;
+    description
+      "IP (for APPN HPR in IP networks).";
+  }
+
+  identity mediaChannelTrailTerminationPoint {
+    base interface-type;
+    description
+      "Media Channel Trail Termination Point";
+  }
+
+  identity networkMediaChannelConnectionTerminationPoint {
+    base interface-type;
+    description
+      "Network Media Channel Connection Termination Point";
+  }
+
+  identity opticalChannel {
+    base interface-type;
+    description
+      "Optical Channel.";
+  }
+
+  identity opticalTransport {
+    base interface-type;
+    description
+      "Optical Transport.";
+  }
+
+  identity otnOdu {
+    base interface-type;
+    description
+      "OTN Optical Data Unit.";
+  }
+
+  identity otnOtu {
+    base interface-type;
+    description
+      "OTN Optical channel Transport Unit.";
+  }
+
+  identity otsi {
+    base interface-type;
+    description
+      "OTSI interface.";
+  }
+
+  identity otsi-group {
+    base interface-type;
+    description
+      "OTSI Group interface.";
+  }
+
+  identity flexo {
+    base interface-type;
+    description
+      "Flexo interface.";
+  }
+
+  identity flexo-group {
+    base interface-type;
+    description
+      "Flexo Group interface.";
+  }
+
+  identity openROADMOpticalMultiplex {
+    base interface-type;
+    description
+      "Optical Transport Multiplex type for openROADM";
+  }
+
+  identity ppp {
+    base interface-type;
+    description
+      "PPP for IP GNE.";
+  }
+
+  identity gcc {
+    base interface-type;
+    description
+      "ITU-T G.709 GCC.";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-layerRate@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-layerRate@2019-11-29.yang
new file mode 100644 (file)
index 0000000..ef23863
--- /dev/null
@@ -0,0 +1,102 @@
+module org-openroadm-layerRate {
+  namespace "http://org/openroadm/layerRate";
+  prefix org-openroadm-layerRate;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of layer rates.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef layer-rate-enum {
+    type enumeration {
+      enum vendorExtension {
+        value 1;
+        description
+          "vendor extension";
+      }
+      enum layer2 {
+        value 2;
+        description
+          "2";
+      }
+      enum layer3 {
+        value 3;
+        description
+          "3";
+      }
+      enum layer4 {
+        value 4;
+        description
+          "4";
+      }
+      enum layer5 {
+        value 5;
+        description
+          "5";
+      }
+      enum layer6 {
+        value 6;
+        description
+          "6";
+      }
+    }
+  }
+
+  grouping layer-rate {
+    description
+      "Set list of layer rates, plus the ability to report layer rates not yet in set list.";
+    leaf type {
+      type layer-rate-enum;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      mandatory false;
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-manifest-file@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-manifest-file@2020-03-27.yang
new file mode 100644 (file)
index 0000000..27012bd
--- /dev/null
@@ -0,0 +1,1026 @@
+module org-openroadm-manifest-file {
+  namespace "http://org/openroadm/manifest-file";
+  prefix org-openroadm-manifest-file;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of sw-manifest-file
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2017,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF netconf.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+    reference
+      "This module serves as the manifest file reference.";
+  }
+
+  identity manifest-commands {
+    description
+      "base identity for defining manifest-commands.";
+  }
+
+  identity download-file {
+    base manifest-commands;
+    description
+      "download-file (transfer from OWB-C to Device)";
+  }
+
+  identity upload-file {
+    base manifest-commands;
+    description
+      "upload-file (transfer from Device to OWB-C)";
+  }
+
+  identity delete-file {
+    base manifest-commands;
+    description
+      "delete-file from device";
+  }
+
+  identity sw-manifest-commands {
+    base manifest-commands;
+    description
+      "base identity for defining manifest-commands specific to sw-manifest.";
+  }
+
+  identity sw-stage {
+    base sw-manifest-commands;
+    description
+      "sw-stage sw-manifest-command";
+  }
+
+  identity sw-activate {
+    base sw-manifest-commands;
+    description
+      "sw-activate sw-manifest-command";
+  }
+
+  identity cancel-validation-timer {
+    base sw-manifest-commands;
+    description
+      "cancel-validation-timer sw-manifest-command";
+  }
+
+  identity db-backup-manifest-commands {
+    base manifest-commands;
+    description
+      "base identity for defining manifest-commands specific to db-backup-manifest.";
+  }
+
+  identity db-backup {
+    base db-backup-manifest-commands;
+    description
+      "db-backup db-backup-manifest-command";
+  }
+
+  identity db-restore-manifest-commands {
+    base manifest-commands;
+    description
+      "base identity for defining manifest-commands specific to db-restore-manifest.";
+  }
+
+  identity db-restore {
+    base db-restore-manifest-commands;
+    description
+      "db-restore db-restore-manifest-command";
+  }
+
+  identity db-activate {
+    base db-restore-manifest-commands;
+    description
+      "db-activate db-restore-manifest-command";
+  }
+
+  identity cancel-rollback-timer {
+    base db-restore-manifest-commands;
+    description
+      "cancel-rollback-timer db-restore-manifest-command";
+  }
+
+  grouping base-manifest {
+    description
+      "base set of variables in all manifest files";
+    leaf vendor {
+      type string;
+      mandatory true;
+      description
+        "This field should match the /org-openroadm-device/info/vendor.
+         It is assumed that the vendor value does not change during the
+         processing of the manifest file.
+
+         The controller agent would use the vendor and model to find the
+         manifest for an Open ROADM NE. The controller agent would also
+         use the vendor and model to validate that this is a valid manifest
+         for the Open ROADM NE.
+        ";
+    }
+    leaf model {
+      type string;
+      mandatory true;
+      description
+        "This field should match the /org-openroadm-device/info/model.
+         It is assumed that the model value does not change during the
+         processing of the manifest file.
+
+         The controller agent would use the vendor and model to find the
+         manifest for an Open ROADM NE. The controller agent would also
+         use the vendor and model to validate that this is a valid manifest
+         for the Open ROADM NE.
+        ";
+    }
+    leaf sw-version {
+      type string;
+      description
+        "This field should match the
+             /org-openroadm-device/info/softwareVersion.
+         This is the value in the info tree AFTER an upgrade.
+        ";
+    }
+    leaf global-async-timeout {
+      type uint16;
+      default "900";
+      description
+        "global-async-timeout - time in seconds to wait for command processing to
+         complete.
+
+         Upon timeout, the controller may either:
+           - assume success;
+           - assume failure;
+           - poll the device to determine success/failure of the operation
+
+         This global-async-timeout applies to any asynchronous command.
+        ";
+    }
+    leaf global-sync-timeout {
+      type uint16;
+      description
+        "global-sync-timeout - time in seconds to wait for the rpc response for
+         synchronous commands.
+
+         This global-sync-timeout applies to any synchronous command.
+
+         Upon timeout, the controller may either:
+           - assume success;
+           - assume failure;
+           - poll the device to determine success/failure of the operation
+
+         No default is modeled; if not provided, defaults to the global
+         timeout supported by the controller for rpc responses.
+        ";
+    }
+  }
+
+  grouping timeout-command {
+    description
+      "timeout-command is to be used by any manifest command supporting a timeout";
+    leaf timeout {
+      type uint16;
+      description
+        "See command for additional details.
+         if command is async,
+           - overrides the global-async-timeout;
+           - defaults to the global-async-timeout if not provided.
+         if command is sync,
+           - overrides the global-sync-timeout;
+           - defaults to the global-sync-timeout if not provided.
+        ";
+    }
+  }
+
+  grouping is-async-command {
+    description
+      "is-async-command is to be supported by all manifest commands even if only
+       supported as sync or async. In such cases, a must statement should be
+       included to limit support to either sync or async.";
+    leaf is-async {
+      type boolean;
+      default "true";
+      description
+        "command can be supported as either an async or sync command by a vendor.
+         When supported as a sync command, the OWB-C will determine the success/failure
+         of the command based on the RPC response instead of waiting for transient
+         notifications from the device.";
+    }
+  }
+
+  grouping transfer-command {
+    description
+      "transfer-command defines the common set of variables used by download-file
+       and upload-file";
+    leaf remote-filename {
+      type string;
+      mandatory true;
+      description
+        "See command for detailed description.";
+    }
+    leaf local-file-path {
+      type string;
+      mandatory true;
+      description
+        "See command for detailed description.";
+    }
+    uses timeout-command;
+    uses is-async-command;
+  }
+
+  grouping file-command {
+    description
+      "file-command is used by all manifest files needing a filename";
+    leaf filename {
+      type string;
+      description
+        "filename is mandatory for delete-file; optional otherwise.
+         See command for detailed description.";
+    }
+  }
+
+  grouping command-reboot {
+    description
+      "command-reboot is used by manifest commands which result in a
+       device restart.";
+    leaf auto-reboot {
+      type uint16;
+      mandatory true;
+      description
+        "See command for detailed description.";
+    }
+  }
+
+  grouping download-file-command {
+    description
+      "down-file-command";
+    container download-file {
+      when "../command = 'download-file'";
+      description
+        "Transfer a file from the SFTP server to the device.
+         format: download-file remote-filename local-file-path [timeout]
+         where
+           remote-filename is the filename of the file to transfer on the SFTP
+           server. The filename can include a relative path that represents the
+           subdirectory structure of the vendor's software directory. This file
+           (and optional path) must exist in the software release directory on
+           the SFTP server.
+
+           local-file-path is the local path and filename to transfer the file on
+           the device.
+
+           timeout - see timeout-command grouping for basic details;
+                     if command is async,
+                       - Receipt of an in-progress (version 2)
+                         transfer-notification resets the timeout.
+
+         Maps to the transfer rpc with
+            action = download
+            local-file-path = local-file-path
+            remote-file-path =
+               sftp://user:password@host[:port]/path/remote-filename
+
+            The remote-file-path attribute on the transfer command would be
+            constructed by the software download agent by appending the sftp URL
+            (which includes username, password, host, port, and path to the
+            software release directory) with the remote_filename.
+
+         In the context of the transfer, remote is the SFTP server (e.g., located
+         on the software download agent) and local is on the Open ROADM device.
+
+         Expected notifications: transfer-notification
+        ";
+      uses transfer-command;
+    }
+  }
+
+  grouping upload-file-command {
+    description
+      "upload-file-command";
+    container upload-file {
+      when "../command = 'upload-file'";
+      description
+        "Transfer a file from the device to the SFTP server.
+         format: upload-file remote-filename local-file-path [timeout]
+         where
+           remote-filename is the filename of the file to receive the upload
+           on the SFTP server. The filename can include a relative path that
+           represents the subdirectory structure of the vendor's software
+           directory.
+
+           local-file-path is the local path and filename of the file on
+           the device to be uploaded to the SFTP server. This file must exist on
+           the device.
+
+           timeout - see timeout-command grouping for basic details;
+                     if command is async,
+                       - Receipt of an in-progress (version 2)
+                         transfer-notification resets the timeout.
+
+         Maps to the transfer rpc with
+            action = upload
+            local-file-path = local-file-path
+            remote-file-path =
+               sftp://user:password@host[:port]/path/remote-filename
+
+            The remote-file-path attribute on the transfer command would be
+            constructed by the software download agent by appending the sftp URL
+            (which includes username, password, host, port, and path to the
+            software release directory) with the remote_filename.
+
+         In the context of the transfer, remote is the SFTP server (e.g., located
+         on the software download agent) and local is on the Open ROADM device.
+
+         Expected notifications: transfer-notification
+        ";
+      uses transfer-command;
+    }
+  }
+
+  grouping delete-file-command {
+    description
+      "delete-file-command";
+    container delete-file {
+      when "../command = 'delete-file'";
+      must "is-async != 'false'" {
+        error-message "delete-file is only supported as sync command";
+      }
+      description
+        "Delete a file from the device's file system.
+         format: delete-file filename [timeout]
+         where
+           filename is the filename to be deleted from the device. The filename
+           may include path information.
+
+           timeout - overrides the global-sync-timeout; defaults to the
+                     global-sync-timeout if not provided.
+
+         Maps to the delete-file rpc:
+            delete-file filename
+        ";
+      uses file-command {
+        refine "filename" {
+          mandatory true;
+        }
+      }
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping sw-stage-command {
+    description
+      "sw-stage-command";
+    container sw-stage {
+      when "../command = 'sw-stage'";
+      description
+        "Stage a file in the device.  The details of what a device does during
+         the staging operation is vendor specific.  However, the vendor may
+         initiate additional file transfers from the SFTP server during the
+         staging operation.  It is expected that the files will only be
+         transferred from the software release directory.
+
+         format: sw-stage [filename] [timeout]
+         where
+           filename is the filename of the file to stage. If filename is not
+           provided, the software download application will send the sw-stage
+           command without a filename.
+
+           timeout - overrides the global-async-timeout; defaults to the
+                     global-async-timeout if not provided.
+
+
+         Maps to the sw-stage rpc:
+            sw-stage [filename]
+
+         Expected notifications: sw-stage-notification
+        ";
+      uses file-command;
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping wait-time-command {
+    description
+      "Wait timer starting from the completion of sw-activate or db-activate before canceling the validation timer or rollback timer";
+    leaf wait-time {
+      type uint16;
+      mandatory true;
+      description
+        "See command for detailed description.";
+    }
+  }
+
+  grouping sw-activate-command {
+    description
+      "sw-activate-command";
+    container sw-activate {
+      when "../command = 'sw-activate'";
+      must "is-async != 'true'" {
+        error-message "sw-activate is only supported as async command";
+      }
+      description
+        "Activate a software load in a device.  The details of what a device does
+         during the activation phase is vendor specific.  The device initiates
+         an automatic reboot as part of the activation.
+
+         format:  sw-activate version [validation-timer] [timeout] auto-reboot
+         where:
+           version: The version of software that is being activated. (The current
+           YANG model indicates that version is optional; however, version should
+           be a mandatory attribute of the sw-activate command in the manifest
+           file).
+
+           validation-timer: Validation timer setting for the software activation.
+           Format is expected to be in the form HH-MM-SS per the YANG model. The
+           software download application expects this format in order to treat
+           00-00-00 and no validation timer as the same use case.
+
+           timeout - overrides the global-async-timeout; defaults to the
+           global-async-timeout if not provided. This timer begins as soon as the
+           sw-activate processing begins. timeout must be greater than the
+           auto-reboot time.
+
+           auto-reboot: time (in seconds) to wait to for the device to reboot.
+           This is the device restart time (e.g. the length of time from device
+           comm loss until the device is ready for login). This timer begins when
+           the controller detects the comm-loss from the device. If login is not
+           successful when this timer expires, the sw-activate is failed.
+
+           NOTE: if controller swdl application is not doing the login directly,
+           the controller may need to augment the auto-reboot timer to account for
+           the login time.
+
+         Maps to the sw-activate rpc:
+           sw-activate version [validationTimer]
+
+         Expected notifications: sw-activate-notification
+           When no validation timer (or validation-timer = 00-00-00), two
+           notifications will be expected: one for activate, the other for
+           commit. Otherwise, only the activate notification is expected.
+
+           NOTE: the sw-activate-notifications (for activate) may be received
+           before or after the reboot; it is assumed the sw-activate-notification
+           (for commit) always occurs after the reboot. Any polling due to missed
+           sw-activate-notifications (activate and/or commit) should not be done
+           until after the reboot login; processing of sw-activate does not
+           complete until after receipt of the notifications and the reboot login.
+        ";
+      leaf version {
+        type string;
+        mandatory true;
+        description
+          "Although version is optional in the sw-activate rpc, it is
+           mandatory in the manifest file command.";
+      }
+      leaf validation-timer {
+        type string;
+        description
+          "hh-mm-ss";
+      }
+      uses timeout-command;
+      uses command-reboot;
+      uses is-async-command;
+    }
+  }
+
+  grouping cancel-validation-timer-command {
+    description
+      "cancel-validation-timer-command";
+    container cancel-validation-timer {
+      when "../command = 'cancel-validation-timer'";
+      description
+        "Command to automatically cancel the validation timer after wait-time.
+         Accept will be set to True if this command is used.
+
+         format:  cancel-validation-timer wait-time [time-out]
+         where:
+
+           wait-time - wait timer starting from the completion of
+           sw-activate before canceling the validation timer.
+
+           timeout - see timeout-command grouping for basic details.
+
+         Expected notifications: sw-activate-notification
+           commit notification is expected.
+        ";
+      uses wait-time-command;
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping db-backup-command {
+    description
+      "db-backup-command";
+    container db-backup {
+      when "../command = 'db-backup'";
+      description
+        "Perform a database backup on the device.
+
+         format: db-backup [filename] [timeout]
+         where
+           filename is the filename of the backup file to be generated on the
+           device. If filename is not provided, the database backup application
+           will send the db-backup command without a filename. It's possible the
+           filename will not be statically provided in the manifest file, but
+           provided by the database backup application.
+
+           timeout - see timeout-command grouping for basic details;
+
+         Maps to the db-backup rpc:
+           db-backup [filename]
+
+         Expected notifications: db-backup-notification
+        ";
+      uses file-command;
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping db-restore-command {
+    description
+      "db-restore-command";
+    container db-restore {
+      when "../command = 'db-restore'";
+      description
+        "Perform a database restore on the device.
+
+         format: db-restore [filename] [node-id-check] [timeout]
+         where
+           filename is the filename of the file to be restored on the
+           device. If filename is not provided, the database restore application
+           will send the db-restore command without a filename. It's possible the
+           filename will not be statically provided in the manifest file, but
+           provided by the database restore application.
+
+           node-id-check is a boolean indicating whether sysNameCheck is required.
+
+           timeout - see timeout-command grouping for basic details;
+
+         Maps to the db-restore rpc:
+           db-restore [filename] [nodeIDCheck]
+
+         Expected notifications: db-restore-notification
+        ";
+      uses file-command;
+      leaf node-id-check {
+        type string;
+        default "true";
+        description
+          "Defined as an string here so that manifest file can parameterize
+           the value for user input. __NODE-ID-CHECK is used for that purpose. Other valid
+           values are true or false. Maps to a boolean value in the rpc invocation.";
+      }
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping cancel-rollback-timer-command {
+    description
+      "cancel-rollback-timer-command";
+    container cancel-rollback-timer {
+      when "../command = 'cancel-rollback-timer'";
+      description
+        "Command to automatically cancel the rollback timer after wait-time.
+         Accept will be set to True if this command is used.
+
+         format: cancel-rollback-timer wait-time [timeout]
+
+           wait-time - Wait timer starting from the completion of
+           db-activate before canceling the rollback timer.
+
+           timeout - see timeout-command grouping for basic details.
+
+         Expected notifications: db-activate-notification
+           commit notification is expected.
+        ";
+      uses wait-time-command;
+      uses timeout-command;
+      uses is-async-command;
+    }
+  }
+
+  grouping db-activate-command {
+    description
+      "db-activate-command";
+    container db-activate {
+      when "../command = 'db-activate'";
+      must "is-async != 'true'" {
+        error-message "db-activate is only supported as async command";
+      }
+      description
+        "Activate a database on a device.  The details of what a device does
+         during the activation phase is vendor specific.  The device initiates
+         an automatic reboot as part of the activation.
+
+         format:  db-activate [rollback-timer] [timeout] auto-reboot
+         where:
+           rollback-timer: Rollback timer setting for the database activation.
+           Format is expected to be in the form HH-MM-SS per the YANG model. The
+           database activation application expects this format in order to treat
+           00-00-00 and no validation timer as the same use case.
+
+           timeout - overrides the global-async-timeout; defaults to the
+           global-async-timeout if not provided. This timer begins as soon as the
+           db-activate processing begins. timeout must be greater than the
+           auto-reboot time.
+
+           auto-reboot: time (in seconds) to wait to for the device to reboot.
+           This is the device restart time (e.g. the length of time from device
+           comm loss until the device is ready for login). This timer begins when
+           the controller detects the comm-loss from the device. If login is not
+           successful when this timer expires, the db-activate is failed.
+
+           NOTE: if controller database application is not doing the login
+           directly, the controller may need to augment the auto-reboot timer to
+           account for the login time.
+
+         Maps to the db-activate rpc:
+           db-activate [rollBackTimer]
+
+         Expected notifications: db-activate-notification
+           When no rollback timer (or rollback-timer = 00-00-00), two
+           notifications will be expected: one for activate, the other for
+           commit. Otherwise, only the activate notification is expected.
+
+           NOTE: the db-activate-notifications (for activate) may be received
+           before or after the reboot; it is assumed the db-activate-notification
+           (for commit) always occurs after the reboot. Any polling due to missed
+           db-activate-notifications (activate and/or commit) should not be done
+           until after the reboot login; processing of db-activate does not
+           complete until after receipt of the notifications and the reboot login.
+        ";
+      leaf rollback-timer {
+        type string;
+        description
+          "hh-mm-ss";
+      }
+      uses timeout-command;
+      uses command-reboot;
+      uses is-async-command;
+    }
+  }
+
+  container sw-manifest {
+    presence "The sw-manifest instructions for swdl operations have been defined.";
+    description
+      "The manifest file provides instructions to a software download
+       application to download and install a new software load into a vendor's
+       equipment.
+
+       Software download files
+           All vendor files for a software release should be stored in a
+       separate directory. A unique directory would be used for each vendor,
+       model and software release combination. This directory and all files in
+       that directory will be accessible by the SFTP server.
+           The software directory can be flat or hierarchical with
+       subdirectories. The manifest file should be in the root directory of the
+       software directory.
+           A software directory must contain files for one and only one
+       software release.
+
+       Manifest file name
+           Each software release directory shall contain a manifest file for
+       that release. The filename for the manifest file shall be sw-manifest.json.
+      ";
+    uses base-manifest {
+      refine "sw-version" {
+        mandatory true;
+      }
+    }
+    list instruction-set {
+      key "index";
+      description
+        "The instruction set for a list of sw-versions that can be upgraded to
+         the sw-version specified at the top of the manifest file.";
+      leaf index {
+        type uint8;
+        description
+          "The index for this instruction set.";
+      }
+      leaf-list from-sw-version {
+        type string;
+        description
+          "The optional list of sw-versions that can be upgraded to the
+           sw-version specified at the top of the sw-manifest file.
+
+           If not specified, this instruction set is used to upgrade from
+           any sw-version to the sw-version specified at the top of the
+           sw-manifest file.
+
+           If multiple instruction sets are provided, from-sw-version
+           should always be defined.";
+      }
+      leaf is-commit-sw-activate-async {
+        type boolean;
+        default "true";
+        description
+          "Is cancel-validation-timer (accept = true) supported as an
+           async or sync command on the device? If supported as sync, the rpc response
+           is used to determine success/failure instead of waiting for transient notifications
+           of the result.
+           NOTE: cancel-validation-timer (accept = false) requires a reboot so is
+           always considered async";
+      }
+      leaf cancel-validation-timer-async-timeout {
+        type uint16;
+        description
+          "timeout value to use for cancel-validation-timer when supported as
+           an async command. If not specified, the global-async-timeout is used.";
+      }
+      leaf cancel-validation-timer-sync-timeout {
+        type uint16;
+        description
+          "timeout value to use for cancel-validation-timer (accept = true) when
+           supported as a sync command. If not specified, the global-sync-timeout
+           is used.";
+      }
+      container sw-manifest-commands {
+        description
+          "The ordered list of commands to be processed. Since some yang
+           implementations do not support ordered-by user, the list is also
+           indexed by command-order. The commands should be processed
+           in the order of command-order.
+
+           Processing moves to the next command when:
+           1. command is synchronous and rpc returns a successful result.
+           2. command is asynchronous, the rpc returns a successful result,
+           and
+           2.1 expected successful notification(s) have been received; or
+           2.2 timeout occurs.
+           \t\t
+           Processing of the manifest file is aborted when:
+           1. command is synchronous and rpc returns a failed result.
+           2. command is asynchronous, and:
+           2.1 the rpc returns a failed result; or
+           2.2 a failed notification is received; or
+           2.3 timeout occurs.
+           \t\t
+           NOTE: behavior for timeouts (synchronous or asynchronous) may depend upon
+           controller implementation per command. It may be considered either:
+           - as a successful result
+           - as a failed result
+           - as a success or failure based on polling the device
+          ";
+        list sw-manifest-command {
+          key "command-order";
+          ordered-by user;
+          description
+            "The list of commands to be processed.";
+          leaf command-order {
+            type uint8;
+            description
+              "The order in which commands should be processed.";
+          }
+          leaf command {
+            type identityref {
+              base sw-manifest-commands;
+            }
+            mandatory true;
+            description
+              "The command to be processed.";
+          }
+          uses download-file-command;
+          uses delete-file-command;
+          uses sw-stage-command;
+          uses sw-activate-command;
+          uses cancel-validation-timer-command;
+        }
+      }
+    }
+  }
+  container db-backup-manifest {
+    presence "The db-backup-manifest template for db-backup operations has been defined.";
+    description
+      "The manifest file provides instructions to a database operations
+       application to backup the database on a device.
+
+       Since the files used for these operations are likely user selected,
+       these manifest files are more likely used by the controller as a
+       template to control the overall flow of a backup operation and provide
+       a means of providing customized timeout values.
+
+       The following strings will be recognized as parameters to be replaced
+       by the user selected values: __LOCAL-FILE-PATH, __REMOTE-FILENAME.
+
+       Manifest file name
+           Each vendor/model combination can have a separate manifest file
+       defined for backup. These shall be named db-backup-manifest.json.
+      ";
+    uses base-manifest;
+    container db-backup-manifest-commands {
+      description
+        "The ordered list of commands to be processed. Since some yang
+         implementations do not support ordered-by user, the list is also
+         indexed by command-order. The commands should be processed
+         in the order of command-order.
+
+         Processing moves to the next command when:
+            1. command is synchronous and rpc returns a successful result.
+            2. command is asynchronous, the rpc returns a successful result,
+               and
+               2.1 expected successful notification(s) have been received; or
+               2.2 timeout occurs.
+
+         Processing of the manifest file is aborted when:
+            1. command is synchronous and rpc returns a failed result.
+            2. command is asynchronous, and:
+               2.1 the rpc returns a failed result; or
+               2.2 a failed notification is received; or
+               2.3 timeout occurs.
+
+         NOTE: behavior for timeouts (synchronous or asynchronous) may depend upon
+         controller implementation per command. It may be considered either:
+             - as a successful result
+             - as a failed result
+             - as a success or failure based on polling the device
+        ";
+      list db-backup-manifest-command {
+        key "command-order";
+        ordered-by user;
+        description
+          "The list of commands to be processed.";
+        leaf command-order {
+          type uint8;
+          description
+            "The order in which commands should be processed.";
+        }
+        leaf command {
+          type identityref {
+            base db-backup-manifest-commands;
+          }
+          mandatory true;
+          description
+            "The command to be processed.";
+        }
+        uses upload-file-command;
+        uses delete-file-command;
+        uses db-backup-command;
+      }
+    }
+  }
+  container db-restore-manifest {
+    presence "The db-restore-manifest template for db-restore operations has been defined.";
+    description
+      "The manifest file provides instructions to a database operations
+       application to restore the database on a device.
+
+       Since the files used for these operations are likely user selected,
+       these manifest files are more likely used by the controller as a
+       template to control the overall flow of a restore operation and provide
+       a means of providing customized timeout and auto-reboot values.
+
+       The following strings will be recognized as parameters to be replaced
+       by the user selected values: __LOCAL-FILE-PATH, __REMOTE-FILENAME,
+       __NODE-ID-CHECK.
+
+       Manifest file name
+           Each vendor/model combination can have a separate manifest file
+       defined for restore. These shall be named db-restore-manifest.json.
+      ";
+    uses base-manifest;
+    leaf is-commit-db-activate-async {
+      type boolean;
+      default "true";
+      description
+        "Is cancel-rollback-timer (accept = true) supported as an
+         async or sync command on the device? If supported as sync, the rpc response
+         is used to determine success/failure instead of waiting for transient notifications
+         of the result.
+         NOTE: cancel-rollback-timer (accept = false) requires a reboot so is
+         always considered async";
+    }
+    leaf cancel-rollback-timer-async-timeout {
+      type uint16;
+      description
+        "timeout value to use for cancel-rollback-timer when supported as
+         an async command. If not specified, the global-async-timeout is used.";
+    }
+    leaf cancel-rollback-timer-sync-timeout {
+      type uint16;
+      description
+        "timeout value to use for cancel-rollback-timer (accept = true) when
+         supported as a sync command. If not specified, the global-sync-timeout
+         is used.";
+    }
+    leaf database-init-sync-timeout {
+      type uint16;
+      description
+        "timeout value to use for database-init command. If not specified,
+         the global-sync-timeout is used.";
+    }
+    container db-restore-manifest-commands {
+      description
+        "The ordered list of commands to be processed. Since some yang
+         implementations do not support ordered-by user, the list is also
+         indexed by command-order. The commands should be processed
+         in the order of command-order.
+
+         Processing moves to the next command when:
+            1. command is synchronous and rpc returns a successful result.
+            2. command is asynchronous, the rpc returns a successful result,
+               and
+               2.1 expected successful notification(s) have been received; or
+               2.2 timeout occurs.
+
+         Processing of the manifest file is aborted when:
+            1. command is synchronous and rpc returns a failed result.
+            2. command is asynchronous, and:
+               2.1 the rpc returns a failed result; or
+               2.2 a failed notification is received; or
+               2.3 timeout occurs.
+
+         NOTE: behavior for timeouts (synchronous or asynchronous) may depend upon
+         controller implementation per command. It may be considered either:
+             - as a successful result
+             - as a failed result
+             - as a success or failure based on polling the device
+        ";
+      list db-restore-manifest-command {
+        key "command-order";
+        ordered-by user;
+        description
+          "The list of commands to be processed.";
+        leaf command-order {
+          type uint8;
+          description
+            "The order in which commands should be processed.";
+        }
+        leaf command {
+          type identityref {
+            base db-restore-manifest-commands;
+          }
+          mandatory true;
+          description
+            "The command to be processed.";
+        }
+        uses download-file-command;
+        uses delete-file-command;
+        uses db-restore-command;
+        uses db-activate-command;
+        uses cancel-rollback-timer-command;
+      }
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-network-resource@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-network-resource@2019-11-29.yang
new file mode 100644 (file)
index 0000000..3da7ee2
--- /dev/null
@@ -0,0 +1,126 @@
+module org-openroadm-network-resource {
+  namespace "http://org/openroadm/network-resource";
+  prefix org-openroadm-network-resource;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of resources.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  identity network-resource-types {
+    description
+      "base type for network resources";
+  }
+
+  identity network-resource-tp {
+    base network-resource-types;
+    description
+      "tp-id network resource";
+  }
+
+  identity network-resource-link {
+    base network-resource-types;
+    description
+      "link-id network resource";
+  }
+
+  grouping network-resource {
+    description
+      "This resource identifier is intended to provide a generic identifer
+       for any network resource that can be used without specific knowledge of
+       the resource.";
+    container network-resource {
+      choice network-resource {
+        case network-resource-tp {
+          uses network-tp-name;
+        }
+        case network-resource-link {
+          uses network-link-name;
+        }
+      }
+    }
+    leaf network-resource-type {
+      type identityref {
+        base network-resource-types;
+      }
+      mandatory true;
+    }
+  }
+
+  grouping network-tp-name {
+    leaf tp-network-id {
+      type string;
+      mandatory true;
+      description
+        "network-id from the network model.";
+    }
+    leaf tp-node-id {
+      type string;
+      mandatory true;
+      description
+        "node-id from the network model.";
+    }
+    leaf tp-id {
+      type string;
+      mandatory true;
+      description
+        "tp-id from the network model.";
+    }
+  }
+
+  grouping network-link-name {
+    leaf link-network-id {
+      type string;
+      mandatory true;
+      description
+        "network-id from the network model.";
+    }
+    leaf link-id {
+      type string;
+      mandatory true;
+      description
+        "link-id from the network model.";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-otn-common-types@2020-03-27.yang
new file mode 100644 (file)
index 0000000..0eb123b
--- /dev/null
@@ -0,0 +1,352 @@
+module org-openroadm-otn-common-types {
+  namespace "http://org/openroadm/otn-common-types";
+  prefix org-openroadm-otn-common-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for common otn related type definitions.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+
+  identity otu-rate-identity {
+    description
+      "A unique rate identification of the OTU.";
+  }
+
+  identity OTUCn {
+    base otu-rate-identity;
+    description
+      "Identity for an OTUCn";
+  }
+
+  identity OTU4 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU4";
+  }
+
+  identity OTU3 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU3";
+  }
+
+  identity OTU2 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU2";
+  }
+
+  identity OTU2e {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU2e";
+  }
+
+  identity OTU1 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU1";
+  }
+
+  identity OTU0 {
+    base otu-rate-identity;
+    description
+      "Identity for an OTU0";
+  }
+
+  identity OTUflex {
+    base otu-rate-identity;
+    description
+      "Identity for an OTUflex";
+  }
+
+  identity odu-rate-identity {
+    description
+      "A unique rate identification of the ODU.";
+  }
+
+  identity ODUCn {
+    base odu-rate-identity;
+    description
+      "Identity for an ODUCn";
+  }
+
+  identity ODU4 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU4";
+  }
+
+  identity ODU3 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU3";
+  }
+
+  identity ODU2 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU2";
+  }
+
+  identity ODU2e {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU2e";
+  }
+
+  identity ODU1 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU1";
+  }
+
+  identity ODU0 {
+    base odu-rate-identity;
+    description
+      "Identity for an ODU0";
+  }
+
+  identity ODUflex-cbr {
+    base odu-rate-identity;
+    description
+      "ODUFlex for CBR client signals (G.709)";
+  }
+
+  identity ODUflex-cbr-identity {
+    description
+      "Service type for ODUflex (CBR)";
+  }
+
+  identity ODUflex-cbr-25G {
+    base ODUflex-cbr-identity;
+    description
+      "ODUFlex for CBR client signals 25G (G.709 17.13.1)";
+  }
+
+  identity ODUflex-cbr-200G {
+    base ODUflex-cbr-identity;
+    description
+      "ODUFlex for CBR client signals 200G (G.709 17.13.2)";
+  }
+
+  identity ODUflex-cbr-400G {
+    base ODUflex-cbr-identity;
+    description
+      "ODUFlex for CBR client signals 400G (G.709 17.13.2)";
+  }
+
+  identity ODUflex-imp {
+    base odu-rate-identity;
+    description
+      "ODUFlex for IMP (Idle insertion Mapping Procedure) mapped client signals (G.709)";
+  }
+
+  identity ODUflex-flexe {
+    base odu-rate-identity;
+    description
+      "ODUflex for FlexE-aware client signals (G.709)";
+  }
+
+  identity ODUflex-gfp {
+    base odu-rate-identity;
+    description
+      "ODUflex for GFP-F mapped client signals (G.709)";
+  }
+
+  identity odtu-type-identity {
+    description
+      "A unique identification for the MSI odtu type.";
+  }
+
+  identity ODTUCn.ts {
+    base odtu-type-identity;
+    description
+      "ODTUCn.ts - OPUCn MSI type (G.709 clause 20.2)";
+  }
+
+  identity ODTU4.ts-Allocated {
+    base odtu-type-identity;
+    description
+      "OPU4 MSI - ODTU4.ts, OPU4 MSI TS is occupied/allocated.
+       Applies to all ODTU4.x mappings";
+  }
+
+  identity ODTU01 {
+    base odtu-type-identity;
+    description
+      "ODTU01 MSI type";
+  }
+
+  identity ODTU12 {
+    base odtu-type-identity;
+    description
+      "ODTU12 MSI type";
+  }
+
+  identity ODTU13 {
+    base odtu-type-identity;
+    description
+      "ODTU13 MSI type";
+  }
+
+  identity ODTU23 {
+    base odtu-type-identity;
+    description
+      "ODTU23 MSI type";
+  }
+
+  identity ODTU2.ts {
+    base odtu-type-identity;
+    description
+      "ODTU2.ts MSI type";
+  }
+
+  identity ODTU3.ts {
+    base odtu-type-identity;
+    description
+      "ODTU3.ts MSI type";
+  }
+
+  identity ODTU4.ts {
+    base odtu-type-identity;
+    description
+      "ODTU4.ts MSI type";
+  }
+
+  identity unallocated {
+    base odtu-type-identity;
+    description
+      "Unallocated MSI type";
+  }
+
+  identity odu-function-identity {
+    description
+      "A unique identification of the ODUk interface function.";
+  }
+
+  identity ODU-TTP {
+    base odu-function-identity;
+    description
+      "ODU TTP facility facing trail termination";
+  }
+
+  identity ODU-CTP {
+    base odu-function-identity;
+    description
+      "ODU CTP connection termination";
+  }
+
+  identity ODU-TTP-CTP {
+    base odu-function-identity;
+    description
+      "ODU CTP mapper level connection termination with trail termination and client adaptation";
+  }
+
+  typedef payload-type-def {
+    type string {
+      length "2";
+      pattern '[0-9a-fA-F]*';
+    }
+    description
+      "Common type definition for odu payload-type";
+  }
+
+  typedef opucn-trib-slot-def {
+    type string;
+    description
+      "OPUCn trib slot in the form of 'A.B' with
+       A = 1..n
+       B = 1..20";
+  }
+
+  typedef tcm-direction-enum {
+    type enumeration {
+      enum up-tcm {
+        description
+          "TCM termination direction faces the switch fabric.";
+      }
+      enum down-tcm {
+        description
+          "TCM termination direction faces the facility";
+      }
+    }
+    description
+      "Enumeration type for TCM direction";
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-pm-types@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-pm-types@2020-03-27.yang
new file mode 100644 (file)
index 0000000..287cd45
--- /dev/null
@@ -0,0 +1,709 @@
+module org-openroadm-pm-types {
+  namespace "http://org/openroadm/pm-types";
+  prefix org-openroadm-pm-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of performance management types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef pm-granularity {
+    type enumeration {
+      enum notApplicable {
+        value 1;
+        description
+          "This is for total statistic counters on devices that support
+              them.";
+      }
+      enum 15min {
+        value 2;
+      }
+      enum 24Hour {
+        value 3;
+      }
+    }
+    description
+      "Granularity of PM bin";
+  }
+
+  typedef pm-data-type {
+    type union {
+      type uint64;
+      type int64;
+      type decimal64 {
+        fraction-digits 2;
+      }
+      type decimal64 {
+        fraction-digits 17;
+      }
+    }
+  }
+
+  typedef validity {
+    type enumeration {
+      enum complete {
+        value 1;
+      }
+      enum partial {
+        value 2;
+      }
+      enum suspect {
+        value 3;
+      }
+    }
+    description
+      "Validity of data";
+  }
+
+  typedef pm-names-enum {
+    type enumeration {
+      enum vendorExtension {
+        value 1;
+        description
+          "vendor extension";
+      }
+      enum bitErrorRate {
+        value 2;
+        description
+          "Bit error rate (BER)";
+      }
+      enum opticalPowerOutput {
+        value 3;
+        description
+          "Optical Power Output (OPOUT-OTS, OPOUT-OMS, OPT-OCH). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalReturnLoss {
+        value 4;
+        description
+          "Optical Return Loss (ORL-OTS) - at MW port(s) B";
+      }
+      enum opticalPowerInput {
+        value 5;
+        description
+          "Optical Power Input (OPIN-OTS, OPIN-OMS, OPR-OCH). Total optical power";
+      }
+      enum codeViolations {
+        value 8;
+        description
+          "Code Violations (CV)";
+      }
+      enum erroredSeconds {
+        value 9;
+        description
+          "Errored Seconds (ES)";
+      }
+      enum severelyErroredSeconds {
+        value 10;
+        description
+          "Severely Errored Seconds (SES)";
+      }
+      enum unavailableSeconds {
+        value 11;
+        description
+          "Unavailable Seconds (UAS)";
+      }
+      enum inFrames {
+        value 12;
+        description
+          "In frames (INFRAMES-E)";
+      }
+      enum inFramesErrored {
+        value 13;
+        description
+          "In frames errored (INFRAMESERR-E)";
+      }
+      enum outFrames {
+        value 14;
+        description
+          "Out frames (OUTFRAMES-E)";
+      }
+      enum erroredSecondsEthernet {
+        value 15;
+        description
+          "Errored Seconds Ethernet (ES-E)";
+      }
+      enum severelyErroredSecondsEthernet {
+        value 16;
+        description
+          "Severely Errored Seconds, Ethernet (SES-E)";
+      }
+      enum unavailableSecondsEthernet {
+        value 17;
+        description
+          "Unavailable Seconds, Ethernet (UAS-E)";
+      }
+      enum erroredBlockCount {
+        value 18;
+        description
+          "Errored block count";
+      }
+      enum delay {
+        value 19;
+        description
+          "Number of frames between a DMValue toggle event and the received DMp signal value toggle event";
+      }
+      enum defectSeconds {
+        value 20;
+        description
+          "Defect Seconds (DS)";
+      }
+      enum backwardIncomingAlignmentError {
+        value 21;
+        description
+          "Backward Incoming Alignment Error (BIAE)";
+      }
+      enum incomingAlignmentError {
+        value 22;
+        description
+          "Incoming Alignment Error (IAE)";
+      }
+      enum opticalPowerOutputMin {
+        value 23;
+        description
+          "Minimum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerOutputMax {
+        value 24;
+        description
+          "Maximum Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerOutputAvg {
+        value 25;
+        description
+          "Average Optical Power Output (OPOUT-OTS). Total optical power includes Variable Optical Attenuator (VOA) attenuation";
+      }
+      enum opticalPowerInputMin {
+        value 26;
+        description
+          "Minimum Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerInputMax {
+        value 27;
+        description
+          "Maximum Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerInputAvg {
+        value 28;
+        description
+          "Average Optical Power Input (OPIN-OTS). Total optical power";
+      }
+      enum opticalPowerOutputOSC {
+        value 29;
+        description
+          "OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCMin {
+        value 30;
+        description
+          "Minimum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCMax {
+        value 31;
+        description
+          "Maximum OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerOutputOSCAvg {
+        value 32;
+        description
+          "Average OSC Optical Power Output (OPT-OSC). OSC Transmit power on MW port";
+      }
+      enum opticalPowerInputOSC {
+        value 33;
+        description
+          "OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCMin {
+        value 34;
+        description
+          "Minimum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCMax {
+        value 35;
+        description
+          "Maximum OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum opticalPowerInputOSCAvg {
+        value 36;
+        description
+          "Average OSC Optical Power Input (OPR-OSC). OSC Receive power on MW port";
+      }
+      enum preFECCorrectedErrors {
+        value 37;
+        description
+          "pFEC corrected Errors";
+      }
+      enum totalOpticalPowerInput {
+        value 38;
+        description
+          "Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputMin {
+        value 39;
+        description
+          "Minimum Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputMax {
+        value 40;
+        description
+          "Maximum Total Optical Power Input.";
+      }
+      enum totalOpticalPowerInputAvg {
+        value 41;
+        description
+          "Average Total Optical Power Input.";
+      }
+      enum FECCorrectableBlocks {
+        value 42;
+        description
+          "FEC Correctable Blocks.";
+      }
+      enum FECUncorrectableBlocks {
+        value 43;
+        description
+          "FEC Uncorrectable Blocks.";
+      }
+      enum BIPErrorCounter {
+        value 56;
+        description
+          "BIP Error Counter";
+      }
+      enum protectionSwitchingCount {
+        value 57;
+        description
+          "Protection Switching Count (PSC)";
+      }
+      enum protectionSwitchingDuration {
+        value 58;
+        description
+          "Protection Switching Duration in seconds (PSD)";
+      }
+      enum erroredBlockCountTCM1-up {
+        value 59;
+        description
+          "errored Blocks Count on TCM1 up direction.";
+      }
+      enum erroredBlockCountTCM2-up {
+        value 60;
+        description
+          "errored Blocks Count on TCM2 up direction.";
+      }
+      enum erroredBlockCountTCM3-up {
+        value 61;
+        description
+          "errored Blocks Count on TCM3 up direction.";
+      }
+      enum erroredBlockCountTCM4-up {
+        value 62;
+        description
+          "errored Blocks Count on TCM4 up direction.";
+      }
+      enum erroredBlockCountTCM5-up {
+        value 63;
+        description
+          "errored Blocks Count on TCM5 up direction.";
+      }
+      enum erroredBlockCountTCM6-up {
+        value 64;
+        description
+          "errored Blocks Count on TCM6 up direction.";
+      }
+      enum delayTCM1-up {
+        value 65;
+        description
+          "Delay on TCM1 up direction.";
+      }
+      enum delayTCM2-up {
+        value 66;
+        description
+          "Delay on TCM2 up direction.";
+      }
+      enum delayTCM3-up {
+        value 67;
+        description
+          "Delay on TCM3 up direction.";
+      }
+      enum delayTCM4-up {
+        value 68;
+        description
+          "Delay on TCM4 up direction.";
+      }
+      enum delayTCM5-up {
+        value 69;
+        description
+          "Delay on TCM5 up direction.";
+      }
+      enum delayTCM6-up {
+        value 70;
+        description
+          "Delay on TCM6 up direction.";
+      }
+      enum erroredBlockCountTCM1-down {
+        value 71;
+        description
+          "errored Blocks Count on TCM1 down direction.";
+      }
+      enum erroredBlockCountTCM2-down {
+        value 72;
+        description
+          "errored Blocks Count on TCM2 down direction.";
+      }
+      enum erroredBlockCountTCM3-down {
+        value 73;
+        description
+          "errored Blocks Count on TCM3 down direction.";
+      }
+      enum erroredBlockCountTCM4-down {
+        value 74;
+        description
+          "errored Blocks Count on TCM4 down direction.";
+      }
+      enum erroredBlockCountTCM5-down {
+        value 75;
+        description
+          "errored Blocks Count on TCM5 down direction.";
+      }
+      enum erroredBlockCountTCM6-down {
+        value 76;
+        description
+          "errored Blocks Count on TCM6 down direction.";
+      }
+      enum delayTCM1-down {
+        value 77;
+        description
+          "Delay on TCM1 down direction.";
+      }
+      enum delayTCM2-down {
+        value 78;
+        description
+          "Delay on TCM2 down direction.";
+      }
+      enum delayTCM3-down {
+        value 79;
+        description
+          "Delay on TCM3 down direction.";
+      }
+      enum delayTCM4-down {
+        value 80;
+        description
+          "Delay on TCM4 down direction.";
+      }
+      enum delayTCM5-down {
+        value 81;
+        description
+          "Delay on TCM5 down direction.";
+      }
+      enum delayTCM6-down {
+        value 82;
+        description
+          "Delay on TCM6 down direction.";
+      }
+      enum partialRateDiscard {
+        value 83;
+        description
+          "Discarded packet as a result of policing or rate limiting for subrate ethernet.";
+      }
+      enum erroredSecondsTCM1-up {
+        value 84;
+        description
+          "errored Seconds Count on TCM1 up direction.";
+      }
+      enum erroredSecondsTCM2-up {
+        value 85;
+        description
+          "errored Seconds Count on TCM2 up direction.";
+      }
+      enum erroredSecondsTCM3-up {
+        value 86;
+        description
+          "errored Seconds Count on TCM3 up direction.";
+      }
+      enum erroredSecondsTCM4-up {
+        value 87;
+        description
+          "errored Seconds Count on TCM4 up direction.";
+      }
+      enum erroredSecondsTCM5-up {
+        value 88;
+        description
+          "errored Seconds Count on TCM5 up direction.";
+      }
+      enum erroredSecondsTCM6-up {
+        value 89;
+        description
+          "errored Seconds Count on TCM6 up direction.";
+      }
+      enum severelyErroredSecondsTCM1-up {
+        value 90;
+        description
+          "severely Errored Seconds Count on TCM1 up direction.";
+      }
+      enum severelyErroredSecondsTCM2-up {
+        value 91;
+        description
+          "severely Errored Seconds Count on TCM2 up direction.";
+      }
+      enum severelyErroredSecondsTCM3-up {
+        value 92;
+        description
+          "severely Errored Seconds Count on TCM3 up direction.";
+      }
+      enum severelyErroredSecondsTCM4-up {
+        value 93;
+        description
+          "severely Errored Seconds Count on TCM4 up direction.";
+      }
+      enum severelyErroredSecondsTCM5-up {
+        value 94;
+        description
+          "severely Errored Seconds Count on TCM5 up direction.";
+      }
+      enum severelyErroredSecondsTCM6-up {
+        value 95;
+        description
+          "severely Errored Seconds Count on TCM6 up direction.";
+      }
+      enum unavailableSecondsTCM1-up {
+        value 96;
+        description
+          "unavailable Seconds Count on TCM1 up direction.";
+      }
+      enum unavailableSecondsTCM2-up {
+        value 97;
+        description
+          "unavailable Seconds Count on TCM2 up direction.";
+      }
+      enum unavailableSecondsTCM3-up {
+        value 98;
+        description
+          "unavailable Seconds Count on TCM3 up direction.";
+      }
+      enum unavailableSecondsTCM4-up {
+        value 99;
+        description
+          "unavailable Seconds Count on TCM4 up direction.";
+      }
+      enum unavailableSecondsTCM5-up {
+        value 100;
+        description
+          "unavailable Seconds Count on TCM5 up direction.";
+      }
+      enum unavailableSecondsTCM6-up {
+        value 101;
+        description
+          "unavailable Seconds Count on TCM6 up direction.";
+      }
+      enum erroredSecondsTCM1-down {
+        value 102;
+        description
+          "errored Seconds Count on TCM1 down direction.";
+      }
+      enum erroredSecondsTCM2-down {
+        value 103;
+        description
+          "errored Seconds Count on TCM2 down direction.";
+      }
+      enum erroredSecondsTCM3-down {
+        value 104;
+        description
+          "errored Seconds Count on TCM3 down direction.";
+      }
+      enum erroredSecondsTCM4-down {
+        value 105;
+        description
+          "errored Seconds Count on TCM4 down direction.";
+      }
+      enum erroredSecondsTCM5-down {
+        value 106;
+        description
+          "errored Seconds Count on TCM5 down direction.";
+      }
+      enum erroredSecondsTCM6-down {
+        value 107;
+        description
+          "errored Seconds Count on TCM6 down direction.";
+      }
+      enum severelyErroredSecondsTCM1-down {
+        value 108;
+        description
+          "severely Errored Seconds Count on TCM1 down direction.";
+      }
+      enum severelyErroredSecondsTCM2-down {
+        value 109;
+        description
+          "severely Errored Seconds Count on TCM2 down direction.";
+      }
+      enum severelyErroredSecondsTCM3-down {
+        value 110;
+        description
+          "severely Errored Seconds Count on TCM3 down direction.";
+      }
+      enum severelyErroredSecondsTCM4-down {
+        value 111;
+        description
+          "severely Errored Seconds Count on TCM4 down direction.";
+      }
+      enum severelyErroredSecondsTCM5-down {
+        value 112;
+        description
+          "severely Errored Seconds Count on TCM5 down direction.";
+      }
+      enum severelyErroredSecondsTCM6-down {
+        value 113;
+        description
+          "severely Errored Seconds Count on TCM6 down direction.";
+      }
+      enum unavailableSecondsTCM1-down {
+        value 114;
+        description
+          "unavailable Seconds Count on TCM1 down direction.";
+      }
+      enum unavailableSecondsTCM2-down {
+        value 115;
+        description
+          "unavailable Seconds Count on TCM2 down direction.";
+      }
+      enum unavailableSecondsTCM3-down {
+        value 116;
+        description
+          "unavailable Seconds Count on TCM3 down direction.";
+      }
+      enum unavailableSecondsTCM4-down {
+        value 117;
+        description
+          "unavailable Seconds Count on TCM4 down direction.";
+      }
+      enum unavailableSecondsTCM5-down {
+        value 118;
+        description
+          "unavailable Seconds Count on TCM5 down direction.";
+      }
+      enum unavailableSecondsTCM6-down {
+        value 119;
+        description
+          "unavailable Seconds Count on TCM6 down direction.";
+      }
+      enum fecCorrectedCodewords {
+        value 120;
+        description
+          "FEC Corrected Codewords Counter";
+      }
+      enum fecUncorrectedCodewords {
+        value 121;
+        description
+          "FEC Uncorrected Codewords Counter";
+      }
+      enum fecSymbolErrors {
+        value 122;
+        description
+          "FEC Symbol Error Counter";
+      }
+      enum localFaultSeconds {
+        value 123;
+        description
+          "Local Fault Seconds";
+      }
+      enum remoteFaultSeconds {
+        value 124;
+        description
+          "Remote Fault Seconds";
+      }
+    }
+  }
+
+  grouping pm-measurement {
+    description
+      "Set of parameters related to a PM Measurement";
+    leaf pmParameterValue {
+      type pm-data-type;
+      config false;
+      mandatory true;
+    }
+    leaf pmParameterUnit {
+      type string;
+      mandatory false;
+      description
+        "Unit PM parameter has been measured - frames, packets, u, etc";
+    }
+    leaf validity {
+      type validity;
+      mandatory false;
+    }
+  }
+
+  grouping pm-names {
+    description
+      "Name of PM parameter. Consists of a set list of parameters,
+       plus an extension field to support addition parameters.";
+    leaf type {
+      type pm-names-enum;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      description
+        "name of parameter, when enum value set to vendorExtension because
+         name not found in pm-names-enum";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-pm@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-pm@2020-05-29.yang
new file mode 100644 (file)
index 0000000..44b9328
--- /dev/null
@@ -0,0 +1,361 @@
+module org-openroadm-pm {
+  namespace "http://org/openroadm/pm";
+  prefix org-openroadm-pm;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-alarm-pm-types {
+    prefix org-openroadm-common-alarm-pm-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-resource {
+    prefix org-openroadm-resource;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-pm-types {
+    prefix org-openroadm-pm-types;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of performance management.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  feature historical-pm-retrieval {
+    description
+      "The device supports the ability to directly retrieve the historical
+       PM data from the YANG model.";
+  }
+
+  grouping current-pm-group {
+    description
+      "PM Data with current values - both realtime (granularity=notApplicable)
+       and binned (granularity=15 minute, 24h))";
+    leaf pm-resource-instance {
+      type instance-identifier;
+      config false;
+      mandatory true;
+      description
+        "Retrieves all PM associate with the resource instance";
+    }
+    leaf pm-resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      config false;
+      mandatory true;
+      description
+        "The supported pm-resource-type associated with the given resource instance.";
+    }
+    leaf pm-resource-type-extension {
+      type string;
+      config false;
+      description
+        "The resource type extension when the type is not defined in the resource-type-enum.";
+    }
+    leaf start-time {
+      type yang:date-and-time;
+      config false;
+      mandatory true;
+      description
+        "Represents the start time of the bin (15m, 24h granularity) or the start of data collection (notApplicable/untimed granularity).";
+    }
+    leaf retrieval-time {
+      type yang:date-and-time;
+      config false;
+      mandatory true;
+      description
+        "Represents the time when the data is being read, not the bin start or end time.";
+    }
+    list current-pm {
+      key "type extension location direction";
+      config false;
+      uses current-pm-val-group;
+    }
+  }
+
+  grouping current-pm-val-group {
+    uses org-openroadm-pm-types:pm-names;
+    leaf location {
+      type org-openroadm-common-alarm-pm-types:location;
+    }
+    leaf direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+    }
+    list measurement {
+      key "granularity";
+      leaf granularity {
+        type org-openroadm-pm-types:pm-granularity;
+      }
+      uses org-openroadm-pm-types:pm-measurement;
+    }
+  }
+
+  grouping historical-pm-group {
+    description
+      "PM Data with historical values - binned (granularity=15 minute, 24h))";
+    leaf pm-resource-instance {
+      type instance-identifier;
+      config false;
+      mandatory true;
+      description
+        "Retrieves all PM associate with the resource instance";
+    }
+    leaf pm-resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      config false;
+      mandatory true;
+    }
+    leaf pm-resource-type-extension {
+      type string;
+      config false;
+      description
+        "The resource type extension when the type is not defined in the resource-type-enum.";
+    }
+    list historical-pm {
+      key "type extension location direction";
+      uses historical-pm-val-group;
+    }
+  }
+
+  grouping historical-pm-val-group {
+    description
+      "PM Data with historical values";
+    uses org-openroadm-pm-types:pm-names;
+    leaf location {
+      type org-openroadm-common-alarm-pm-types:location;
+    }
+    leaf direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+    }
+    list measurement {
+      key "granularity bin-number";
+      leaf granularity {
+        type org-openroadm-pm-types:pm-granularity;
+        mandatory true;
+      }
+      leaf bin-number {
+        type uint16 {
+          range "1..max";
+        }
+        config false;
+        mandatory true;
+      }
+      uses org-openroadm-pm-types:pm-measurement;
+      leaf completion-time {
+        type yang:date-and-time;
+        config false;
+        mandatory true;
+        description
+          "The time at the end of the period; For example if bin starts at
+           01:15:00 and ends at 01:29:59, the completion-time is 01:29:59";
+      }
+    }
+  }
+
+  grouping collect-history-pm-group {
+    leaf pm-filename {
+      type string {
+        length "10..255";
+      }
+      mandatory true;
+      description
+        "The file name to write the historical PM data.
+         The controller should be able to use this name to retrieve the file via ftp/sftp.
+         The file name should be unique for each RPC request since a new RPC request
+         could be initiated while the file transfer of the previous file is still in progress.
+
+         The file content should be written in xml format based on the historical-pm-list
+         yang definition and the file should be gzip compressed.";
+    }
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+
+  rpc clear-pm {
+    description
+      "Command to initialize PM data";
+    input {
+      uses org-openroadm-resource:resource;
+      leaf pm-type {
+        type enumeration {
+          enum current {
+            value 1;
+          }
+          enum all {
+            value 2;
+          }
+        }
+        default "current";
+      }
+      leaf granularity {
+        type org-openroadm-pm-types:pm-granularity;
+        default "15min";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc collect-historical-pm-file {
+    description
+      "Command to query historical PM data.
+       The device should be able to process an rpc request for 15min data
+       and a separate request for 24hour data in parallel.";
+    input {
+      leaf from-bin-number {
+        type uint16 {
+          range "1..max";
+        }
+        default "1";
+        description
+          "The start bin-number of the range";
+      }
+      leaf to-bin-number {
+        type uint16 {
+          range "1..max";
+        }
+        default "1";
+        description
+          "The end bin-number of the range";
+      }
+      leaf granularity {
+        type org-openroadm-pm-types:pm-granularity;
+        default "15min";
+        description
+          "The granularity of the retrieve, default to 15 minutes PM";
+      }
+    }
+    output {
+      uses collect-history-pm-group;
+    }
+  }
+
+  notification historical-pm-collect-result {
+    description
+      "This Notification is sent when the pm collection is successful or failed.";
+    uses collect-history-pm-group;
+  }
+
+  container current-pm-list {
+    config false;
+    description
+      "List of current PMs.";
+    list current-pm-entry {
+      key "pm-resource-type pm-resource-type-extension pm-resource-instance";
+      description
+        "List of current PM entries";
+      uses current-pm-group;
+    }
+  }
+  container historical-pm-list {
+    if-feature "historical-pm-retrieval";
+    config false;
+    description
+      "List of historical PM";
+    list historical-pm-entry {
+      key "pm-resource-type pm-resource-type-extension pm-resource-instance";
+      description
+        "List of historical PM entries";
+      uses historical-pm-group;
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-port-types@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-port-types@2020-03-27.yang
new file mode 100644 (file)
index 0000000..ce0bc86
--- /dev/null
@@ -0,0 +1,440 @@
+module org-openroadm-port-types {
+  namespace "http://org/openroadm/port/types";
+  prefix org-openroadm-port-types;
+
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for port types.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  identity supported-if-capability {
+    description
+      "Base identity from which specific supported interfaces are derived";
+  }
+
+  identity if-100GE {
+    base supported-if-capability;
+  }
+
+  identity if-200GE {
+    base supported-if-capability;
+  }
+
+  identity if-400GE {
+    base supported-if-capability;
+  }
+
+  identity if-OMS {
+    base supported-if-capability;
+  }
+
+  identity if-OTS {
+    base supported-if-capability;
+  }
+
+  identity if-OTS-OMS-MC-NMC {
+    base supported-if-capability;
+  }
+
+  identity if-NMC {
+    base supported-if-capability;
+  }
+
+  identity if-OCH {
+    base supported-if-capability;
+  }
+
+  identity if-1GE {
+    base supported-if-capability;
+  }
+
+  identity if-10GE {
+    base supported-if-capability;
+  }
+
+  identity if-40GE {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU1-ODU1 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU2-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU2E-ODU2E {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU3-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-OCH-OTU4-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-OTUCn-ODUCn {
+    base supported-if-capability;
+  }
+
+  identity if-otsi-flexo-flexogroup {
+    base supported-if-capability;
+  }
+
+  identity if-otsi-otsigroup {
+    base supported-if-capability;
+  }
+
+  identity if-n-OTU4-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-otsi-otucn-oducn {
+    base supported-if-capability;
+    status obsolete;
+  }
+
+  identity if-OTU4-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU1-ODU1 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU2-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-OTU2e-ODU2e {
+    base supported-if-capability;
+  }
+
+  identity if-OTU3-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-1GE-ODU0 {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-ODU2 {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-ODU2e {
+    base supported-if-capability;
+  }
+
+  identity if-10GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-25GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity if-40GE-ODU3 {
+    base supported-if-capability;
+  }
+
+  identity if-40GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-100GE-ODU4 {
+    base supported-if-capability;
+  }
+
+  identity if-100GE-oduflexgfp {
+    base supported-if-capability;
+  }
+
+  identity if-200GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity if-400GE-odufleximp {
+    base supported-if-capability;
+  }
+
+  identity if-400GE-oduflexcbr {
+    base supported-if-capability;
+  }
+
+  identity supported-xpdr-capability {
+    description
+      "Base identity from which specific supported xponder are derived";
+  }
+
+  identity Transponder {
+    base supported-xpdr-capability;
+  }
+
+  identity Regen {
+    base supported-xpdr-capability;
+  }
+
+  identity pluggable-identifiers-identity {
+    description
+      "Pluggable identifiers type";
+  }
+
+  identity SFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP-plus {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP28 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP-DD {
+    base pluggable-identifiers-identity;
+  }
+
+  identity DWDM-SFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity DWDM-SFP-plus {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP-plus {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP28 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP28-DD {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP-DD {
+    base pluggable-identifiers-identity;
+  }
+
+  identity micro-QSFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity OSFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP2 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP4 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP8 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP2-ACO {
+    base pluggable-identifiers-identity;
+  }
+
+  identity CFP2-DCO {
+    base pluggable-identifiers-identity;
+  }
+
+  identity XFP {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP56 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP56 {
+    base pluggable-identifiers-identity;
+  }
+
+  identity QSFP56-DD {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP-other {
+    base pluggable-identifiers-identity;
+  }
+
+  identity SFP-unspecified {
+    base pluggable-identifiers-identity;
+  }
+
+  identity pluggable-type-other {
+    base pluggable-identifiers-identity;
+  }
+
+  identity pluggable-type-unspecified {
+    base pluggable-identifiers-identity;
+  }
+
+  typedef port-wavelength-types {
+    type enumeration {
+      enum wavelength {
+        value 1;
+        description
+          "Port on a transponder or ROADM SRG add drop";
+      }
+      enum multi-wavelength {
+        value 2;
+        description
+          "External port connecting to other roadm.";
+      }
+    }
+    description
+      "Port types.";
+  }
+
+  typedef port-module-types {
+    type enumeration {
+      enum 100GBASE-LR4 {
+        value 1;
+      }
+      enum CWDM-4 {
+        value 2;
+      }
+    }
+    description
+      "Pluggable modue types.";
+  }
+
+  grouping common-port {
+    leaf port-power-capability-min-rx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the minimum power in the system spec for this port to
+         provide optimum function in rx direction";
+    }
+    leaf port-power-capability-min-tx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the minimum power in the system spec for this port to
+         provide optimum function in tx direction.";
+    }
+    leaf port-power-capability-max-rx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the maximum power in the system spec for this port to
+         provide optimum function in rx direction.";
+    }
+    leaf port-power-capability-max-tx {
+      type org-openroadm-common-link-types:power-dBm;
+      config false;
+      description
+        "Based on port capabilities, the maximum power in the system spec for this port to
+         provide optimum function in tx direction.";
+    }
+  }
+
+  grouping roadm-port {
+    uses common-port;
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-probable-cause@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-probable-cause@2020-05-29.yang
new file mode 100644 (file)
index 0000000..b327742
--- /dev/null
@@ -0,0 +1,890 @@
+module org-openroadm-probable-cause {
+  namespace "http://org/openroadm/probableCause";
+  prefix org-openroadm-probable-cause;
+
+  import org-openroadm-common-alarm-pm-types {
+    prefix org-openroadm-common-alarm-pm-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of Probable Causes.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef probable-cause-enum {
+    type enumeration {
+      enum vendorExtension {
+        value 1;
+        description
+          "vendorExtension";
+      }
+      enum openConnectionIndication {
+        value 2;
+        description
+          "Open connection indication (OCI)";
+        reference
+          "G.798";
+      }
+      enum alarmIndicationSignal {
+        value 3;
+        description
+          "Alarm indication signal";
+        reference
+          "G.798";
+      }
+      enum lossOfSignal {
+        value 4;
+        description
+          "Loss of Signal";
+      }
+      enum opticalLineFail {
+        value 5;
+        description
+          "Optical Line Fail";
+      }
+      enum opticalPowerDegraded {
+        value 6;
+        description
+          "Optical Power Degraded";
+      }
+      enum automaticLaserShutdown {
+        value 7;
+        description
+          "Automatic Laser Shutdown";
+      }
+      enum serverSignalFail {
+        value 8;
+        description
+          "Server Signal Fail (SSF)";
+        reference
+          "G.798";
+      }
+      enum lockedDefect {
+        value 10;
+        description
+          "Locked defect (LCK)";
+        reference
+          "G.798";
+      }
+      enum trailTraceIdentifierMismatch {
+        value 11;
+        description
+          "Trail trace Identifier Mismatch (TIM)";
+        reference
+          "G.798";
+      }
+      enum degradedDefect {
+        value 12;
+        description
+          "Degraded defect (DEG)";
+        reference
+          "G.798";
+      }
+      enum backwardsDefectIndication {
+        value 13;
+        description
+          "Backward Defect Indication (BDI)";
+        reference
+          "G.798";
+      }
+      enum otsSpanlossPowerOutOfSpecificationHigh {
+        value 14;
+      }
+      enum automaticShutoffDisabled {
+        value 15;
+      }
+      enum portLossOfLight {
+        value 17;
+      }
+      enum reflectionTooHigh {
+        value 18;
+      }
+      enum payloadMissingIndication {
+        value 22;
+        description
+          "Will be applicable to ROADM when OSC signaling supported in future (G.709 2016-06 Figure 15-1A, 1B)";
+      }
+      enum forwardDefectIndication {
+        value 23;
+        description
+          "Will be applicable to ROADM when OSC signaling supported in future (G.709 2016-06 Figure 15-1A, 1B)";
+      }
+      enum oscPowerOutOfSpecificationHigh {
+        value 24;
+      }
+      enum oscPowerOutOfSpecificationLow {
+        value 25;
+      }
+      enum powerOutOfSpecificationHigh {
+        value 26;
+      }
+      enum lossOfSynchronization {
+        value 27;
+      }
+      enum linkDown {
+        value 28;
+      }
+      enum equipmentFault {
+        value 29;
+      }
+      enum equipmentRemoved {
+        value 30;
+      }
+      enum equipmentMismatch {
+        value 31;
+      }
+      enum equipmentWarmup {
+        value 32;
+      }
+      enum equipmentLedOn {
+        value 33;
+      }
+      enum equipmentInterConnectFailure {
+        value 34;
+      }
+      enum equipmentMiscabledConnection {
+        value 35;
+      }
+      enum softwareVersionMismatch {
+        value 36;
+      }
+      enum softwareStageInProgress {
+        value 37;
+      }
+      enum databaseCorruption {
+        value 38;
+      }
+      enum databaseVersionMismatch {
+        value 44;
+      }
+      enum firmwareVersionMismatch {
+        value 46;
+      }
+      enum incompatibleFirmware {
+        value 49;
+      }
+      enum firmwareDownloadOrActivationFailure {
+        value 50;
+      }
+      enum firmwareInitInProgress {
+        value 51;
+      }
+      enum softwareReset {
+        value 52;
+      }
+      enum fanCoolingFail {
+        value 53;
+      }
+      enum administrativeDown {
+        value 54;
+      }
+      enum lampTest {
+        value 55;
+      }
+      enum powerProblemA {
+        value 56;
+      }
+      enum powerProblemB {
+        value 57;
+      }
+      enum shelfProvisioningMode {
+        value 58;
+      }
+      enum sysNameChanged {
+        value 59;
+      }
+      enum sysNtpNotSynchronized {
+        value 60;
+      }
+      enum lossOfFrame {
+        value 63;
+      }
+      enum lossOfMultiframe {
+        value 64;
+      }
+      enum backwardIncomingAlignmentError {
+        value 65;
+      }
+      enum incomingAlignmentError {
+        value 66;
+      }
+      enum payloadMismatch {
+        value 67;
+      }
+      enum clientSignalFailDefect {
+        value 68;
+      }
+      enum highBER {
+        value 123;
+      }
+      enum localFault {
+        value 124;
+      }
+      enum remoteFault {
+        value 125;
+      }
+      enum lossOfAlignment {
+        value 126;
+      }
+      enum lossOfFECAlignment {
+        value 127;
+      }
+      enum facilityLoopbackActive {
+        value 128;
+      }
+      enum facilityLoopback2Active {
+        value 129;
+      }
+      enum terminalLoopbackActive {
+        value 130;
+      }
+      enum facilityTestsignalActive {
+        value 131;
+      }
+      enum terminalTestsignalActive {
+        value 132;
+      }
+      enum certificateNotInstalled {
+        value 134;
+      }
+      enum lockoutOfProtection {
+        value 135;
+      }
+      enum forcedSwitchAwayFromWorking {
+        value 136;
+      }
+      enum forcedSwitchAwayFromProtect {
+        value 137;
+      }
+      enum automaticSwitchAwayFromWorkingDueToSF {
+        value 138;
+      }
+      enum automaticSwitchAwayFromProtectDueToSF {
+        value 139;
+      }
+      enum automaticSwitchDueToWTR {
+        value 140;
+      }
+      enum manualSwitchAwayFromWork {
+        value 141;
+      }
+      enum manualSwitchAwayFromProtect {
+        value 142;
+      }
+      enum automaticPowerReduction {
+        value 143;
+      }
+      enum lossOfSignalOSC {
+        value 144;
+      }
+      enum softwareValidateInProgress {
+        value 145;
+      }
+      enum databaseRollbackTimerInProgress {
+        value 146;
+      }
+      enum otdrScanInProgress {
+        value 147;
+      }
+      enum lldpFail {
+        value 148;
+      }
+      enum omsPowerOutOfSpecificationHigh {
+        value 149;
+      }
+      enum omsPowerOutOfSpecificationLow {
+        value 150;
+      }
+      enum automaticSwitchAwayFromWorkingDueToSD {
+        value 151;
+      }
+      enum automaticSwitchAwayFromProtectDueToSD {
+        value 152;
+      }
+      enum backwardIncomingAlignmentErrorTCM1-up {
+        value 153;
+      }
+      enum backwardIncomingAlignmentErrorTCM2-up {
+        value 154;
+      }
+      enum backwardIncomingAlignmentErrorTCM3-up {
+        value 155;
+      }
+      enum backwardIncomingAlignmentErrorTCM4-up {
+        value 156;
+      }
+      enum backwardIncomingAlignmentErrorTCM5-up {
+        value 157;
+      }
+      enum backwardIncomingAlignmentErrorTCM6-up {
+        value 158;
+      }
+      enum incomingAlignmentErrorTCM1-up {
+        value 159;
+      }
+      enum incomingAlignmentErrorTCM2-up {
+        value 160;
+      }
+      enum incomingAlignmentErrorTCM3-up {
+        value 161;
+      }
+      enum incomingAlignmentErrorTCM4-up {
+        value 162;
+      }
+      enum incomingAlignmentErrorTCM5-up {
+        value 163;
+      }
+      enum incomingAlignmentErrorTCM6-up {
+        value 164;
+      }
+      enum backwardsDefectIndicationTCM1-up {
+        value 165;
+      }
+      enum backwardsDefectIndicationTCM2-up {
+        value 166;
+      }
+      enum backwardsDefectIndicationTCM3-up {
+        value 167;
+      }
+      enum backwardsDefectIndicationTCM4-up {
+        value 168;
+      }
+      enum backwardsDefectIndicationTCM5-up {
+        value 169;
+      }
+      enum backwardsDefectIndicationTCM6-up {
+        value 170;
+      }
+      enum degradedDefectTCM1-up {
+        value 171;
+      }
+      enum degradedDefectTCM2-up {
+        value 172;
+      }
+      enum degradedDefectTCM3-up {
+        value 173;
+      }
+      enum degradedDefectTCM4-up {
+        value 174;
+      }
+      enum degradedDefectTCM5-up {
+        value 175;
+      }
+      enum degradedDefectTCM6-up {
+        value 176;
+      }
+      enum trailTraceIdentifierMisMatchTCM1-up {
+        value 177;
+      }
+      enum trailTraceIdentifierMisMatchTCM2-up {
+        value 178;
+      }
+      enum trailTraceIdentifierMisMatchTCM3-up {
+        value 179;
+      }
+      enum trailTraceIdentifierMisMatchTCM4-up {
+        value 180;
+      }
+      enum trailTraceIdentifierMisMatchTCM5-up {
+        value 181;
+      }
+      enum trailTraceIdentifierMisMatchTCM6-up {
+        value 182;
+      }
+      enum alarmIndicationSignalTCM1-up {
+        value 183;
+      }
+      enum alarmIndicationSignalTCM2-up {
+        value 184;
+      }
+      enum alarmIndicationSignalTCM3-up {
+        value 185;
+      }
+      enum alarmIndicationSignalTCM4-up {
+        value 186;
+      }
+      enum alarmIndicationSignalTCM5-up {
+        value 187;
+      }
+      enum alarmIndicationSignalTCM6-up {
+        value 188;
+      }
+      enum openConnectionIndicationTCM1-up {
+        value 189;
+      }
+      enum openConnectionIndicationTCM2-up {
+        value 190;
+      }
+      enum openConnectionIndicationTCM3-up {
+        value 191;
+      }
+      enum openConnectionIndicationTCM4-up {
+        value 192;
+      }
+      enum openConnectionIndicationTCM5-up {
+        value 193;
+      }
+      enum openConnectionIndicationTCM6-up {
+        value 194;
+      }
+      enum lockedDefectTCM1-up {
+        value 195;
+      }
+      enum lockedDefectTCM2-up {
+        value 196;
+      }
+      enum lockedDefectTCM3-up {
+        value 197;
+      }
+      enum lockedDefectTCM4-up {
+        value 198;
+      }
+      enum lockedDefectTCM5-up {
+        value 199;
+      }
+      enum lockedDefectTCM6-up {
+        value 200;
+      }
+      enum lossofTandemConnectionTCM1-up {
+        value 201;
+      }
+      enum lossofTandemConnectionTCM2-up {
+        value 202;
+      }
+      enum lossofTandemConnectionTCM3-up {
+        value 203;
+      }
+      enum lossofTandemConnectionTCM4-up {
+        value 204;
+      }
+      enum lossofTandemConnectionTCM5-up {
+        value 205;
+      }
+      enum lossofTandemConnectionTCM6-up {
+        value 206;
+      }
+      enum backwardIncomingAlignmentErrorTCM1-down {
+        value 207;
+      }
+      enum backwardIncomingAlignmentErrorTCM2-down {
+        value 208;
+      }
+      enum backwardIncomingAlignmentErrorTCM3-down {
+        value 209;
+      }
+      enum backwardIncomingAlignmentErrorTCM4-down {
+        value 210;
+      }
+      enum backwardIncomingAlignmentErrorTCM5-down {
+        value 211;
+      }
+      enum backwardIncomingAlignmentErrorTCM6-down {
+        value 212;
+      }
+      enum incomingAlignmentErrorTCM1-down {
+        value 213;
+      }
+      enum incomingAlignmentErrorTCM2-down {
+        value 214;
+      }
+      enum incomingAlignmentErrorTCM3-down {
+        value 215;
+      }
+      enum incomingAlignmentErrorTCM4-down {
+        value 216;
+      }
+      enum incomingAlignmentErrorTCM5-down {
+        value 217;
+      }
+      enum incomingAlignmentErrorTCM6-down {
+        value 218;
+      }
+      enum backwardsDefectIndicationTCM1-down {
+        value 219;
+      }
+      enum backwardsDefectIndicationTCM2-down {
+        value 220;
+      }
+      enum backwardsDefectIndicationTCM3-down {
+        value 221;
+      }
+      enum backwardsDefectIndicationTCM4-down {
+        value 222;
+      }
+      enum backwardsDefectIndicationTCM5-down {
+        value 223;
+      }
+      enum backwardsDefectIndicationTCM6-down {
+        value 224;
+      }
+      enum degradedDefectTCM1-down {
+        value 225;
+      }
+      enum degradedDefectTCM2-down {
+        value 226;
+      }
+      enum degradedDefectTCM3-down {
+        value 227;
+      }
+      enum degradedDefectTCM4-down {
+        value 228;
+      }
+      enum degradedDefectTCM5-down {
+        value 229;
+      }
+      enum degradedDefectTCM6-down {
+        value 230;
+      }
+      enum trailTraceIdentifierMisMatchTCM1-down {
+        value 231;
+      }
+      enum trailTraceIdentifierMisMatchTCM2-down {
+        value 232;
+      }
+      enum trailTraceIdentifierMisMatchTCM3-down {
+        value 233;
+      }
+      enum trailTraceIdentifierMisMatchTCM4-down {
+        value 234;
+      }
+      enum trailTraceIdentifierMisMatchTCM5-down {
+        value 235;
+      }
+      enum trailTraceIdentifierMisMatchTCM6-down {
+        value 236;
+      }
+      enum alarmIndicationSignalTCM1-down {
+        value 237;
+      }
+      enum alarmIndicationSignalTCM2-down {
+        value 238;
+      }
+      enum alarmIndicationSignalTCM3-down {
+        value 239;
+      }
+      enum alarmIndicationSignalTCM4-down {
+        value 240;
+      }
+      enum alarmIndicationSignalTCM5-down {
+        value 241;
+      }
+      enum alarmIndicationSignalTCM6-down {
+        value 242;
+      }
+      enum openConnectionIndicationTCM1-down {
+        value 243;
+      }
+      enum openConnectionIndicationTCM2-down {
+        value 244;
+      }
+      enum openConnectionIndicationTCM3-down {
+        value 245;
+      }
+      enum openConnectionIndicationTCM4-down {
+        value 246;
+      }
+      enum openConnectionIndicationTCM5-down {
+        value 247;
+      }
+      enum openConnectionIndicationTCM6-down {
+        value 248;
+      }
+      enum lockedDefectTCM1-down {
+        value 249;
+      }
+      enum lockedDefectTCM2-down {
+        value 250;
+      }
+      enum lockedDefectTCM3-down {
+        value 251;
+      }
+      enum lockedDefectTCM4-down {
+        value 252;
+      }
+      enum lockedDefectTCM5-down {
+        value 253;
+      }
+      enum lockedDefectTCM6-down {
+        value 254;
+      }
+      enum lossofTandemConnectionTCM1-down {
+        value 255;
+      }
+      enum lossofTandemConnectionTCM2-down {
+        value 256;
+      }
+      enum lossofTandemConnectionTCM3-down {
+        value 257;
+      }
+      enum lossofTandemConnectionTCM4-down {
+        value 258;
+      }
+      enum lossofTandemConnectionTCM5-down {
+        value 259;
+      }
+      enum lossofTandemConnectionTCM6-down {
+        value 260;
+      }
+      enum multiplexStructureIdentifierMismatch {
+        value 261;
+        description
+          "G798 : 6.2.9 (dMSIM)";
+      }
+      enum lossOfOmfIndication {
+        value 262;
+        description
+          "G798 : 14.3.10.2 Figure 14-73 (dLOOMFI)";
+      }
+      enum lossOfFrameAndLossOfMultiframe {
+        value 263;
+        description
+          "G798 : 6.2.5.3 (dLOFLOM)";
+      }
+      enum lossOfDatabaseRedundancy {
+        value 264;
+        description
+          "loss of database redundancy";
+      }
+      enum databaseLocked {
+        value 265;
+        description
+          "Database locked";
+      }
+      enum createTechInfoInProgress {
+        value 266;
+        description
+          "create-tech-info in progress";
+      }
+      enum circuitPackActivateFailed {
+        value 267;
+        description
+          "circuit-pack activation failed";
+      }
+      enum softwareSubsystemFailed {
+        value 268;
+        description
+          "Software subsystem failed";
+      }
+      enum diskFull {
+        value 269;
+        description
+          "Disk full";
+      }
+      enum lossOfSignalPayload {
+        value 270;
+        description
+          "Loss Of Signal Payload";
+        reference
+          "G.798 6.2.1.2 dLOS-P, 16.8.2 OTSi/FlexO_A_Sk";
+      }
+      enum lossOfLaneAlignment {
+        value 271;
+        description
+          "Loss Of Lane Alignment";
+        reference
+          "G.798 15.3.1.2 FlexO-n/OTUCn_A_Sk that dLOL if the alignment process is in OLA state;
+           16.7.2 (OTSi/FlexO-1-SC_A_Sk) (G.709.3) & 16.8.2 (OTSiG/FlexO_A_Sk) (G.709.1)
+           that dLOL based on the FEC alignment state diagram";
+      }
+      enum groupIdMismatch {
+        value 272;
+        description
+          "Group Id Mismatch";
+        reference
+          "G.798 dGIDM in Annex B.1.1.2.1; G.798 15.3.1.2 FlexO-n/OTUCn_A_Sk";
+      }
+      enum flexoMapMismatch {
+        value 273;
+        description
+          "FlexO Map Mismatch";
+        reference
+          "G.798 dFMM in Annex B.1.1.2.2; G.798 15.3.1.2 FlexO-n/OTUCn_A_Sk";
+      }
+      enum powerOutOfSpecificationLow {
+        value 274;
+      }
+      enum gfpLossOfFrameDelineation {
+        value 275;
+        description
+          "GFP loss of frame delineation (dLFD G.806:6.2.5.2) is raised when the frame delineation process (clause 6.3.1 of [ITU-T G.7041]) is not in the 'SYNC' state";
+      }
+      enum cmfLossOfSignal {
+        value 276;
+        description
+          "GFP client signal fail (dCSF G.806:6.2.6.4.1) is raised when a GFP frame with correct tHEC, with aPTI = '100' and a valid UPI code 0x01(G.7041: Table 6-4) is received";
+      }
+      enum cmfLossOfSync {
+        value 277;
+        description
+          "GFP client signal fail (dCSF G.806:6.2.6.4.1) is raised when a GFP frame with correct tHEC, with aPTI = '100' and a valid UPI code 0x02(G.7041: Table 6-4) is received";
+      }
+      enum cmfForwardDefectIndication {
+        value 278;
+        description
+          "GFP client signal fail (dCSF G.806:6.2.6.4.1) is raised when a GFP frame with correct tHEC, with aPTI = '100' and a valid UPI code 0x04(G.7041: Table 6-4) is received";
+      }
+      enum cmfReverseDefectIndication {
+        value 279;
+        description
+          "GFP client signal fail (dCSF G.806:6.2.6.4.1) is raised when a GFP frame with correct tHEC, with aPTI = '100' and a valid UPI code 0x05(G.7041: Table 6-4) is received";
+      }
+      enum localDegradedSER {
+        value 280;
+        description
+          "Local Degraded SER";
+        reference
+          "IEEE 802.3-2018  Section 45.2.3.60.1,  IEEE 802.3-2018  Section 119";
+      }
+      enum remoteDegradedSER {
+        value 281;
+        description
+          "Remote Degraded SER";
+        reference
+          "IEEE 802.3-2018  Section 45.2.3.60.2,  IEEE 802.3-2018  Section 119";
+      }
+      enum fecDegradedSER {
+        value 282;
+        description
+          "PCS FEC Degrade SER";
+        reference
+          "IEEE 802.3-2018  Section 119";
+      }
+      enum farEndFaultIndication {
+        value 283;
+        description
+          "Far End Fault Indication";
+        reference
+          "IEEE 802.3-2018 Section 24.3.2.1";
+      }
+    }
+    description
+      "probable cause group";
+  }
+
+  grouping probable-cause {
+    leaf cause {
+      type probable-cause-enum;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      mandatory false;
+    }
+    leaf direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+      mandatory true;
+      description
+        "Direction indication of the alarm.";
+    }
+    leaf location {
+      type org-openroadm-common-alarm-pm-types:location;
+      mandatory true;
+      description
+        "location indication of the alarm.";
+    }
+    leaf type {
+      type enumeration {
+        enum communication {
+          value 1;
+        }
+        enum qualityOfService {
+          value 2;
+        }
+        enum processingError {
+          value 3;
+        }
+        enum equipment {
+          value 4;
+        }
+        enum environmental {
+          value 5;
+        }
+      }
+      mandatory false;
+      description
+        "Type of alarm. Based on X.733 event Type.";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-resource-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-resource-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..1a5bd66
--- /dev/null
@@ -0,0 +1,374 @@
+module org-openroadm-resource-types {
+  namespace "http://org/openroadm/resource/types";
+  prefix org-openroadm-resource-types;
+
+  import org-openroadm-common-node-types {
+    prefix org-openroadm-common-node-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common resource types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef resource-type-enum {
+    type enumeration {
+      enum other {
+        value 1;
+        description
+          "Resource of type not found in list.";
+      }
+      enum device {
+        value 2;
+        description
+          "device - ROAMD, Xponder, etc";
+      }
+      enum degree {
+        value 3;
+        description
+          "degree";
+      }
+      enum shared-risk-group {
+        value 4;
+        description
+          "shared-risk-group";
+      }
+      enum connection {
+        value 5;
+        description
+          "connection - this is used by roadm-connection and odu-connection
+           since they are mutually exclusive in the model";
+      }
+      enum connection-map {
+        value 6;
+        description
+          "connection-map";
+      }
+      enum port {
+        value 7;
+        description
+          "port";
+      }
+      enum circuit-pack {
+        value 8;
+        description
+          "circuit pack";
+      }
+      enum internal-link {
+        value 9;
+        description
+          "internal-link";
+      }
+      enum physical-link {
+        value 10;
+        description
+          "physical-link";
+      }
+      enum interface {
+        value 11;
+        description
+          "interface";
+      }
+      enum shelf {
+        value 12;
+        description
+          "shelf";
+      }
+      enum service {
+        value 13;
+        description
+          "service";
+      }
+      enum odu-sncp-pg {
+        value 14;
+        description
+          "odu-sncp-pg";
+      }
+      enum line-amplifier {
+        value 15;
+        description
+          "line-amplifier";
+      }
+      enum xponder {
+        value 16;
+        description
+          "xponder";
+      }
+      enum versioned-service {
+        value 17;
+        description
+          "versioned-service";
+      }
+      enum temp-service {
+        value 18;
+        description
+          "temp-service";
+      }
+    }
+  }
+
+  typedef resource-notification-type {
+    type enumeration {
+      enum resourceCreation {
+        value 1;
+        description
+          "A new instance of a resource has been created.";
+      }
+      enum resourceModification {
+        value 2;
+        description
+          "An existing instance of a resource has been modified. This shall be triggered by changes in configuration, state, status etc.
+           It shall not be triggered by changes in performance measurements, power and temperature readings or any other data that is highly volatile. ";
+      }
+      enum resourceDeletion {
+        value 3;
+        description
+          "An existing instance of a resource has been removed.";
+      }
+    }
+    description
+      "Type of notification about a resource";
+  }
+
+  grouping resource-type {
+    leaf type {
+      type resource-type-enum;
+      mandatory true;
+    }
+    leaf extension {
+      type string;
+      mandatory false;
+    }
+  }
+
+  grouping device-id {
+    description
+      "Device identifier. Unique within the Controller.";
+    leaf node-id {
+      type org-openroadm-common-node-types:node-id-type;
+      description
+        "Node Id is a globally unique identifier for a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping circuit-pack-name {
+    leaf circuit-pack-name {
+      type string;
+      mandatory true;
+      description
+        "Circuit-Pack identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping port-name {
+    uses circuit-pack-name;
+    leaf port-name {
+      type string;
+      description
+        "Port identifier. Unique within the context of a circuit-pack.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping physical-link-name {
+    leaf physical-link-name {
+      type string;
+      mandatory true;
+      description
+        "Physical Link identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping internal-link-name {
+    leaf internal-link-name {
+      type string;
+      mandatory true;
+      description
+        "Internal Link identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping connection-name {
+    leaf connection-name {
+      type string;
+      description
+        "Connection name. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping degree-number {
+    leaf degree-number {
+      type uint16;
+      description
+        "Degree identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping srg-number {
+    leaf srg-number {
+      type uint16;
+      description
+        "Shared Risk Group identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping shelf-name {
+    leaf shelf-name {
+      type string;
+      mandatory true;
+      description
+        "Shelf-id identifier. Unique within the context of a device.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping service-name {
+    leaf service-name {
+      type string;
+      mandatory true;
+      description
+        "Service identifier. Unique within the context of a network.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping versioned-service-name {
+    leaf versioned-service-name {
+      type string;
+      mandatory true;
+      description
+        "Service identifier. Unique within the context of a network.
+         Same as leafref value in model, if applicable.";
+    }
+    leaf version-number {
+      type uint64;
+      mandatory true;
+      description
+        "version-number of the service";
+    }
+  }
+
+  grouping temp-service-name {
+    leaf common-id {
+      type string;
+      mandatory true;
+      description
+        "Service identifier. Unique within the context of a network.
+         Same as leafref value in model, if applicable.";
+    }
+  }
+
+  grouping interface-name {
+    leaf interface-name {
+      type string;
+      mandatory true;
+      description
+        "Interface identifier.";
+    }
+  }
+
+  grouping other-resource-id {
+    leaf other-resource-id {
+      type string;
+      mandatory true;
+      description
+        "resource-id for other.";
+    }
+  }
+
+  grouping odu-sncp-pg-name {
+    leaf odu-sncp-pg-name {
+      type string;
+      mandatory true;
+      description
+        "name of the odu-snc-pg";
+    }
+  }
+
+  grouping amp-number {
+    leaf amp-number {
+      type uint8;
+      mandatory true;
+      description
+        "number of the line-amplifier";
+    }
+  }
+
+  grouping xpdr-number {
+    leaf xpdr-number {
+      type uint16;
+      mandatory true;
+      description
+        "number of the xponder";
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-resource@2020-05-29.yang b/ordmodels/common/src/main/yang/org-openroadm-resource@2020-05-29.yang
new file mode 100644 (file)
index 0000000..d8c2b42
--- /dev/null
@@ -0,0 +1,366 @@
+module org-openroadm-resource {
+  namespace "http://org/openroadm/resource";
+  prefix org-openroadm-resource;
+
+  import org-openroadm-interfaces {
+    prefix org-openroadm-interfaces;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of resources.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping eth-attributes {
+    leaf speed {
+      type uint32;
+      description
+        "Set speed of the interface, unit mbps.
+         This is for ETH facility. ";
+    }
+  }
+
+  grouping mc-ttp-attributes {
+    description
+      "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
+    leaf min-freq {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+    }
+    leaf max-freq {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+    }
+  }
+
+  grouping nmc-ctp-attributes {
+    description
+      "Network Media Channel attributes";
+    leaf frequency {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Center Frequency in THz.  This is not constrained by mc-capabilities.  It must fit (when combined with width) inside any containing media channel.";
+    }
+    leaf width {
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config true;
+      description
+        "Frequency width in GHz.  This is not constrained by mc-capabilities.  It must fit (when combined with frequency) inside any containing media channel.";
+    }
+  }
+
+  grouping och-attributes {
+    description
+      "Optical Channel attributes";
+    leaf rate {
+      type identityref {
+        base org-openroadm-common-optical-channel-types:och-rate-identity;
+      }
+      description
+        "rate";
+    }
+    leaf frequency {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      description
+        "Center Frequency in THz.";
+    }
+    leaf width {
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config false;
+      description
+        "Frequency width in GHz.";
+    }
+    leaf modulation-format {
+      type org-openroadm-common-optical-channel-types:modulation-format;
+      description
+        "Modulation format";
+    }
+  }
+
+  grouping odu-attributes {
+    description
+      "ODU attributes";
+    leaf rate {
+      type identityref {
+        base org-openroadm-otn-common-types:odu-rate-identity;
+      }
+      description
+        "rate identity of the ODU. 'identityref' is used
+         to allow to extend for future higher rates";
+    }
+    container parent-odu-allocation {
+      description
+        "parent odu allocation";
+      leaf trib-port-number {
+        type uint16 {
+          range "1 .. 80";
+        }
+        description
+          "Assigned tributary port number in parent OPU";
+      }
+      leaf-list trib-slots {
+        type uint16 {
+          range "1 .. 80";
+        }
+        min-elements 1;
+        max-elements 80;
+        description
+          "Assigned trib slots occupied in parent OPU MSI";
+      }
+    }
+  }
+
+  grouping otu-attributes {
+    description
+      "OTU attributes";
+    leaf rate {
+      type identityref {
+        base org-openroadm-otn-common-types:otu-rate-identity;
+      }
+      description
+        "rate identity of the OTU. 'identityref' is used
+         to allow to extend for future higher rates";
+    }
+  }
+
+  grouping resource-reporting {
+    leaf type {
+      type identityref {
+        base org-openroadm-interfaces:interface-type;
+      }
+      mandatory true;
+      description
+        "The type of the interface.";
+    }
+    container ethernet {
+      when "../type = 'ethernetCsmacd'";
+      description
+        "Ethernet Interfaces";
+      uses eth-attributes;
+    }
+    container mc-ttp {
+      when "../type = 'mediaChannelTrailTerminationPoint'";
+      description
+        "Media Channel Trail Termination Point (MC-TTP)";
+      uses mc-ttp-attributes;
+    }
+    container nmc-ctp {
+      when "../type = 'networkMediaChannelConnectionTerminationPoint'";
+      description
+        "Network Media Channel Connection Termination Point (NMC-CTP)";
+      uses nmc-ctp-attributes;
+    }
+    container och {
+      when "../type = 'opticalChannel'";
+      description
+        "Optical Channel (OCh):
+         Models the optical channel interfaces for an Optical White Box.";
+      uses och-attributes;
+    }
+    container odu {
+      when "../type = 'otnOdu'";
+      presence "Attribute Nodes for Optical Data Unit (ODU)";
+      description
+        "Optical Channel Data Unit (ODU)";
+      uses odu-attributes;
+    }
+    container otu {
+      when "../type = 'otnOtu'";
+      description
+        "Optical Channel Transport Unit (OTU)";
+      uses otu-attributes;
+    }
+  }
+
+  grouping resource {
+    description
+      "This resource identifier is intended to provide a generic identifier
+       for any resource that can be used without specific knowledge of
+       the resource.";
+    container device {
+      description
+        "Device of the resource, used only when the system using this
+         model report on more than one device. ";
+      uses org-openroadm-resource-types:device-id;
+    }
+    container resource {
+      choice resource {
+        case circuit-pack {
+          uses org-openroadm-resource-types:circuit-pack-name;
+        }
+        case port {
+          container port {
+            uses org-openroadm-resource-types:port-name;
+          }
+        }
+        case connection {
+          uses org-openroadm-resource-types:connection-name {
+            refine "connection-name" {
+              mandatory true;
+            }
+          }
+        }
+        case physical-link {
+          uses org-openroadm-resource-types:physical-link-name;
+        }
+        case internal-link {
+          uses org-openroadm-resource-types:internal-link-name;
+        }
+        case shelf {
+          uses org-openroadm-resource-types:shelf-name;
+        }
+        case srg {
+          uses org-openroadm-resource-types:srg-number {
+            refine "srg-number" {
+              mandatory true;
+            }
+          }
+        }
+        case degree {
+          uses org-openroadm-resource-types:degree-number {
+            refine "degree-number" {
+              mandatory true;
+            }
+          }
+        }
+        case service {
+          uses org-openroadm-resource-types:service-name;
+        }
+        case interface {
+          uses org-openroadm-resource-types:interface-name;
+        }
+        case odu-sncp-pg {
+          uses org-openroadm-resource-types:odu-sncp-pg-name;
+        }
+        case other {
+          uses org-openroadm-resource-types:other-resource-id;
+        }
+        case device {
+          uses org-openroadm-resource-types:device-id {
+            refine "node-id" {
+              mandatory true;
+            }
+          }
+        }
+        case line-amplifier {
+          uses org-openroadm-resource-types:amp-number;
+        }
+        case xponder {
+          uses org-openroadm-resource-types:xpdr-number;
+        }
+        case versioned-service {
+          uses org-openroadm-resource-types:versioned-service-name;
+        }
+        case temp-service {
+          uses org-openroadm-resource-types:temp-service-name;
+        }
+      }
+    }
+    container resourceType {
+      uses org-openroadm-resource-types:resource-type;
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-service-format@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-service-format@2019-11-29.yang
new file mode 100644 (file)
index 0000000..a2dedcb
--- /dev/null
@@ -0,0 +1,78 @@
+module org-openroadm-service-format {
+  namespace "http://org/openroadm/service-format";
+  prefix org-openroadm-service-format;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of service format.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+
+  typedef service-format {
+    type enumeration {
+      enum Ethernet {
+        value 1;
+      }
+      enum OTU {
+        value 2;
+      }
+      enum OC {
+        value 3;
+      }
+      enum STM {
+        value 4;
+      }
+      enum OMS {
+        value 5;
+      }
+      enum ODU {
+        value 6;
+      }
+      enum OTM {
+        value 7;
+      }
+      enum other {
+        value 8;
+        description
+          "Used in bookending use case when service-format is not standardized by the Open ROADM MSA.
+           When set to other, the specific service format/rate is specified by other-service-format-and-rate";
+      }
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-switching-pool-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..a698a3f
--- /dev/null
@@ -0,0 +1,63 @@
+module org-openroadm-switching-pool-types {
+  namespace "http://org/openroadm/switching-pool-types";
+  prefix org-openroadm-switching-pool-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of common types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+
+  typedef switching-pool-types {
+    type enumeration {
+      enum non-blocking {
+        value 1;
+        description
+          "Single non-blocking element";
+      }
+      enum blocking {
+        value 2;
+        description
+          "Multiple connected non-blocking lists";
+      }
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-tca@2020-03-27.yang b/ordmodels/common/src/main/yang/org-openroadm-tca@2020-03-27.yang
new file mode 100644 (file)
index 0000000..9e6c853
--- /dev/null
@@ -0,0 +1,284 @@
+module org-openroadm-tca {
+  namespace "http://org/openroadm/tca";
+  prefix org-openroadm-tca;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-common-alarm-pm-types {
+    prefix org-openroadm-common-alarm-pm-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-pm-types {
+    prefix org-openroadm-pm-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of Threshold Crossing Alert types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-08-28 {
+    description
+      "Version 2.0.2 - added back the missing pmParameterName container";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef threshold-enum {
+    type enumeration {
+      enum high {
+        value 1;
+        description
+          "enum value for high";
+      }
+      enum low {
+        value 2;
+        description
+          "enum value for low";
+      }
+    }
+    description
+      "typedef for threshold enum";
+  }
+
+  grouping tca-resource-grp {
+    description
+      "group for TCA resources";
+    leaf tca-resource-instance {
+      type instance-identifier;
+      mandatory true;
+      description
+        "Retrieves all TCA assciated with the resource instance";
+    }
+    leaf tca-resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      mandatory true;
+      description
+        "The supported tca-resource type associated with the given resource instance.";
+    }
+    leaf tca-resource-type-extension {
+      type string;
+      mandatory true;
+      description
+        "The resource type extension when the type is not defined in the resource-type-enum.";
+    }
+  }
+
+  grouping current-tca-group {
+    description
+      "TCA Data with current values";
+    uses tca-resource-grp;
+    leaf enabled {
+      type boolean;
+      mandatory true;
+      description
+        "Enable for the TCA entry";
+    }
+    list pm-entry {
+      key "type extension location direction";
+      description
+        "List of PM entries";
+      uses current-tca-pm-val-group;
+    }
+  }
+
+  grouping current-tca-pm-val-group {
+    description
+      "Grouping for the TCA PM";
+    uses org-openroadm-pm-types:pm-names;
+    leaf location {
+      type org-openroadm-common-alarm-pm-types:location;
+      description
+        "Location PM type";
+    }
+    leaf direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+      description
+        "Direction PM type";
+    }
+    list measurement {
+      key "granularity threshold-type";
+      description
+        "List for PM measurement";
+      leaf granularity {
+        type org-openroadm-pm-types:pm-granularity;
+        description
+          "Granularity for the PM entry";
+      }
+      leaf threshold-type {
+        type threshold-enum;
+        description
+          "Threshold enum type";
+      }
+      leaf enabled {
+        type boolean;
+        description
+          "Measurement enabled";
+      }
+      leaf threshold-value {
+        type org-openroadm-pm-types:pm-data-type;
+        mandatory true;
+        description
+          "Threshold value";
+      }
+      leaf threshold-default {
+        type org-openroadm-pm-types:pm-data-type;
+        config false;
+        description
+          "Threshold default value";
+      }
+    }
+  }
+
+  notification tca-notification {
+    description
+      "TCA notification";
+    uses tca-resource-grp;
+    leaf pm-type {
+      type org-openroadm-pm-types:pm-names-enum;
+      mandatory true;
+      description
+        "PM type";
+    }
+    leaf pm-extension {
+      type string;
+      mandatory true;
+      description
+        "PM extension";
+    }
+    leaf pm-location {
+      type org-openroadm-common-alarm-pm-types:location;
+      mandatory true;
+      description
+        "PM location";
+    }
+    leaf pm-direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+      mandatory true;
+      description
+        "PM direction";
+    }
+    leaf pm-granularity {
+      type org-openroadm-pm-types:pm-granularity;
+      mandatory true;
+      description
+        "PM granularity";
+    }
+    leaf threshold-value {
+      type org-openroadm-pm-types:pm-data-type;
+      mandatory true;
+      description
+        "threshold value";
+    }
+    leaf threshold-type {
+      type threshold-enum;
+      mandatory true;
+      description
+        "Threshold Crossed";
+    }
+    leaf pm-value {
+      type org-openroadm-pm-types:pm-data-type;
+      mandatory true;
+      description
+        "PM Value";
+    }
+    leaf raise-time {
+      type yang:date-and-time;
+      mandatory true;
+      description
+        "PM raise time";
+    }
+  }
+
+  container potential-tca-list {
+    description
+      "List of current TCAs.";
+    list tca-entry {
+      key "tca-resource-type tca-resource-type-extension tca-resource-instance";
+      description
+        "List of current TCA entries";
+      uses current-tca-group;
+    }
+  }
+}
diff --git a/ordmodels/common/src/main/yang/org-openroadm-user-mgmt@2019-11-29.yang b/ordmodels/common/src/main/yang/org-openroadm-user-mgmt@2019-11-29.yang
new file mode 100644 (file)
index 0000000..846250f
--- /dev/null
@@ -0,0 +1,161 @@
+module org-openroadm-user-mgmt {
+  namespace "http://org/openroadm/user-mgmt";
+  prefix org-openroadm-user-mgmt;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of user managements.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef username-type {
+    type string {
+      length "3..32";
+      pattern '[a-z][a-z0-9]{2,31}' {
+        error-message
+          "A username must begin with a lowercase letter, The remainder
+           of the string may contain lowercase letters, or numbers 0 through 9.";
+      }
+    }
+    description
+      "The user name string identifying this entry.";
+  }
+
+  typedef password-type {
+    type string {
+      length "8..128";
+      pattern '[a-zA-Z0-9!$%\^()\[\]_\-~{}.+]*' {
+        error-message "Password content does not meet the requirements";
+      }
+    }
+    description
+      "The password for this entry. This shouldn't be in clear text
+       The Password must contain at least 2 characters from
+       each of the following groups:
+       a) Lower case alphabetic (a-z)
+       b) Upper case alphabetic (A-Z)
+       c) Numeric 0-9
+       d) Special characters Allowed !$%^()[]_-~{}.+
+       Password must not contain Username.";
+  }
+
+  grouping user-profile {
+    list user {
+      key "name";
+      description
+        "The list of local users configured on this device.";
+      leaf name {
+        type username-type;
+        description
+          "The user name string identifying this entry.";
+      }
+      leaf password {
+        type password-type;
+        description
+          "The password for this entry.";
+      }
+      leaf group {
+        type enumeration {
+          enum sudo;
+        }
+        description
+          "The group to which the user is associated to.";
+      }
+    }
+  }
+
+  rpc chg-password {
+    input {
+      leaf currentPassword {
+        type password-type;
+        mandatory true;
+        description
+          "provide the current password";
+      }
+      leaf newPassword {
+        type password-type;
+        mandatory true;
+        description
+          "provide a new password";
+      }
+      leaf newPasswordConfirm {
+        type password-type;
+        mandatory true;
+        description
+          "re-enter the new password ";
+      }
+    }
+    output {
+      leaf status {
+        type enumeration {
+          enum Successful {
+            value 1;
+          }
+          enum Failed {
+            value 2;
+          }
+        }
+        mandatory true;
+        description
+          "Successful or Failed";
+      }
+      leaf status-message {
+        type string;
+        description
+          "Gives a more detailed reason for success / failure";
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/resources/NOTICE b/ordmodels/device/src/main/resources/NOTICE
new file mode 100644 (file)
index 0000000..4c95811
--- /dev/null
@@ -0,0 +1,9 @@
+This work includes YANG models developed by the OpenConfig working group
+and originally published under the Apache License Version 2.
+A copy of the original license can be found in the file openconfig.LICENSE
+
+More details at the http://www.openconfig.net/ web site.
+
+OpenConfig models license is usually not mentioned in their YANG description
+field. Exceptions include models derived from the IETF works and originally
+published under the IETF license.
diff --git a/ordmodels/device/src/main/resources/openconfig.LICENSE b/ordmodels/device/src/main/resources/openconfig.LICENSE
new file mode 100644 (file)
index 0000000..8f71f43
--- /dev/null
@@ -0,0 +1,202 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/ordmodels/device/src/main/yang/openconfig-extensions@2017-04-11.yang b/ordmodels/device/src/main/yang/openconfig-extensions@2017-04-11.yang
new file mode 100644 (file)
index 0000000..fb1b11f
--- /dev/null
@@ -0,0 +1,84 @@
+module openconfig-extensions {
+  yang-version 1;
+  namespace "http://openconfig.net/yang/openconfig-ext";
+  prefix oc-ext;
+
+  organization
+    "OpenConfig working group";
+  contact
+    "OpenConfig working group
+     www.openconfig.net";
+  description
+    "This module provides extensions to the YANG language to allow
+     OpenConfig specific functionality and meta-data to be defined.";
+
+  revision 2017-04-11 {
+    description
+      "rename password type to 'hashed' and clarify description";
+    reference
+      "0.3.0";
+  }
+  revision 2017-01-29 {
+    description
+      "Added extension for annotating encrypted values.";
+    reference
+      "0.2.0";
+  }
+  revision 2015-10-09 {
+    description
+      "Initial OpenConfig public release";
+    reference
+      "0.1.0";
+  }
+
+  extension openconfig-version {
+    argument semver {
+      yin-element false;
+    }
+    description
+      "The OpenConfig version number for the module. This is
+       expressed as a semantic version number of the form:
+        x.y.z
+       where:
+        * x corresponds to the major version,
+        * y corresponds to a minor version,
+        * z corresponds to a patch version.
+       This version corresponds to the model file within which it is
+       defined, and does not cover the whole set of OpenConfig models.
+       Where several modules are used to build up a single block of
+       functionality, the same module version is specified across each
+       file that makes up the module.
+
+       A major version number of 0 indicates that this model is still
+       in development (whether within OpenConfig or with industry
+       partners), and is potentially subject to change.
+
+       Following a release of major version 1, all modules will
+       increment major revision number where backwards incompatible
+       changes to the model are made.
+
+       The minor version is changed when features are added to the
+       model that do not impact current clients use of the model.
+
+       The patch-level version is incremented when non-feature changes
+       (such as bugfixes or clarifications to human-readable
+       descriptions that do not impact model functionality) are made
+       that maintain backwards compatibility.
+
+       The version number is stored in the module meta-data.";
+  }
+
+  extension openconfig-hashed-value {
+    description
+      "This extension provides an annotation on schema nodes to
+       indicate that the corresponding value should be stored and
+       reported in hashed form.
+
+       Hash algorithms are by definition not reversible. Clients
+       reading the configuration or applied configuration for the node
+       should expect to receive only the hashed value. Values written
+       in cleartext will be hashed. This annotation may be used on
+       nodes such as secure passwords in which the device never reports
+       a cleartext value, even if the input is provided as cleartext.";
+  }
+}
diff --git a/ordmodels/device/src/main/yang/openconfig-telemetry-types@2017-08-24.yang b/ordmodels/device/src/main/yang/openconfig-telemetry-types@2017-08-24.yang
new file mode 100644 (file)
index 0000000..989f383
--- /dev/null
@@ -0,0 +1,102 @@
+module openconfig-telemetry-types {
+  yang-version 1;
+  namespace "http://openconfig.net/yang/telemetry-types";
+  prefix oc-telemetry-types;
+
+  import openconfig-extensions {
+    prefix oc-ext;
+  }
+
+  organization
+    "OpenConfig working group";
+  contact
+    "OpenConfig working group
+     www.openconfig.net";
+  description
+    "This module defines type and identities used by the OpenConfig
+     telemetry model.";
+
+  revision 2017-08-24 {
+    description
+      "Minor formatting fixes";
+    reference
+      "0.4.1";
+  }
+  revision 2017-02-20 {
+    description
+      "Fixes for YANG 1.0 compliance, add types module";
+    reference
+      "0.4.0";
+  }
+  revision 2016-04-05 {
+    description
+      "OpenConfig public release";
+    reference
+      "0.2.0";
+  }
+
+  identity DATA_ENCODING_METHOD {
+    description
+      "Base identity for supported encoding for configuration and
+       operational state data";
+  }
+
+  identity ENC_XML {
+    base DATA_ENCODING_METHOD;
+    description
+      "XML encoding";
+  }
+
+  identity ENC_JSON_IETF {
+    base DATA_ENCODING_METHOD;
+    description
+      "JSON encoded based on IETF draft standard";
+    reference
+      "draft-ietf-netmod-yang-json";
+  }
+
+  identity ENC_PROTO3 {
+    base DATA_ENCODING_METHOD;
+    description
+      "Protocol buffers v3";
+    reference
+      "https://developers.google.com/protocol-buffers/docs/overview";
+  }
+
+  identity STREAM_PROTOCOL {
+    description
+      "Base identity for a telemetry stream protocol";
+  }
+
+  identity STREAM_SSH {
+    base STREAM_PROTOCOL;
+    description
+      "Telemetry stream is carried over a SSH connection";
+  }
+
+  identity STREAM_GRPC {
+    base STREAM_PROTOCOL;
+    description
+      "Telemetry stream is carried over via the gRPC framework";
+  }
+
+  identity STREAM_JSON_RPC {
+    base STREAM_PROTOCOL;
+    description
+      "Telemetry stream is carried via the JSON-RPC framework";
+  }
+
+  identity STREAM_THRIFT_RPC {
+    base STREAM_PROTOCOL;
+    description
+      "Telemetry stream is carried via the Apache Thrift framework";
+  }
+
+  identity STREAM_WEBSOCKET_RPC {
+    base STREAM_PROTOCOL;
+    description
+      "Telemetry stream is carried by the WebSocket framework";
+  }
+
+  oc-ext:openconfig-version "0.4.1";
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-database@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-database@2020-05-29.yang
new file mode 100644 (file)
index 0000000..a58dbf0
--- /dev/null
@@ -0,0 +1,198 @@
+module org-openroadm-database {
+  namespace "http://org/openroadm/database";
+  prefix org-openroadm-database;
+
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This module contains definitions for System Management.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  rpc db-backup {
+    description
+      "copy  running DB to user provided file to a given path";
+    input {
+      leaf filename {
+        type string {
+          length "10..255";
+        }
+        description
+          "Path and file name is used with back-up.(xxx.DBS)";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc db-restore {
+    description
+      "Restore database ";
+    input {
+      leaf filename {
+        type string {
+          length "10..255";
+        }
+        description
+          "PATH/file name use file name.(xxx.DBS)";
+      }
+      leaf nodeIDCheck {
+        type boolean;
+        default "true";
+        description
+          "Flag to indicate if sysNameCheck is required";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc db-activate {
+    description
+      "activate the database";
+    input {
+      leaf rollBackTimer {
+        type string;
+        description
+          "rollbackTimer ";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc cancel-rollback-timer {
+    description
+      "Cancel roll back timer which user provisioned as part of activate command";
+    input {
+      leaf accept {
+        type boolean;
+        description
+          " TRUE means rollback timer is cancelled and new load is accepted";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc database-init {
+    description
+      "Initialize the database to default DB";
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification db-backup-notification {
+    description
+      "notification for db-backup operation events.";
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+
+  notification db-restore-notification {
+    description
+      "notification for db-restore operation events.";
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+
+  notification db-activate-notification {
+    description
+      "notification for database activation events.";
+    leaf db-active-notification-type {
+      type org-openroadm-common-types:activate-notification-type;
+    }
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-de-operations@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-de-operations@2020-05-29.yang
new file mode 100644 (file)
index 0000000..a295ab0
--- /dev/null
@@ -0,0 +1,132 @@
+module org-openroadm-de-operations {
+  namespace "http://org/openroadm/de/operations";
+  prefix org-openroadm-de-operations;
+
+  import org-openroadm-resource {
+    prefix org-openroadm-resource;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of operations.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  rpc restart {
+    description
+      "Restart a resource with warm/cold option. If no resource is provided or only the device name is provided, then the device itself will be restarted.
+       Note that resources on the device will not be restartable";
+    input {
+      uses org-openroadm-resource:resource;
+      leaf option {
+        type enumeration {
+          enum warm {
+            value 1;
+          }
+          enum cold {
+            value 2;
+          }
+        }
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification restart-notification {
+    description
+      "This Notification is sent when a resource on a device has completed a restart. This is sent as a result of restarts triggered via the
+       restart RPC and other means.  The resource identified is the from the RPC request or the equivalent if the restart was triggered another way.";
+    uses org-openroadm-resource:resource;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-device-types@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-device-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..89087d9
--- /dev/null
@@ -0,0 +1,151 @@
+module org-openroadm-device-types {
+  namespace "http://org/openroadm/device-types";
+  prefix org-openroadm-device-types;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of device types.
+
+      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+      All other rights reserved.
+
+      Redistribution and use in source and binary forms, with or without modification,
+      are permitted provided that the following conditions are met:
+
+      * Redistributions of source code must retain the above copyright notice, this
+        list of conditions and the following disclaimer.
+      * Redistributions in binary form must reproduce the above copyright notice,
+        this list of conditions and the following disclaimer in the documentation and/or
+        other materials provided with the distribution.
+      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+        contributors may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+      POSSIBILITY OF SUCH DAMAGE";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  typedef node-types {
+    type enumeration {
+      enum rdm {
+        value 1;
+      }
+      enum xpdr {
+        value 2;
+      }
+      enum ila {
+        value 3;
+      }
+      enum extplug {
+        value 4;
+      }
+    }
+    description
+      "Identifier for node type
+       1. rdm for ROADM
+       2. xpdr for Transponder, Regen
+       3. ila for in-line amplifier
+       4. extplug for external pluggable";
+  }
+
+  typedef xpdr-node-types {
+    type enumeration {
+      enum tpdr {
+        value 1;
+      }
+      enum mpdr {
+        value 2;
+      }
+      enum switch {
+        value 3;
+      }
+      enum regen {
+        value 4;
+      }
+      enum regen-uni {
+        value 5;
+      }
+    }
+    description
+      "Identifier for Xponder node type
+       1. Transponder
+       2. Muxponder
+       3. OTN switchponder
+       4. Regenerator
+       5. Regenerator based on unidirectional model";
+  }
+
+  typedef port-qual {
+    type enumeration {
+      enum roadm-internal {
+        value 1;
+      }
+      enum roadm-external {
+        value 2;
+      }
+      enum xpdr-network {
+        value 3;
+      }
+      enum xpdr-client {
+        value 4;
+      }
+      enum otdr {
+        value 5;
+      }
+      enum switch-network {
+        value 6;
+      }
+      enum switch-client {
+        value 7;
+      }
+      enum ila-external {
+        value 8;
+      }
+      enum ila-internal {
+        value 9;
+      }
+    }
+  }
+
+  grouping physical-location {
+    leaf rack {
+      type string;
+      mandatory false;
+    }
+    leaf shelf {
+      type string;
+      mandatory false;
+    }
+    leaf slot {
+      type string;
+      mandatory false;
+    }
+    leaf subSlot {
+      type string;
+      mandatory false;
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-device@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-device@2020-05-29.yang
new file mode 100644 (file)
index 0000000..5e690f5
--- /dev/null
@@ -0,0 +1,2608 @@
+module org-openroadm-device {
+  namespace "http://org/openroadm/device";
+  prefix org-openroadm-device;
+
+  import ietf-yang-types {
+    prefix ietf-yang-types;
+    revision-date 2013-07-15;
+  }
+  import ietf-inet-types {
+    prefix ietf-inet-types;
+    revision-date 2013-07-15;
+  }
+  import ietf-netconf {
+    prefix ietf-nc;
+    revision-date 2011-06-01;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-alarm-pm-types {
+    prefix org-openroadm-common-alarm-pm-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-equipment-types {
+    prefix org-openroadm-common-equipment-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-amplifier-types {
+    prefix org-openroadm-common-amplifier-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-node-types {
+    prefix org-openroadm-common-node-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-device-types {
+    prefix org-openroadm-device-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-physical-types {
+    prefix org-openroadm-physical-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-user-mgmt {
+    prefix org-openroadm-user-mgmt;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-port-types {
+    prefix org-openroadm-port-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-interfaces {
+    prefix org-openroadm-interfaces;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-swdl {
+    prefix org-openroadm-swdl;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-equipment-states-types {
+    prefix org-openroadm-equipment-states-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-switching-pool-types {
+    prefix org-openroadm-switching-pool-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-optical-operational-interfaces {
+    prefix org-openroadm-optical-operational-interfaces;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of ROADM device
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF netconf.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2017-02-06 {
+    description
+      "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  identity connection-direction-identity {
+    description
+      "Bidrectional capable, or Bi and Unidirectional capable";
+  }
+
+  identity connection-direction_bi {
+    base connection-direction-identity;
+    description
+      "Bidrectional capable";
+  }
+
+  identity connection-direction_bi_and_uni {
+    base connection-direction-identity;
+    description
+      "Bi and Unidirectional capable";
+  }
+
+  typedef interface-ref {
+    type leafref {
+      path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+    }
+    description
+      "This type is used by data models that need to reference
+       configured interfaces.";
+  }
+
+  grouping create-tech-info-group {
+    leaf shelf-id {
+      type leafref {
+        path "/org-openroadm-device/shelves/shelf-name";
+      }
+      description
+        "shelf ID";
+    }
+    leaf log-file-name {
+      type string;
+      description
+        "The log file name a vendor can specify for a given log collection operation";
+    }
+  }
+
+  grouping device-common {
+    leaf node-id {
+      type org-openroadm-common-node-types:node-id-type;
+      default "openroadm";
+      description
+        "Globally unique identifier for a device.";
+    }
+    leaf node-number {
+      type uint32;
+      description
+        "Number assigned to a ROADM node at a
+         given office";
+    }
+    leaf node-type {
+      type org-openroadm-device-types:node-types;
+      config true;
+      mandatory true;
+      description
+        "Identifier for node-type e.g Roadm, xponder.
+         Once the node-type is configured, it should not be modified.";
+    }
+    leaf clli {
+      type string;
+      description
+        "Common Language Location Identifier.";
+    }
+    uses org-openroadm-physical-types:node-info;
+    leaf ipAddress {
+      type ietf-inet-types:ip-address;
+      description
+        "IP Address of device";
+    }
+    leaf prefix-length {
+      type uint8 {
+        range "0..128";
+      }
+      description
+        "The length of the subnet prefix";
+    }
+    leaf defaultGateway {
+      type ietf-inet-types:ip-address;
+      description
+        "Default Gateway";
+    }
+    leaf source {
+      type enumeration {
+        enum static {
+          value 1;
+        }
+        enum dhcp {
+          value 2;
+        }
+      }
+      config false;
+    }
+    leaf current-ipAddress {
+      type ietf-inet-types:ip-address;
+      config false;
+      description
+        "Current IP Address of device";
+    }
+    leaf current-prefix-length {
+      type uint8 {
+        range "0..128";
+      }
+      config false;
+      description
+        "The current length of the subnet prefix";
+    }
+    leaf current-defaultGateway {
+      type ietf-inet-types:ip-address;
+      config false;
+      description
+        "Current Default Gateway";
+    }
+    leaf macAddress {
+      type ietf-yang-types:mac-address;
+      config false;
+      description
+        "MAC Address of device";
+    }
+    leaf softwareVersion {
+      type string;
+      config false;
+      description
+        "Software version";
+    }
+    leaf software-build {
+      type string;
+      config false;
+      description
+        "Software build version";
+    }
+    leaf openroadm-version {
+      type org-openroadm-common-types:openroadm-version-type;
+      config false;
+      description
+        "openroadm version used on the device";
+    }
+    leaf template {
+      type string;
+      description
+        "Template information used in the deployment.";
+    }
+    leaf current-datetime {
+      type ietf-yang-types:date-and-time;
+      config false;
+      description
+        "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ ";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of the device node. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    container geoLocation {
+      description
+        "GPS location";
+      leaf latitude {
+        type decimal64 {
+          fraction-digits 16;
+          range "-90 .. 90";
+        }
+        description
+          "[From wikipedia] Latitude is an angle (defined below)
+           which ranges from 0 at the Equator to 90 (North or
+           South) at the poles";
+      }
+      leaf longitude {
+        type decimal64 {
+          fraction-digits 16;
+          range "-180 .. 180";
+        }
+        description
+          "[From wikipedia] The longitude is measured as the
+           angle east or west from the Prime Meridian, ranging
+           from 0 at the Prime Meridian to +180 eastward and
+           -180 westward.";
+      }
+    }
+  }
+
+  grouping slot-info {
+    description
+      "slots information. To be populated by NE during retrieval.";
+    leaf slot-name {
+      type string;
+      description
+        "The name of this slot.";
+    }
+    leaf label {
+      type string;
+      description
+        "Faceplate label";
+    }
+    leaf provisioned-circuit-pack {
+      type leafref {
+        path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+      }
+      description
+        "The supported circuit-pack. It will be empty if holder status is empty-not-prov, or installed-not-prov";
+    }
+    leaf slot-status {
+      type enumeration {
+        enum empty-not-prov {
+          value 1;
+          description
+            "Slot is empty and not provisioned";
+        }
+        enum empty-prov-match {
+          value 2;
+          status obsolete;
+          description
+            "(Deprecated) Slot is empty and expected type is provisioned";
+        }
+        enum empty-prov-mismatch {
+          value 3;
+          status obsolete;
+          description
+            "(Deprecated) Slot is empty and an unsupported type is provisioned";
+        }
+        enum installed-not-prov {
+          value 4;
+          description
+            "Slot is occupied but not provisioned";
+        }
+        enum installed-prov-match {
+          value 5;
+          description
+            "Slot is occupied with matching provisioned type";
+        }
+        enum installed-prov-mismatch {
+          value 6;
+          description
+            "Slot is occupied with mismatched provisioned type";
+        }
+        enum empty-prov {
+          value 7;
+          description
+            "Slot is empty and provisioned";
+        }
+      }
+    }
+  }
+
+  grouping shelves {
+    list shelves {
+      key "shelf-name";
+      uses shelf;
+    }
+  }
+
+  grouping user-description-grp {
+    description
+      "user description group";
+    leaf user-description {
+      type string;
+      description
+        "user provided description";
+    }
+  }
+
+  grouping shelf {
+    leaf shelf-name {
+      type string;
+      description
+        "Unique identifier for this shelf within a device";
+    }
+    leaf shelf-type {
+      type string;
+      mandatory true;
+      description
+        "The shelf type: describe the shelf with a unique string.";
+    }
+    leaf rack {
+      type string;
+      description
+        "Reflect the shelf physical location data including floor, aisle, bay values.";
+    }
+    leaf shelf-position {
+      type string;
+      description
+        "Reflect the shelf vertical position within an equipment bay.";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of shelf. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf administrative-state {
+      type org-openroadm-equipment-states-types:admin-states;
+      mandatory true;
+      description
+        "Admin State of the shelf";
+    }
+    uses org-openroadm-physical-types:common-info;
+    leaf equipment-state {
+      type org-openroadm-equipment-states-types:states;
+      description
+        "equipment state for the shelf, used to track the lifecycle state.";
+    }
+    leaf is-physical {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "is the entity physical or logical";
+    }
+    leaf is-passive {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "is the entity passive and not actively managed by the device;
+         e.g., no physical inventory or plug-in notification supported";
+    }
+    leaf faceplate-label {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "label on the faceplace silk screening";
+    }
+    uses user-description-grp;
+    leaf due-date {
+      type ietf-yang-types:date-and-time;
+      description
+        "due date for the shelf.";
+    }
+    list slots {
+      key "slot-name";
+      config false;
+      description
+        "List of slots on this shelf. To be populated by NE during retrieval.";
+      uses slot-info;
+    }
+  }
+
+  grouping circuit-packs {
+    list circuit-packs {
+      key "circuit-pack-name";
+      description
+        "List of circuit packs. This includes common equipment, like fans, power supplies, etc.";
+      leaf circuit-pack-type {
+        type string;
+        mandatory true;
+        description
+          "Type of circuit-pack";
+      }
+      leaf circuit-pack-product-code {
+        type string;
+        description
+          "Product Code for the circuit-pack";
+      }
+      uses circuit-pack;
+    }
+  }
+
+  grouping circuit-pack-features {
+    leaf software-load-version {
+      type string;
+      config false;
+      description
+        "Software version running on the circuit pack.";
+    }
+    list circuit-pack-features {
+      config false;
+      container feature {
+        description
+          "List of features supported by the installed load and indications on whether the features have been applied or not.";
+        leaf description {
+          type string;
+          description
+            "Feature description.";
+        }
+        leaf boot {
+          type boolean;
+          description
+            "Flag to indicate boot loader or unprotected firmware update required";
+        }
+        leaf activated {
+          type boolean;
+          description
+            "Indicator if the feature has been activated.";
+        }
+      }
+    }
+    list circuit-pack-components {
+      config false;
+      container component {
+        description
+          "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.";
+        leaf name {
+          type string;
+          description
+            "Name of a component on the circuit-pack that can have a load applied to it.";
+        }
+        leaf boot {
+          type boolean;
+          description
+            "Flag to indicate boot loader or unprotected firmware update required";
+        }
+        leaf current-version {
+          type string;
+          description
+            "Name of the load version currently running on the component.";
+        }
+        leaf version-to-apply {
+          type string;
+          description
+            "Name of the load version for the component that will be applied when cold restart occurs on the circuit-pack.";
+        }
+      }
+    }
+  }
+
+  grouping circuit-pack {
+    leaf circuit-pack-name {
+      type string;
+      description
+        "Unique identifier for this circuit-pack within a device";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of circuit-pack. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf administrative-state {
+      type org-openroadm-equipment-states-types:admin-states;
+      mandatory true;
+      description
+        "Administrative state of circuit-pack";
+    }
+    uses org-openroadm-physical-types:common-info;
+    container circuit-pack-category {
+      config false;
+      description
+        "General type of circuit-pack";
+      uses org-openroadm-common-equipment-types:equipment-type;
+    }
+    leaf equipment-state {
+      type org-openroadm-equipment-states-types:states;
+      description
+        "Equipment state, which complements operational state.";
+    }
+    leaf circuit-pack-mode {
+      type string;
+      default "NORMAL";
+      description
+        "Circuit-pack mode allowed. e.g. NORMAL or REGEN";
+    }
+    leaf shelf {
+      type leafref {
+        path "/org-openroadm-device/shelves/shelf-name";
+      }
+      mandatory true;
+    }
+    leaf slot {
+      type string;
+      mandatory true;
+    }
+    leaf subSlot {
+      type string;
+      mandatory false;
+    }
+    leaf is-pluggable-optics {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "True if circuitpack is pluggable optics";
+    }
+    leaf is-physical {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "is the entity physical or logical";
+    }
+    leaf is-passive {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "is the entity passive and not actively managed by the device;
+         e.g., no physical inventory or plug-in notification supported";
+    }
+    leaf faceplate-label {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "label on the faceplace silk screening";
+    }
+    uses user-description-grp;
+    leaf due-date {
+      type ietf-yang-types:date-and-time;
+      description
+        "due date for this circuit-pack.";
+    }
+    container parent-circuit-pack {
+      description
+        "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.";
+      uses circuit-pack-name;
+      leaf cp-slot-name {
+        type string;
+        description
+          "Slot name on parent-circuit-pack.";
+      }
+    }
+    list cp-slots {
+      key "slot-name";
+      config false;
+      description
+        "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval.";
+      uses slot-info;
+      leaf slot-type {
+        type enumeration {
+          enum pluggable-optics-holder {
+            value 1;
+            description
+              "slot accepts dedicated pluggable port circuit-pack";
+          }
+          enum other {
+            value 2;
+            description
+              "slot accepts parent circuit-pack";
+          }
+        }
+      }
+    }
+    uses circuit-pack-features;
+    list ports {
+      key "port-name";
+      description
+        "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.";
+      uses port;
+      container roadm-port {
+        when "../port-qual='roadm-external'";
+        uses org-openroadm-port-types:roadm-port;
+      }
+      container transponder-port {
+        when "../port-qual='xpdr-network' or ../port-qual='xpdr-client' or ../port-qual='switch-network' or ../port-qual='switch-client'";
+        uses org-openroadm-port-types:common-port;
+      }
+      container otdr-port {
+        when "../port-qual='otdr'";
+        description
+          "Settings for otdr port.";
+        leaf launch-cable-length {
+          type uint32;
+          units "m";
+          default "30";
+        }
+        leaf port-direction {
+          type org-openroadm-common-alarm-pm-types:direction;
+        }
+      }
+      container ila-port {
+        when "../port-qual='ila-external'";
+        uses org-openroadm-port-types:common-port;
+      }
+    }
+  }
+
+  grouping odu-connection {
+    description
+      "Grouping used to define odu-connections.";
+    leaf connection-name {
+      type string;
+      description
+        "roadm-connection and odu-connection share the same resource-type and resource definition (e.g. connection)";
+    }
+    leaf direction {
+      type enumeration {
+        enum unidirectional {
+          value 1;
+        }
+        enum bidirectional {
+          value 2;
+        }
+      }
+      default "bidirectional";
+      description
+        "Directionality of connection. If bidirectional, both directions are created.";
+    }
+    container source {
+      leaf src-if {
+        type leafref {
+          path "/org-openroadm-device/interface/name";
+        }
+        mandatory true;
+      }
+    }
+    container destination {
+      leaf dst-if {
+        type leafref {
+          path "/org-openroadm-device/interface/name";
+        }
+        mandatory true;
+      }
+    }
+  }
+
+  grouping connection {
+    description
+      "Grouping used to define connections.";
+    leaf connection-name {
+      type string;
+    }
+    leaf opticalControlMode {
+      type org-openroadm-common-link-types:optical-control-mode;
+      default "off";
+      description
+        "Whether connection is currently in power or gain/loss mode";
+      reference
+        "openroadm.org: Open ROADM MSA Specification.";
+    }
+    leaf target-output-power {
+      type org-openroadm-common-link-types:power-dBm;
+      description
+        "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level.";
+    }
+    container source {
+      leaf src-if {
+        type leafref {
+          path "/org-openroadm-device/interface/name";
+        }
+        mandatory true;
+      }
+    }
+    container destination {
+      leaf dst-if {
+        type leafref {
+          path "/org-openroadm-device/interface/name";
+        }
+        mandatory true;
+      }
+    }
+  }
+
+  grouping mc-capabilities-grp {
+    description
+      "Media channel capabilities grouping";
+    leaf-list mc-capability-profile-name {
+      type leafref {
+        path "/org-openroadm-device/mc-capability-profile/profile-name";
+      }
+      config false;
+      description
+        "Media channel capabilities";
+    }
+  }
+
+  grouping degree {
+    leaf degree-number {
+      type uint16;
+      description
+        "Degree number should be greater than zero and not greater than max-degrees";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of degree. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf max-wavelengths {
+      type uint16;
+      config false;
+      mandatory true;
+      description
+        "maximum number of wavelengths";
+    }
+    list circuit-packs {
+      key "index";
+      description
+        "list for Cards associated with a degree";
+      leaf index {
+        type uint32;
+      }
+      uses circuit-pack-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+      }
+    }
+    list connection-ports {
+      key "index";
+      description
+        "Port associated with degree: One if bi-directional; two if uni-directional";
+      leaf index {
+        type uint32;
+      }
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+    container otdr-port {
+      description
+        "otdr port associated with degree.";
+      uses port-name;
+    }
+    uses mc-capabilities-grp;
+  }
+
+  grouping amplifier {
+    leaf amp-number {
+      type uint8 {
+        range "1..128";
+      }
+      description
+        "Unique identifier/number for the amplifier entry which corresponds to a logical amplifier";
+    }
+    leaf amp-type {
+      type org-openroadm-common-amplifier-types:amplifier-types;
+      config false;
+      mandatory true;
+      description
+        "Amplifier type";
+    }
+    leaf control-mode {
+      type org-openroadm-common-amplifier-types:line-amplifier-control-mode;
+      default "off";
+      description
+        "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";
+    }
+    leaf amp-gain-range {
+      type org-openroadm-common-amplifier-types:amplifier-gain-range;
+      default "gain-range-1";
+      config false;
+      description
+        "Amplifier gain-range (gain-range 1 to 4 for switched gain amplifiers)
+         gain-range-1 (default value) for standard amplifiers";
+    }
+    leaf target-gain {
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
+      description
+        "Target overall Amplifier Signal gain, excluding ASE, including VOA attenuation.
+         Defined as optional for ODL support, but shall be considered as mandatory and provided
+         by the controller when the control-mode is set to gainLoss for amplifier setting";
+    }
+    leaf target-tilt {
+      type org-openroadm-common-link-types:ratio-dB;
+      config true;
+      description
+        "Target tilt configured in case of smart EDFA.
+         Tilt value provided as specified in Open-ROADM-MSA-specifications spreadsheet
+         Defined as optional for ODL support, but shall be considered as mandatory and provided
+         by the controller when the control-mode is set to gainLoss for amplifier setting";
+    }
+    leaf egress-average-channel-power {
+      type org-openroadm-common-link-types:power-dBm;
+      config true;
+      description
+        "Based upon the total max power across the 4.8 THz passband.
+         Defined as optional for ODL support, but shall be considered as mandatory and provided
+         by the controller when the control-mode is set to gainLoss for amplifier setting";
+    }
+    leaf out-voa-att {
+      type org-openroadm-common-link-types:ratio-dB;
+      config false;
+      description
+        "Used to provide the value output VOA attenuation, optional";
+    }
+    leaf partner-amp {
+      type leafref {
+        path "/org-openroadm-device/line-amplifier/amp-number";
+      }
+      config false;
+      description
+        "amp-number of amp module that is functionally associated to the amplifier
+         in the opposite direction";
+    }
+    leaf ila-direction-label {
+      type string;
+      description
+        "Amplifier direction. Each operators may have its own naming convention.
+         Shall be consistent with tx-instance-port-direction-label and rx-instance-port-direction-label.";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of the amplifier. Whether it is planned, deployed, in maintenance, etc.";
+    }
+  }
+
+  grouping external-links {
+    description
+      "YANG definitions for external links..
+       - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed manually.";
+    list external-link {
+      key "external-link-name";
+      uses external-link;
+    }
+  }
+
+  grouping external-link {
+    leaf external-link-name {
+      type string;
+    }
+    container source {
+      uses org-openroadm-resource-types:device-id {
+        refine "node-id" {
+          mandatory true;
+        }
+      }
+      uses org-openroadm-resource-types:port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+    container destination {
+      uses org-openroadm-resource-types:device-id {
+        refine "node-id" {
+          mandatory true;
+        }
+      }
+      uses org-openroadm-resource-types:port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+  }
+
+  grouping internal-links {
+    list internal-link {
+      key "internal-link-name";
+      config false;
+      uses internal-link;
+    }
+  }
+
+  grouping internal-link {
+    leaf internal-link-name {
+      type string;
+    }
+    container source {
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+    container destination {
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+  }
+
+  grouping physical-links {
+    description
+      "YANG definitions for physical links.
+       - physical links (fiber, cables,etc.) between ports within a node. ";
+    list physical-link {
+      key "physical-link-name";
+      uses physical-link;
+    }
+  }
+
+  grouping physical-link {
+    leaf physical-link-name {
+      type string;
+    }
+    leaf is-physical {
+      type boolean;
+      description
+        "is the entity physical or logical";
+    }
+    uses user-description-grp;
+    container source {
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+    container destination {
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of the physical link. Whether it is planned, deployed, in maintenance, etc.";
+    }
+  }
+
+  grouping srg {
+    leaf max-add-drop-ports {
+      type uint16;
+      config false;
+      mandatory true;
+      description
+        "The max number of ports available for a given srg";
+    }
+    leaf current-provisioned-add-drop-ports {
+      type uint16;
+      config false;
+      mandatory true;
+      description
+        "The number of ports currently provisioned for a given srg.";
+    }
+    leaf srg-number {
+      type uint16;
+      description
+        "Srg number should be greater than zero and not greater than max-srgs";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of shared-risk-group. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf wavelength-duplication {
+      type org-openroadm-common-optical-channel-types:wavelength-duplication-type;
+      config false;
+      mandatory true;
+      description
+        "Whether the SRG can handle duplicate wavelengths and if so to what extent.";
+    }
+    list circuit-packs {
+      key "index";
+      description
+        "list for Cards associated with an add/drop group and srg";
+      leaf index {
+        type uint32;
+      }
+      uses circuit-pack-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+      }
+    }
+    uses mc-capabilities-grp;
+  }
+
+  grouping xponder {
+    leaf xpdr-number {
+      type uint16;
+      must 'current() > 0' {
+        error-message "Xponder not supported by device ";
+        description
+          "Validating if the Xponder is supported by device";
+      }
+    }
+    leaf xpdr-type {
+      type org-openroadm-device-types:xpdr-node-types;
+      mandatory true;
+      description
+        "Identifier for xponder-type e.g Transponder, Muxponder";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of xponder. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf recolor {
+      type boolean;
+      config false;
+      description
+        "Indication if recolor is supported";
+    }
+    list xpdr-port {
+      key "index";
+      description
+        "Network Ports with in a Xponder";
+      leaf index {
+        type uint32;
+      }
+      uses port-name {
+        refine "circuit-pack-name" {
+          mandatory true;
+        }
+        refine "port-name" {
+          mandatory true;
+        }
+      }
+      leaf eqpt-srg-id {
+        type uint32;
+        description
+          "Shared Risk Group identifier. All ports in a circuit-pack will have same srg-id";
+      }
+    }
+  }
+
+  grouping degree-number {
+    leaf degree-number {
+      type leafref {
+        path "/org-openroadm-device/degree/degree-number";
+      }
+      description
+        "Degree identifier. Unique within the context of a device.";
+    }
+  }
+
+  grouping circuit-pack-name {
+    leaf circuit-pack-name {
+      type leafref {
+        path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+      }
+      description
+        "Circuit-Pack identifier. Unique within the context of a device.";
+    }
+  }
+
+  grouping port-name {
+    uses circuit-pack-name;
+    leaf port-name {
+      type leafref {
+        path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
+      }
+      description
+        "Port identifier. Unique within the context of a circuit-pack.";
+    }
+  }
+
+  grouping srg-number {
+    leaf srg-number {
+      type leafref {
+        path "/org-openroadm-device/shared-risk-group/srg-number";
+      }
+      description
+        "Shared Risk Group identifier. Unique within the context of a device.";
+    }
+  }
+
+  grouping supporting-port-name {
+    leaf supporting-circuit-pack-name {
+      type leafref {
+        path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+      }
+      description
+        "Identifier of the supporting circuit-pack.";
+    }
+    leaf supporting-port {
+      type leafref {
+        path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name";
+      }
+      description
+        "Identifier of the supporting port.";
+    }
+  }
+
+  grouping supporting-circuit-pack-list-grp {
+    description
+      "supporting circuit pack list grouping";
+    list supporting-port-list {
+      key "index";
+      description
+        "supporting port list";
+      leaf index {
+        type uint8;
+        description
+          "supporting circuit pack index";
+      }
+      leaf circuit-pack-name {
+        type leafref {
+          path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+        }
+        mandatory true;
+        description
+          "The supported circuit-pack.";
+      }
+      leaf-list port-list {
+        type leafref {
+          path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
+        }
+        description
+          "port list";
+      }
+    }
+  }
+
+  grouping interface-name {
+    description
+      "interface name grouping";
+    leaf interface-name {
+      type leafref {
+        path "/org-openroadm-device/interface/name";
+      }
+      config false;
+      description
+        "Name of an interface. Unique within the context of a device.";
+    }
+  }
+
+  grouping interfaces-grp {
+    description
+      "OpenROADM Interface configuration parameters.";
+    list interface {
+      key "name";
+      description
+        "The list of configured interfaces on the device.";
+      leaf name {
+        type string;
+        description
+          "The name of the interface.";
+      }
+      leaf description {
+        type string;
+        description
+          "A textual description of the interface.";
+      }
+      leaf type {
+        type identityref {
+          base org-openroadm-interfaces:interface-type;
+        }
+        mandatory true;
+        description
+          "The type of the interface.";
+      }
+      leaf lifecycle-state {
+        type org-openroadm-common-state-types:lifecycle-state;
+        description
+          "Lifecycle State of interface. Whether it is planned, deployed, in maintenance, etc.";
+      }
+      leaf administrative-state {
+        type org-openroadm-equipment-states-types:admin-states;
+        mandatory true;
+      }
+      leaf operational-state {
+        type org-openroadm-common-state-types:state;
+        config false;
+        mandatory true;
+      }
+      leaf circuit-id {
+        type string {
+          length "0..45";
+        }
+        description
+          "circuit identifier/user label,
+           can be used in alarm correlation and/or connection management ";
+      }
+      uses supporting-port-name;
+      leaf-list supporting-interface-list {
+        type leafref {
+          path "/org-openroadm-device/interface/name";
+        }
+        description
+          "supporting interface list";
+      }
+    }
+  }
+
+  grouping protection-groups {
+    description
+      "OpenROADM facility protection configuration parameters.";
+    container protection-grps {
+      description
+        "The list of configured protection groups on the device.";
+    }
+  }
+
+  grouping port {
+    description
+      "Grouping of attributes related to a port object.";
+    leaf port-name {
+      type string;
+      mandatory true;
+      description
+        "Identifier for a port, unique within a circuit pack";
+    }
+    uses supporting-circuit-pack-list-grp;
+    leaf port-type {
+      type string;
+      description
+        "Type of the pluggable or fixed port.";
+    }
+    leaf port-qual {
+      type org-openroadm-device-types:port-qual;
+    }
+    leaf port-wavelength-type {
+      type org-openroadm-port-types:port-wavelength-types;
+      config false;
+      description
+        "Type of port - single, multiple-wavelength, etc.";
+    }
+    leaf port-direction {
+      type org-openroadm-common-alarm-pm-types:direction;
+      config false;
+      mandatory true;
+      description
+        "Whether port is uni (tx/rx) or bi-directional and";
+    }
+    leaf is-physical {
+      type boolean;
+      config false;
+      mandatory true;
+      description
+        "is the entity physical or logical";
+    }
+    leaf faceplate-label {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "label on the faceplace silk screening";
+    }
+    uses user-description-grp;
+    leaf circuit-id {
+      type string {
+        length "0..45";
+      }
+      description
+        "circuit identifier/user label,
+         can be used in alarm correlation and/or connection management ";
+    }
+    leaf lifecycle-state {
+      type org-openroadm-common-state-types:lifecycle-state;
+      description
+        "Lifecycle State of port. Whether it is planned, deployed, in maintenance, etc.";
+    }
+    leaf administrative-state {
+      type org-openroadm-equipment-states-types:admin-states;
+      default "outOfService";
+      description
+        "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.";
+    }
+    leaf operational-state {
+      type org-openroadm-common-state-types:state;
+      config false;
+      mandatory true;
+      description
+        "Operational state of a port";
+    }
+    leaf logical-connection-point {
+      type string;
+      description
+        "delete or replace with list logical-ports or connections?";
+    }
+    container partner-port {
+      config false;
+      description
+        "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.";
+      uses port-name;
+    }
+    container parent-port {
+      config false;
+      description
+        "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.";
+      uses port-name;
+    }
+    list interfaces {
+      config false;
+      description
+        "List of the interfaces this port supports.  This is a list of names of instances in the flat instance list.  Implementations must provide the list of interfaces for port that has interfaces provisioned on that port.";
+      uses interface-name;
+    }
+    uses mc-capabilities-grp;
+  }
+
+  grouping odu-mux-hierarchy-grp {
+    description
+      "ODU mux hierarchy group";
+    list mux-capability {
+      key "stage-number ho-odu-type ho-odu-payload-type";
+      description
+        "low order ODU TCM direction capability";
+      leaf stage-number {
+        type uint8 {
+          range "1 .. 2";
+        }
+        description
+          "stage number";
+      }
+      leaf ho-odu-type {
+        type identityref {
+          base org-openroadm-otn-common-types:odu-rate-identity;
+        }
+        description
+          "High order ODU type";
+      }
+      leaf ho-odu-payload-type {
+        type org-openroadm-otn-common-types:payload-type-def;
+        description
+          "High order ODU payload type";
+      }
+      leaf-list supported-lo-odu-type {
+        type identityref {
+          base org-openroadm-otn-common-types:odu-rate-identity;
+        }
+        description
+          "Supported low order ODU type";
+      }
+      leaf lo-odu-proactive-DMp {
+        type boolean;
+        description
+          "low order ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
+      }
+      leaf lo-odu-tcm-capable {
+        type boolean;
+        description
+          "only when lo-odu-tcm-capable=true, the following two are applicable (ie, lo-odu-proactive-DMt, lo-odu-tcm-direction";
+      }
+      leaf lo-odu-proactive-DMt {
+        when "../lo-odu-tcm-capable= 'true'";
+        type boolean;
+        description
+          "low order ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
+      }
+      leaf lo-odu-tcm-direction-capability {
+        when "../lo-odu-tcm-capable= 'true'";
+        type org-openroadm-common-types:tcm-direction-capability-type;
+        description
+          "Supported tcm direction capability for low order ODU associated with the port.";
+      }
+    }
+  }
+
+  identity flexo-modulation-format-identity {
+    description
+      "Flexo modulation format identification";
+  }
+
+  grouping flexo-grp {
+    description
+      "Flexo group";
+    leaf circuit-pack-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
+      }
+      description
+        "Circuit-Pack identifier. Unique within the context of a device.";
+    }
+    leaf port-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports/org-openroadm-device:port-name";
+      }
+      description
+        "Port index identifier. Unique within the context of a circuit-pack.";
+    }
+
+    uses org-openroadm-common-types:fec-grouping {
+      status deprecated;
+      description
+        "Flexo FEC / Forward Error Correction";
+    }
+
+    leaf otsi-rate {
+      type identityref {
+        base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+      }
+      mandatory true;
+      description
+        "Flexo rate";
+    }
+    leaf otsi-modulation-format {
+      type identityref {
+        base flexo-modulation-format-identity;
+      }
+      description
+        "Flexo modulation format";
+    }
+    leaf otsi-width {
+      type uint16;
+      description
+        "OTSI width";
+    }
+    leaf operational-mode-id {
+      type string;
+      mandatory true;
+      description
+        "Optical profile operational mode identifier";
+    }
+  }
+
+  grouping otsigroup-capability-grp {
+    description
+      "Otsigroup group capability";
+    leaf if-cap-type {
+      type identityref {
+        base org-openroadm-port-types:supported-if-capability;
+      }
+      description
+        "Interface type/hierarchy/rate supported on this Otsi port. For example, if-n-otu4-n-odu4 and if-otucn-oducn";
+    }
+    choice otu-rate {
+      description
+        "To specify the supported rate in the case of OTUCn or NxOTU4";
+      case otucn {
+        leaf otucn-n-rate {
+          type uint16;
+          description
+            "Specify the N associated with OTUCn, e.g. N = 2,3,4 for 200G/300G/400G respectively";
+        }
+      }
+      case nxotu4 {
+        leaf supported-n-otu4 {
+          type uint16;
+          description
+            "Specify the number of N in the case of N x OTU4";
+        }
+      }
+    }
+    leaf-list foic-type {
+      type identityref {
+        base org-openroadm-common-optical-channel-types:foic-identity;
+      }
+      description
+        "FlexO interface type ";
+    }
+    leaf otn-capability-profile-name {
+      type leafref {
+        path "/org-openroadm-device/otn-capability-profile/profile-name";
+      }
+      description
+        "OTN capabilities";
+    }
+    leaf otn-odu-mux-hierarchy-profile-name {
+      type leafref {
+        path "/org-openroadm-device/otn-odu-mux-hierarchy-profile/profile-name";
+      }
+      description
+        "OTN ODU Mux hierarchy capabilities";
+    }
+  }
+
+  grouping split-lambda-capability-grp {
+    description
+      "Split lambda capability group";
+    container logical-port {
+      leaf circuit-pack-name {
+        type string;
+        description
+          "The circuit pack supporting the logical port";
+      }
+      leaf port-name {
+        type string;
+        description
+          "Port name for logical-port";
+      }
+      description
+        "Logical port container";
+    }
+    list otsi {
+      key "circuit-pack-name port-name";
+      description
+        "OTSI list for split lambda";
+      leaf circuit-pack-name {
+        type string;
+        description
+          "OTSI circuit pack name";
+      }
+      leaf port-name {
+        type string;
+        description
+          "OTSI port name";
+      }
+      leaf otsi-rate {
+         type identityref {
+           base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+         }
+         description
+           "OTSI rate";
+      }
+      leaf-list optical-operational-mode {
+        type leafref {
+          path "/org-openroadm-device/optical-operational-mode-profile/profile-name";
+        }
+        description
+          "Optical operational mode leaf list";
+      }
+    }
+    leaf-list otsigroup-capability-profile-name {
+      type leafref {
+        path "/org-openroadm-device/otsigroup-capability-profile/profile-name";
+      }
+      description
+        "OTSI group capability mode";
+    }
+  }
+
+  grouping otn-capability-grp {
+    description
+      "OTN capability group";
+    leaf-list if-protection-capability {
+      type identityref {
+        base org-openroadm-common-types:otn-protection-type;
+      }
+      description
+        "supported protection types if protection is supported on this port";
+    }
+    leaf proactive-DMp {
+      type boolean;
+      description
+        "ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
+    }
+    leaf tcm-capable {
+      type boolean;
+      description
+        "only when tcm-capable=true, the following two are applicable (ie, proactive-DMt, tcm-direction";
+    }
+    leaf proactive-DMt {
+      when "../tcm-capable= 'true'";
+      type boolean;
+      description
+        "ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
+    }
+    leaf tcm-direction-capability {
+      when "../tcm-capable= 'true'";
+      type org-openroadm-common-types:tcm-direction-capability-type;
+      description
+        "Supported tcm direction capability on the ODUk associated with the port.";
+    }
+    leaf-list opu-payload-type-mapping {
+      type org-openroadm-otn-common-types:payload-type-def;
+      description
+        "OPU payload-type mapping OPU.";
+    }
+  }
+
+  grouping otn-odu-mux-hierarchy-grp {
+    description
+      "ODU mux hierarchy base group";
+     list mux-capability {
+       key "stage-number ho-odu-type ho-odu-payload-type";
+       description
+         "low order ODU TCM direction capability";
+       leaf stage-number {
+         type uint8 {
+           range "1 .. 2";
+         }
+         description
+           "stage number";
+       }
+       leaf ho-odu-type {
+         type identityref {
+           base org-openroadm-otn-common-types:odu-rate-identity;
+         }
+         description
+           "High order ODU type";
+       }
+       leaf ho-odu-payload-type {
+         type org-openroadm-otn-common-types:payload-type-def;
+         description
+           "High order ODU payload type";
+       }
+       leaf-list supported-lo-odu-type {
+         type identityref {
+           base org-openroadm-otn-common-types:odu-rate-identity;
+         }
+         description
+           "Supported low order ODU type";
+       }
+       leaf lo-odu-proactive-DMp {
+         type boolean;
+         description
+           "low order ODU PM delay measurement (DMp) (G.709 06-2016 15.8.2.1.6)";
+       }
+       leaf lo-odu-tcm-capable {
+         type boolean;
+         description
+           "only when lo-odu-tcm-capable=true, the following two are applicable (ie, lo-odu-proactive-DMt, lo-odu-tcm-direction";
+       }
+       leaf lo-odu-proactive-DMt {
+         when "../lo-odu-tcm-capable= 'true'";
+         type boolean;
+         description
+           "low order ODU TCM delay measurement (DMt) (G.709 06-2016 15.8.2.2.8)";
+       }
+       leaf lo-odu-tcm-direction-capability {
+         when "../lo-odu-tcm-capable= 'true'";
+         type org-openroadm-common-types:tcm-direction-capability-type;
+         description
+           "Supported tcm direction capability for low order ODU associated with the port.";
+       }
+    }
+  }
+
+  grouping mux-grp {
+    leaf odtu-type {
+      type identityref {
+        base org-openroadm-otn-common-types:odtu-type-identity;
+      }
+      mandatory true;
+      description
+        "ODTU type, part of the MSI (Multiplex Structure Identifier)";
+    }
+    leaf network-odu-rate {
+       type identityref {
+       base org-openroadm-otn-common-types:odu-rate-identity;
+      }
+      mandatory true;
+      description
+        "Network ODU rate";
+    }
+    leaf network-oducn-n-rate {
+      type uint16;
+      description
+        "Network ODUCn rate, eg, network-oducn-n-rate=4 for ODUC4";
+    }
+    leaf network-ho-odu-trib-port-number {
+      type uint16 {
+        range "1 .. 80";
+      }
+      mandatory true;
+      description
+        "Tributary port number";
+    }
+    leaf-list network-ho-odu-trib-slots {
+      type uint16 {
+        range "1 .. 80";
+      }
+      min-elements 1;
+      max-elements 80;
+      description
+        "Network high order ODU trib slots";
+    }
+    leaf-list network-ho-odu-opucn-trib-slots {
+      type org-openroadm-otn-common-types:opucn-trib-slot-def;
+      description
+        "Network high order ODU OPU tributary slots";
+    }
+    description
+      "Mux group grouping";
+  }
+
+  grouping org-openroadm-device-container {
+    container org-openroadm-device {
+      container info {
+        uses device-common;
+        leaf max-degrees {
+          type uint16;
+          config false;
+          description
+            "Max. number of degrees supported by device";
+        }
+        leaf max-srgs {
+          type uint16;
+          config false;
+          description
+            "Max. number of SRGs in an add/drop group";
+        }
+        leaf max-num-bin-15min-historical-pm {
+          type uint16;
+          config false;
+          description
+            "Max. number of bin the NE support for 15min historical PM";
+        }
+        leaf max-num-bin-24hour-historical-pm {
+          type uint16;
+          config false;
+          description
+            "Max. number of bin the NE support for 24hour historical PM";
+        }
+      }
+      container users {
+        description
+          "Stores a list of users";
+        uses org-openroadm-user-mgmt:user-profile;
+      }
+      container pending-sw {
+        config false;
+        description
+          "pending software information";
+        uses org-openroadm-swdl:sw-bank;
+      }
+      container database-info {
+        config false;
+        description
+          "database restore information";
+        uses org-openroadm-swdl:database-info-group;
+      }
+      uses shelves;
+      uses circuit-packs;
+      uses interfaces-grp;
+      uses protection-groups;
+      container protocols {
+        description
+          "Contains the supported protocols";
+        leaf lifecycle-state {
+          type org-openroadm-common-state-types:lifecycle-state;
+          description
+            "Lifecycle State of the protocols. Whether it is planned or deployed, etc.";
+        }
+      }
+      uses internal-links;
+      uses physical-links;
+      uses external-links;
+      list degree {
+        when "/org-openroadm-device/info/node-type='rdm'";
+        key "degree-number";
+        uses degree;
+      }
+      list shared-risk-group {
+        when "/org-openroadm-device/info/node-type='rdm'";
+        key "srg-number";
+        uses srg;
+      }
+      list line-amplifier {
+        when "/org-openroadm-device/info/node-type='ila'";
+        key "amp-number";
+        description
+          "lists amplifiers in different directions";
+        uses amplifier;
+        list circuit-pack {
+          key "index";
+          description
+            "list for Cards associated with an amplifier";
+          leaf index {
+            type uint32;
+          }
+          uses circuit-pack-name {
+            refine "circuit-pack-name" {
+              mandatory true;
+            }
+          }
+        }
+        list line-port {
+          key "port-direction";
+          description
+            "Port associated with an amplifier which face the line (ila-external): traffic port.";
+          leaf port-direction {
+            type org-openroadm-common-alarm-pm-types:direction;
+            config true;
+            mandatory true;
+            description
+              "partly allows identifying ports associated with logical amp :TX for egress, RX for ingress
+               TXRX in case of bidirectional port";
+          }
+          leaf tx-instance-port-direction-label {
+            type string;
+            config true;
+            description
+              "Complements ports identification. Used notably in case of bidirectional ports,
+               and/or in multi-degree amplifier nodes. Allows associating one of the directions
+               specified in ila-direction-label. Shall be consistent with ila-direction-label";
+          }
+          leaf rx-instance-port-direction-label {
+            type string;
+            config true;
+            description
+              "Complements ports identification. Used notably in case of bidirectional ports,
+               and/or in multi-degree amplifier nodes. Allows associating one of the directions
+               specified in ila-direction-label. Shall be consistent with ila-direction-label";
+          }
+          uses port-name {
+            refine "circuit-pack-name" {
+              mandatory true;
+            }
+            refine "port-name" {
+              mandatory true;
+            }
+          }
+        }
+        list osc-port {
+          key "port-direction";
+          description
+            "Ports associated with OSC";
+          leaf port-direction {
+            type org-openroadm-common-alarm-pm-types:direction;
+            config true;
+            mandatory true;
+            description
+              "allows identifying ports associated with logical amp :
+               TX for OSC circuit-pack IN RX for OSC circuit-pack OUT";
+          }
+          uses port-name {
+            refine "circuit-pack-name" {
+              mandatory true;
+            }
+            refine "port-name" {
+              mandatory true;
+            }
+          }
+        }
+        list otdr-port {
+          key "otdr-direction";
+          description
+            "otdr ports associated with an ILA";
+          leaf otdr-direction {
+            type string;
+            config true;
+            description
+              "allows identifying associated logical amp port in which OTDR is launched:
+               corresponds to rx-instance-port-direction-label of corresponding amplifier line-port";
+          }
+          uses port-name {
+            refine "circuit-pack-name" {
+              mandatory true;
+            }
+            refine "port-name" {
+              mandatory true;
+            }
+          }
+        }
+      }
+      list xponder {
+        when "/org-openroadm-device/info/node-type='xpdr'";
+        key "xpdr-number";
+        uses xponder;
+      }
+      list roadm-connections {
+        when "/org-openroadm-device/info/node-type='rdm'";
+        key "connection-name";
+        uses connection;
+      }
+      list odu-connection {
+        when "/org-openroadm-device/info/node-type='xpdr'";
+        key "connection-name";
+        uses odu-connection;
+      }
+      list connection-map {
+        key "connection-map-number";
+        config false;
+        leaf connection-map-number {
+          type uint32;
+          description
+            "Unique identifier for this connection-map entry";
+        }
+        container source {
+          leaf circuit-pack-name {
+            type leafref {
+              path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+            }
+            mandatory true;
+          }
+          leaf port-name {
+            type leafref {
+              path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
+            }
+            mandatory true;
+            description
+              "Port identifier. Unique within the context of a circuit-pack.";
+          }
+        }
+        list destination {
+          key "circuit-pack-name port-name";
+          min-elements 1;
+          leaf circuit-pack-name {
+            type leafref {
+              path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+            }
+            mandatory true;
+          }
+          leaf port-name {
+            type leafref {
+              path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name";
+            }
+            mandatory true;
+            description
+              "Port identifier. Unique within the context of a circuit-pack.";
+          }
+        }
+      }
+      list odu-switching-pools {
+        when "/org-openroadm-device/info/node-type='xpdr'";
+        key "switching-pool-number";
+        config false;
+        leaf switching-pool-number {
+          type uint16;
+          description
+            "Unique identifier for this odu-switching-pool";
+        }
+        leaf switching-pool-type {
+          type org-openroadm-switching-pool-types:switching-pool-types;
+          description
+            "Blocking/Non-Blocking";
+        }
+        leaf odu-connection-direction-capabilities {
+          type identityref {
+            base connection-direction-identity;
+          }
+          description
+            "Bidrectional capable, or Bi and Unidirectional capable";
+        }
+        list non-blocking-list {
+          key "nbl-number";
+          config false;
+          description
+            "List of ports in a non-blocking switch element";
+          leaf nbl-number {
+            type uint16;
+            description
+              "Identifier for this non-blocking-list. Unique within odu-switching-pool";
+          }
+          leaf interconnect-bandwidth-unit {
+            type uint32;
+            config false;
+            description
+              "Switch fabric interconnect bandwidth unit rate in bits per second.
+               Represents granularity of switch fabric";
+          }
+          leaf interconnect-bandwidth {
+            type uint32;
+            config false;
+            description
+              "Total interconnect bandwidth for a non-blocking element expressed as
+               number of inter-connect-bandwidth units";
+          }
+          list port-list {
+            key "circuit-pack-name port-name";
+            leaf circuit-pack-name {
+              type leafref {
+                path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+              }
+              config false;
+            }
+            leaf port-name {
+              type leafref {
+                path "/org-openroadm-device/circuit-packs/ports/port-name";
+              }
+              config false;
+              description
+                "Port name. Unique within device";
+            }
+          }
+          list pluggable-optics-holder-list {
+            key "circuit-pack-name slot-name";
+            leaf circuit-pack-name {
+              type leafref {
+                path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+              }
+              config false;
+              description
+                "Name of parent circuit-pack";
+            }
+            leaf slot-name {
+              type leafref {
+                path "/org-openroadm-device/circuit-packs/cp-slots/slot-name";
+              }
+              config false;
+              description
+                "Name of pluggable-optics-holder";
+            }
+          }
+        }
+      }
+      list otsigroup-capability-profile {
+        key "profile-name";
+        config false;
+        description
+          "OTSI group operational profile";
+        leaf profile-name {
+          type string;
+          description
+            "OTSI group profile name";
+        }
+        uses otsigroup-capability-grp;
+      }
+      list mc-capability-profile {
+        key "profile-name";
+        config false;
+        description
+          "Media channel capability profile list";
+        leaf profile-name {
+          type string;
+          description
+            "Media channel profile name";
+        }
+        leaf center-freq-granularity {
+          type org-openroadm-common-optical-channel-types:frequency-GHz;
+          default "50";
+          config false;
+          description
+            "Granularity of allowed center frequencies.  The base frequency for this computation is 193.1 THz (G.694.1)";
+        }
+        leaf min-edge-freq {
+          type org-openroadm-common-optical-channel-types:frequency-THz;
+          config false;
+          description
+            "Minimum edge frequency";
+        }
+        leaf max-edge-freq {
+          type org-openroadm-common-optical-channel-types:frequency-THz;
+          config false;
+          description
+            "Maximum edge frequency";
+        }
+        leaf slot-width-granularity {
+          type org-openroadm-common-optical-channel-types:frequency-GHz;
+          default "50";
+          config false;
+          description
+            "Width of a slot measured in GHz.";
+        }
+        leaf min-slots {
+          type uint32;
+          default "1";
+          config false;
+          description
+            "Minimum number of slots permitted to be joined together to form a media channel.  Must be less than or equal to the max-slots";
+        }
+        leaf max-slots {
+          type uint32;
+          default "1";
+          config false;
+          description
+            "Maximum number of slots permitted to be joined together to form a media channel.  Must be greater than or equal to the min-slots";
+        }
+      }
+      list split-lambda-profile {
+        key "profile-name";
+        config false;
+        description
+          "OTN capability profile";
+        leaf profile-name {
+          type string;
+          description
+            "Split lambda profile name";
+        }
+        uses split-lambda-capability-grp;
+      }
+      list otn-odu-mux-hierarchy-profile {
+        key "profile-name";
+        config false;
+        description
+          "OTN ODU mux hierarchy profile list";
+        leaf profile-name {
+          type string;
+          description
+            "OTN ODU mux hierarchy profile name";
+        }
+        uses otn-odu-mux-hierarchy-grp;
+      }
+      list optical-operational-mode-profile {
+        key "profile-name";
+        config false;
+        description
+          "Optical operational profile";
+        leaf profile-name {
+          type string;
+          description
+            "Optical operational profile name";
+        }
+        uses org-openroadm-optical-operational-interfaces:optical-operational-modes-grp-attr;
+      }
+      list otn-capability-profile {
+        key "profile-name";
+        config false;
+        description
+          "OTN capability profile";
+        leaf profile-name {
+          type string;
+          description
+            "OTN capability profile name";
+        }
+        uses otn-capability-grp;
+      }
+      list muxp-profile {
+        key "profile-name";
+        config false;
+        description
+          "Muxp profile list";
+        leaf profile-name {
+          type string;
+          description
+            "Mux profile name";
+        }
+        uses mux-grp;
+      }
+    }
+  }
+
+  grouping common-session-parms {
+    description
+      "Common session parameters to identify a
+       management session.";
+    leaf username {
+      type org-openroadm-user-mgmt:username-type;
+      mandatory true;
+      description
+        "Name of the user for the session.";
+    }
+    leaf session-id {
+      type ietf-nc:session-id-or-zero-type;
+      mandatory true;
+      description
+        "Identifier of the session.
+         A NETCONF session MUST be identified by a non-zero value.
+         A non-NETCONF session MAY be identified by the value zero.";
+    }
+    leaf source-host {
+      type ietf-inet-types:ip-address;
+      description
+        "Address of the remote host for the session.";
+    }
+  }
+
+  grouping changed-by-parms {
+    description
+      "Common parameters to identify the source
+       of a change event, such as a configuration
+       or capability change.";
+    container changed-by {
+      description
+        "Indicates the source of the change.
+         If caused by internal action, then the
+         empty leaf 'server' will be present.
+         If caused by a management session, then
+         the name, remote host address, and session ID
+         of the session that made the change will be reported.";
+      choice server-or-user {
+        leaf server {
+          type empty;
+          description
+            "If present, the change was caused
+             by the server.";
+        }
+        case by-user {
+          uses common-session-parms;
+        }
+      }
+    }
+  }
+
+  rpc led-control {
+    description
+      "This command is used to allow user to find an entity on the NE,
+       The specified entity will have LED blinking.
+       The equipmentLedOn alarm will be raised and cleared for the indication";
+    input {
+      choice equipment-entity {
+        mandatory true;
+        case shelf {
+          leaf shelf-name {
+            type leafref {
+              path "/org-openroadm-device/shelves/shelf-name";
+            }
+            mandatory true;
+            description
+              "shelf-name for the operation";
+          }
+        }
+        case circuit-pack {
+          leaf circuit-pack-name {
+            type leafref {
+              path "/org-openroadm-device/circuit-packs/circuit-pack-name";
+            }
+            mandatory true;
+            description
+              "circuit-pack-name for the operation";
+          }
+        }
+      }
+      leaf enabled {
+        type boolean;
+        mandatory true;
+        description
+          "led-control enabled flag.
+           when enabled=true,  equipmentLedOn alarm will be raised
+           when enabled=false, equipmentLedOn alarm will be cleared";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc create-tech-info {
+    description
+      "Collects all log data for debugging and place it in a location accessible via ftp/sftp.
+       This model assumes ASYNC operation, i.e. the command will return after the device accepts the command,
+       A create-tech-info-notification will be send out later for the result of the operation.
+       The log-file is cleared at the start of every create-tech-info operation in order to ensure
+       the up-to-date logs are collected. If a vendor does not support concurrent log collection, the second
+       create-tech-info command will be rejected.";
+    input {
+      leaf shelf-id {
+        type leafref {
+          path "/org-openroadm-device/shelves/shelf-name";
+        }
+        description
+          "This optional field is used to specify the shelf for log collection.
+           When this filed is not provided, it is expected to collect logs for the whole node.
+           Vendor should reject the command if the whole node log collection is not supported.";
+      }
+      leaf log-option {
+        type string;
+        description
+          "The log type a vendor can specify. Maybe used in future";
+      }
+    }
+    output {
+      uses create-tech-info-group;
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc get-connection-port-trail {
+    input {
+      leaf connection-name {
+        type string;
+        mandatory true;
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+      list ports {
+        uses org-openroadm-device-types:physical-location;
+        uses port-name {
+          refine "circuit-pack-name" {
+            mandatory true;
+          }
+          refine "port-name" {
+            mandatory true;
+          }
+        }
+      }
+    }
+  }
+
+  rpc disable-automatic-shutoff {
+    input {
+      choice degree-or-amp {
+        mandatory true;
+        description
+          "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";
+        case degree {
+          leaf degree-number {
+            type leafref {
+              path "/org-openroadm-device/degree/degree-number";
+            }
+            mandatory true;
+            description
+              "The degree-number defined in degree";
+          }
+        }
+        case amp {
+          leaf amp-number {
+            type leafref {
+              path "/org-openroadm-device/line-amplifier/amp-number";
+            }
+            mandatory true;
+            description
+              "The amp-number defined in line-amplifier";
+          }
+        }
+      }
+      leaf support-timer {
+        type uint16 {
+          range "1..600";
+        }
+        default "20";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc start-scan {
+    input {
+      choice degree-or-amp {
+        mandatory true;
+        description
+          "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";
+        case degree {
+          leaf degree-number {
+            type leafref {
+              path "/org-openroadm-device/degree/degree-number";
+            }
+            mandatory true;
+            description
+              "The degree-number defined in degree";
+          }
+        }
+        case amp {
+          leaf amp-number {
+            type leafref {
+              path "/org-openroadm-device/line-amplifier/amp-number";
+            }
+            mandatory true;
+            description
+              "The amp-number defined in line-amplifier";
+          }
+        }
+      }
+      leaf port-direction {
+        type org-openroadm-common-alarm-pm-types:direction;
+      }
+      leaf distance {
+        type uint32;
+      }
+      leaf resolution {
+        type uint32;
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc set-current-datetime {
+    description
+      "Set the info/current-datetime leaf to the specified value.";
+    input {
+      leaf current-datetime {
+        type ietf-yang-types:date-and-time;
+        mandatory true;
+        description
+          "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification create-tech-info-notification {
+    description
+      "This Notification is sent when the create-tech-info is complete or failed.";
+    uses create-tech-info-group;
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+
+  notification otdr-scan-result {
+    description
+      "This Notification is sent when the otdr-scan-result is complete or failed.";
+    uses org-openroadm-common-types:rpc-response-status;
+    leaf result-file {
+      type string;
+    }
+  }
+
+  notification change-notification {
+    description
+      "The Notification that a resource has been added, modified or removed.
+       This notification can be triggered by changes in configuration and operational data.
+       It shall contain the changed field pointed by the xpath.
+       Typically it is not intended for frequently changing volatile data e.g. PM, power levels";
+    leaf change-time {
+      type ietf-yang-types:date-and-time;
+      description
+        "The time the change occurs.";
+    }
+    uses changed-by-parms;
+    leaf datastore {
+      type enumeration {
+        enum running {
+          description
+            "The <running> datastore has changed.";
+        }
+        enum startup {
+          description
+            "The <startup> datastore has changed";
+        }
+      }
+      default "running";
+      description
+        "Indicates which configuration datastore has changed.";
+    }
+    list edit {
+      description
+        "An edit (change) record SHOULD be present for each distinct
+         edit operation that the server has detected on
+         the target datastore.  This list MAY be omitted
+         if the detailed edit operations are not known.
+         The server MAY report entries in this list for
+         changes not made by a NETCONF session.";
+      leaf target {
+        type instance-identifier;
+        description
+          "Top most node associated with the configuration or operational change.
+           A server SHOULD set this object to the node within
+           the datastore that is being altered.  A server MAY
+           set this object to one of the ancestors of the actual
+           node that was changed, or omit this object, if the
+           exact node is not known.";
+      }
+      leaf operation {
+        type ietf-nc:edit-operation-type;
+        description
+          "Type of edit operation performed.
+           A server MUST set this object to the NETCONF edit
+           operation performed on the target datastore.";
+      }
+    }
+  }
+
+  uses org-openroadm-device-container;
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-dhcp@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-dhcp@2020-05-29.yang
new file mode 100644 (file)
index 0000000..9562d12
--- /dev/null
@@ -0,0 +1,144 @@
+module org-openroadm-dhcp {
+  namespace "http://org/openroadm/dhcp";
+  prefix org-openroadm-dhcp;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import ietf-inet-types {
+    prefix ietf-inet-types;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for dhcp protocol.
+
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2017-03-16 {
+    description
+      "Version 3.0";
+  }
+
+  grouping dhcp-relay {
+    container ipv4-dhcp-relay {
+      list ipv4-server-group {
+        key "server-group-name";
+        description
+          "DHCP server group configuration that DHCP relays to";
+        leaf server-group-name {
+          type string;
+          description
+            "Name of the server-group";
+        }
+        leaf-list interface-name {
+          type leafref {
+            path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+          }
+          description
+            "Name of the interface";
+        }
+        leaf-list server-address {
+          type ietf-inet-types:ipv4-address;
+          description
+            "List of IPv4 server addresses";
+        }
+      }
+    }
+    container ipv6-dhcp-relay {
+      list ipv6-server-group {
+        key "server-group-name";
+        description
+          "DHCP server group configuration that DHCP relays to";
+        leaf server-group-name {
+          type string;
+          description
+            "Name of the server-group";
+        }
+        leaf-list interface-name {
+          type leafref {
+            path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+          }
+          description
+            "Name of the interface";
+        }
+        leaf-list server-address {
+          type ietf-inet-types:ipv6-address;
+          description
+            "List of IPv6 server addresses";
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
+    when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='xpdr'";
+    uses dhcp-relay;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ethernet-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ethernet-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..6b56b92
--- /dev/null
@@ -0,0 +1,235 @@
+module org-openroadm-ethernet-interfaces {
+  yang-version 1.1;
+  namespace "http://org/openroadm/ethernet-interfaces";
+  prefix org-openroadm-eth-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-maintenance-testsignal {
+    prefix org-openroadm-maint-testsignal;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-maintenance-loopback {
+    prefix org-openroadm-maint-loopback;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility ethernet interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping eth-attributes {
+    leaf speed {
+      type uint32;
+      description
+        "Set speed of the interface, unit mbps.
+         This is for ETH facility.
+         Applies to both management and transport Ethernet.
+         Optional, must be specified for transport Ethernet or when auto-negotiation is disabled.";
+    }
+
+    uses org-openroadm-common-types:fec-grouping {
+      description
+        "Forward Error Correction Choices.
+         Applies to transport Ethernet. Mandatory for transport Ethernet.";
+    }
+
+    leaf duplex {
+      type enumeration {
+        enum half {
+          value 0;
+          description
+            "half duplex";
+        }
+        enum full {
+          value 1;
+          description
+            "full duplex";
+        }
+      }
+      default "full";
+      description
+        "Set duplex selections.
+         Applies to both management and transport Ethernet.
+         Optional, default “full”. Transport Ethernet only supports full.";
+    }
+    leaf auto-negotiation {
+      type enumeration {
+        enum enabled {
+          value 1;
+          description
+            "Auto Negotiation enabled";
+        }
+        enum disabled {
+          value 0;
+          description
+            "Auto Negotiation disabled";
+        }
+      }
+      default "enabled";
+      description
+        "Set Auto Negotiation: Enabled/Disabled.
+         Applies to both management and transport Ethernet.
+         Optional, default “enabled”. Transport Ethernet only supports enabled.";
+    }
+    leaf curr-speed {
+      type string;
+      config false;
+      description
+        "Speed (UNKNOWN/AUTO/10/100/1000/10000) corresponding to the interface.
+         Applies to both management and transport Ethernet.";
+    }
+    leaf curr-duplex {
+      type string;
+      config false;
+      description
+        "Duplex (HALF/FULL) corresponding to the interface.
+         Applies to both management and transport Ethernet.";
+    }
+    leaf max-frame-size {
+      type uint32;
+      config false;
+      description
+        "Maximum Frame Size.  Applies to management Ethernet.";
+    }
+    container subrate-eth-sla {
+      presence "Explicit assignment of subrate ethernet allocation";
+      description
+        "SLA (Service Level Agreement) for subrate Ethernet.
+         Applies to transport Ethernet.";
+      uses org-openroadm-common-types:eth-rate-and-burst-size;
+    }
+    description
+      "Ethernet attributes grouping";
+  }
+
+  grouping ethernet-container {
+    container ethernet {
+      description
+        "Ethernet Interfaces.
+         Maintenance test signal and loopback provisioning is supported for transport Ethernet.";
+      uses eth-attributes;
+      uses org-openroadm-maint-testsignal:maint-testsignal;
+      uses org-openroadm-maint-loopback:maint-loopback;
+    }
+    description
+      "Ethernet container grouping";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:ethernetCsmacd'";
+    uses ethernet-container;
+    description
+      "Augment for interface";
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-file-transfer@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-file-transfer@2020-05-29.yang
new file mode 100644 (file)
index 0000000..acb8a99
--- /dev/null
@@ -0,0 +1,247 @@
+module org-openroadm-file-transfer {
+  namespace "http://org/openroadm/file-transfer";
+  prefix org-openroadm-file-txr;
+
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+  import ietf-yang-types {
+    prefix ietf-yang-types;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for file management related rpcs.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  rpc transfer {
+    description
+      "File transfer using FTP/SFTP";
+    input {
+      leaf action {
+        type enumeration {
+          enum upload {
+            description
+              "Specify the upload action. The NE (SFTP/FTP client) sends
+               the file identified by the local-file-path
+               to the remote-file-path.";
+          }
+          enum download {
+            description
+              "Specify the download action. The NE (SFTP/FTP client) retrieves
+               the file identified by the remote-file-path
+               to the local-file-path.";
+          }
+        }
+        mandatory true;
+        description
+          "Type of action - download/upload.";
+      }
+      leaf local-file-path {
+        type string;
+        mandatory true;
+        description
+          "Local file path.
+           Ex: /var/shared/example.txt";
+      }
+      leaf remote-file-path {
+        type inet:uri;
+        mandatory true;
+        description
+          "Remote file path.
+           A URI for the remote file path.
+
+           Format:sftp://user[:password]@host[:port]/path.
+           Ex: sftp://test:verify@[2001:db8:0:1::10]:22/home/user/sample";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc show-file {
+    description
+      "Show one or more files in the specified directory.";
+    input {
+      leaf filename {
+        type string {
+          length "1..255";
+        }
+        default "*";
+        description
+          "Specify file(s) to be listed (* is allowed as wild-card). ";
+      }
+    }
+    output {
+      leaf status {
+        type org-openroadm-common-types:rpc-status;
+        mandatory true;
+        description
+          "RPC status";
+      }
+      leaf status-message {
+        type string;
+        description
+          "status message";
+      }
+      list file {
+        key "filename";
+        description
+          "output file list";
+        leaf filename {
+          type string;
+          description
+            "output filename";
+        }
+        leaf file-size {
+          type uint64;
+          mandatory true;
+          description
+            "output file size";
+        }
+        leaf modified-date {
+          type ietf-yang-types:date-and-time;
+          mandatory true;
+          description
+            "output modified date";
+        }
+      }
+    }
+  }
+
+  rpc delete-file {
+    description
+      "Delete one or more files in the specified directory.";
+    input {
+      leaf filename {
+        type string {
+          length "1..255";
+        }
+        mandatory true;
+        description
+          "Specify file(s) to be deleted (* is allowed as wild-card).";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification transfer-notification {
+    description
+      "notification for transfer operation events.";
+    leaf local-file-path {
+      type string;
+      description
+        "Local file path used in transfer RPC.";
+    }
+    uses org-openroadm-common-types:extended-rpc-response-status;
+    container progress {
+      when "current()/../status = 'In-progress'";
+      description
+        "progress status when response is in-progress";
+      leaf bytes-transferred {
+        type uint64;
+        description
+          "bytes transferred.";
+      }
+      leaf percentage-complete {
+        type uint8;
+        description
+          "percentage completed.";
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-fwdl@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-fwdl@2020-05-29.yang
new file mode 100644 (file)
index 0000000..b9b300f
--- /dev/null
@@ -0,0 +1,116 @@
+module org-openroadm-fwdl {
+  namespace "http://org/openroadm/fwdl";
+  prefix org-openroadm-fwdl;
+
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This module contains definitions for System Management.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  rpc fw-update {
+    description
+      "Fpga data update";
+    input {
+      leaf circuit-pack-name {
+        type string;
+        description
+          "Name of the circuit pack";
+      }
+      leaf boot {
+        type boolean;
+        default "false";
+        description
+          "Flag to update boot loader or unprotected firmware";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-gcc-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-gcc-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..99a7420
--- /dev/null
@@ -0,0 +1,137 @@
+module org-openroadm-gcc-interfaces {
+  namespace "http://org/openroadm/gcc-interfaces";
+  prefix org-openroadm-gcc-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility gcc interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reprgccce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote prgcccts derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0";
+  }
+
+  grouping gcc-interfaces {
+    container gcc {
+      description
+        "GCC Channel on OTN interface.";
+      leaf gcc-channel-type {
+        type enumeration {
+          enum gcc0 {
+            value 1;
+            description
+              "OTU GCC0 channel";
+          }
+          enum gcc1 {
+            value 2;
+            description
+              "ODU GCC1 channel";
+          }
+          enum gcc2 {
+            value 3;
+            description
+              "ODU GCC2 channel";
+          }
+          enum gcc1-gcc2 {
+            value 4;
+            description
+              "Combined ODU GCC channel";
+          }
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:gcc'";
+    uses gcc-interfaces;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-gnmi@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-gnmi@2020-05-29.yang
new file mode 100644 (file)
index 0000000..874cfab
--- /dev/null
@@ -0,0 +1,113 @@
+module org-openroadm-gnmi {
+  yang-version 1.1;
+  namespace "http://org/openroadm/gnmi";
+  prefix org-openroadm-gnmi;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-security {
+    prefix org-openroadm-security;
+    revision-date 2020-05-29;
+  }
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for gnmi protocol.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Initial revision.";
+  }
+
+  grouping gnmi_container {
+    description
+      "Grouping for setting of GNMI attributes ";
+    container gnmi {
+      description
+        "gRPC Network Management Interface related configurations";
+      leaf enabled {
+        type boolean;
+        must "(current()='true' and ../certificate-id) or current()='false'" {
+          error-message "certificate-id should be configured to enable gNMI.";
+        }
+        default "false";
+        description
+          "Enable/Disable gNMI.";
+      }
+      leaf certificate-id {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-security:security/org-openroadm-security:certificate/org-openroadm-security:certificate-id";
+        }
+        description
+          "ID of the certificate from security table";
+      }
+      leaf port {
+        type inet:port-number;
+        default "6030";
+        description
+          "gNMI port to listen on";
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
+    description
+      "Creation of GNMI container under device protols ";
+    uses gnmi_container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ip@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ip@2020-05-29.yang
new file mode 100644 (file)
index 0000000..96ee2e7
--- /dev/null
@@ -0,0 +1,347 @@
+module org-openroadm-ip {
+  namespace "http://org/openroadm/ip";
+  prefix org-openroadm-ip;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines Yang model for IP (IPv4 and IPv6) interfaces.
+
+     This model reuses data items defined in the IETF YANG model for
+     interfaces described by RFC 7277.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2014-06-16 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 7277: A YANG Data Model for IP Management";
+  }
+
+  feature ipv4-non-contiguous-netmasks {
+    description
+      "Indicates support for configuring non-contiguous
+       subnet masks.";
+  }
+
+  feature ipv6-privacy-autoconf {
+    description
+      "Indicates support for Privacy Extensions for Stateless Address
+       Autoconfiguration in IPv6.";
+    reference
+      "RFC 4941: Privacy Extensions for Stateless Address
+                 Autoconfiguration in IPv6";
+  }
+
+  typedef ip-address-origin {
+    type enumeration {
+      enum other {
+        description
+          "None of the following.";
+      }
+      enum static {
+        description
+          "Indicates that the address has been statically
+           configured - for example, using NETCONF or a Command Line
+           Interface.";
+      }
+      enum dhcp {
+        description
+          "Indicates an address that has been assigned to this
+           system by a DHCP server.";
+      }
+      enum link-layer {
+        description
+          "Indicates an address created by IPv6 stateless
+           autoconfiguration that embeds a link-layer address in its
+           interface identifier.";
+      }
+      enum random {
+        description
+          "Indicates an address chosen by the system at
+
+           random, e.g., an IPv4 address within 169.254/16, an
+           RFC 4941 temporary address, or an RFC 7217 semantically
+           opaque address.";
+        reference
+          "RFC 4941: Privacy Extensions for Stateless Address
+                     Autoconfiguration in IPv6
+           RFC 7217: A Method for Generating Semantically Opaque
+                     Interface Identifiers with IPv6 Stateless
+                     Address Autoconfiguration (SLAAC)";
+      }
+    }
+    description
+      "The origin of an address.";
+  }
+
+  typedef neighbor-origin {
+    type enumeration {
+      enum other {
+        description
+          "None of the following.";
+      }
+      enum static {
+        description
+          "Indicates that the mapping has been statically
+           configured - for example, using NETCONF or a Command Line
+           Interface.";
+      }
+      enum dynamic {
+        description
+          "Indicates that the mapping has been dynamically resolved
+           using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery
+           protocol.";
+      }
+    }
+    description
+      "The origin of a neighbor entry.";
+  }
+
+  grouping ip-grp {
+    container ipv4 {
+      presence "Enables IPv4 unless the 'enabled' leaf
+                (which defaults to 'true') is set to 'false'";
+      description
+        "Parameters for the IPv4 address family.";
+      leaf enabled {
+        type boolean;
+        default "false";
+        description
+          "Controls whether IPv4 is enabled or disabled on this
+           interface.  When IPv4 is enabled, this interface is
+           connected to an IPv4 stack, and the interface can send
+           and receive IPv4 packets.";
+      }
+      leaf forwarding {
+        type boolean;
+        default "false";
+        description
+          "Controls IPv4 packet forwarding of datagrams received by,
+           but not addressed to, this interface.  IPv4 routers
+           forward datagrams.  IPv4 hosts do not (except those
+           source-routed via the host).";
+      }
+      leaf mtu {
+        type uint16 {
+          range "68..max";
+        }
+        units "octets";
+        default "1500";
+        description
+          "The size, in octets, of the largest IPv4 packet that the
+           interface will send and receive.
+
+           The server may restrict the allowed values for this leaf,
+           depending on the interface's type.
+
+           If this leaf is not configured, the operationally used MTU
+           depends on the interface's type.
+
+           The max value supported must be at least 9000.";
+        reference
+          "RFC 791: Internet Protocol";
+      }
+      leaf address-src {
+        when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface[org-openroadm-device:name='UNNUMBERED']";
+        type enumeration {
+          enum NEM {
+            value 1;
+          }
+        }
+        description
+          "The source of the shared IP address for unnumbered IP interface.";
+      }
+      leaf address-force {
+        when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface[org-openroadm-device:name='UNNUMBERED']";
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-ip:ipv4/org-openroadm-ip:address/org-openroadm-ip:ip";
+        }
+        must "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface[org-openroadm-device:name='NEM']/org-openroadm-ip:ipv4/org-openroadm-ip:address[org-openroadm-ip:ip=current()]/org-openroadm-ip:ip = current()" {
+          error-message "IP address shall be sourced from the NEM interface only";
+        }
+        must 'not (../address-src)' {
+          error-message "Both address-src & address-force cannot be configured at the same time";
+        }
+        description
+          "The IP address to use for the unnumbered interface";
+      }
+      list address {
+        key "ip";
+        description
+          "The list of configured IPv4 addresses on the interface.";
+        leaf ip {
+          type inet:ipv4-address-no-zone;
+          description
+            "The IPv4 address on the interface.";
+        }
+        leaf preferred {
+          when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface[org-openroadm-device:name='NEM']";
+          type enumeration {
+            enum true {
+              value 1;
+            }
+            enum false {
+              value 0;
+            }
+          }
+          default "false";
+          description
+            "Mark address availability for unnumbered interface use.";
+        }
+        choice subnet {
+          mandatory true;
+          description
+            "The subnet can be specified as a prefix-length, or,
+             if the server supports non-contiguous netmasks, as
+             a netmask.";
+          leaf prefix-length {
+            type uint8 {
+              range "0..32";
+            }
+            description
+              "The length of the subnet prefix.";
+          }
+          leaf netmask {
+            if-feature "ipv4-non-contiguous-netmasks";
+            type yang:dotted-quad;
+            description
+              "The subnet specified as a netmask.";
+          }
+        }
+      }
+    }
+    container ipv6 {
+      presence "Enables IPv6 unless the 'enabled' leaf
+                (which defaults to 'true') is set to 'false'";
+      description
+        "Parameters for the IPv6 address family.";
+      leaf enabled {
+        type boolean;
+        default "false";
+        description
+          "Controls whether IPv6 is enabled or disabled on this
+           interface.  When IPv6 is enabled, this interface is
+           connected to an IPv6 stack, and the interface can send
+           and receive IPv6 packets.";
+      }
+      leaf forwarding {
+        type boolean;
+        default "false";
+        description
+          "Controls IPv6 packet forwarding of datagrams received by,
+           but not addressed to, this interface.  IPv6 routers
+           forward datagrams.  IPv6 hosts do not (except those
+           source-routed via the host).";
+        reference
+          "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+                     Section 6.2.1, IsRouter";
+      }
+      leaf mtu {
+        type uint32 {
+          range "1280..1500";
+        }
+        units "octets";
+        default "1500";
+        description
+          "The size, in octets, of the largest IPv6 packet that the
+           interface will send and receive.
+
+           The server may restrict the allowed values for this leaf,
+           depending on the interface's type.
+
+           If this leaf is not configured, the operationally used MTU
+           depends on the interface's type.";
+        reference
+          "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+                     Section 5";
+      }
+      list address {
+        key "ip";
+        description
+          "The list of configured IPv6 addresses on the interface.";
+        leaf ip {
+          type inet:ipv6-address-no-zone;
+          description
+            "The IPv6 address on the interface.";
+        }
+        leaf prefix-length {
+          type uint8 {
+            range "0..128";
+          }
+          mandatory true;
+          description
+            "The length of the subnet prefix.";
+        }
+      }
+    }
+    description
+     "Grouping for ip";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:ip'";
+    description
+      "Parameters for configuring IP on interfaces.
+
+       If an interface is not capable of running IP, the server
+       must not allow the client to configure these parameters.";
+    uses ip-grp;
+    }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ipv4-unicast-routing@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ipv4-unicast-routing@2020-05-29.yang
new file mode 100644 (file)
index 0000000..48e3064
--- /dev/null
@@ -0,0 +1,128 @@
+module org-openroadm-ipv4-unicast-routing {
+  namespace "http://org/openroadm/ipv4-unicast-routing";
+  prefix org-openroadm-ipv4-unicast-routing;
+
+  import org-openroadm-routing {
+    prefix org-openroadm-routing;
+    revision-date 2020-05-29;
+  }
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines Yang model for IPv4 unicast routing.
+
+     This model reuses data items defined in the IETF YANG model for
+     interfaces described by RFC 8022.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2015-05-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC XXXX: A YANG Data Model for Routing Management";
+  }
+
+  identity ipv4-unicast {
+    base org-openroadm-routing:ipv4;
+    description
+      "This identity represents the IPv4 unicast address family.";
+  }
+
+  grouping ipv4-uni-grp {
+    container ipv4 {
+      description
+        "Configuration of a 'static' pseudo-protocol instance
+         consists of a list of routes.";
+      list route {
+        key "destination-prefix";
+        max-elements 32;
+        ordered-by user;
+        description
+          "A user-ordered list of static routes.";
+        leaf destination-prefix {
+          type inet:ipv4-prefix;
+          mandatory true;
+          description
+            "IPv4 destination prefix.";
+        }
+        leaf description {
+          type string;
+          description
+            "Textual description of the route.";
+        }
+        container next-hop {
+          description
+            "Configuration of next-hop.";
+          uses org-openroadm-routing:next-hop-content {
+            augment "next-hop-options" {
+              description
+                "Add next-hop address case.";
+              leaf next-hop-address {
+                type inet:ipv4-address;
+                description
+                  "IPv4 address of the next-hop.";
+              }
+            }
+          }
+        }
+      }
+    }
+    description
+     "Grouping for IPv4";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-routing:static-routes" {
+    description
+      "This augment defines the configuration of the 'static'
+       pseudo-protocol with data specific to IPv4 unicast.";
+    uses ipv4-uni-grp;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ipv6-unicast-routing@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ipv6-unicast-routing@2020-05-29.yang
new file mode 100644 (file)
index 0000000..992f1cb
--- /dev/null
@@ -0,0 +1,127 @@
+module org-openroadm-ipv6-unicast-routing {
+  namespace "http://org/openroadm/ipv6-unicast-routing";
+  prefix org-openroadm-ipv6-unicast-routing;
+
+  import org-openroadm-routing {
+    prefix org-openroadm-routing;
+    revision-date 2020-05-29;
+  }
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines Yang model for IPv6 unicast routing.
+
+     This model reuses data items defined in the IETF YANG model for
+     interfaces described by RFC 8022.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2015-05-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC XXXX: A YANG Data Model for Routing Management";
+  }
+
+  identity ipv6-unicast {
+    base org-openroadm-routing:ipv6;
+    description
+      "This identity represents the IPv6 unicast address family.";
+  }
+
+  grouping ipv6-uni-grp {
+    container ipv6 {
+      description
+        "Configuration of a 'static' pseudo-protocol instance
+         consists of a list of routes.";
+      list route {
+        key "destination-prefix";
+        ordered-by user;
+        description
+          "A user-ordered list of static routes.";
+        leaf destination-prefix {
+          type inet:ipv6-prefix;
+          mandatory true;
+          description
+            "IPv6 destination prefix.";
+        }
+        leaf description {
+          type string;
+          description
+            "Textual description of the route.";
+        }
+        container next-hop {
+          description
+            "Configuration of next-hop.";
+          uses org-openroadm-routing:next-hop-content {
+            augment "next-hop-options" {
+              description
+                "Add next-hop address case.";
+              leaf next-hop-address {
+                type inet:ipv6-address;
+                description
+                  "IPv6 address of the next-hop.";
+              }
+            }
+          }
+        }
+      }
+    }
+    description
+      "Grouping for IPv6";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-routing:static-routes" {
+    description
+      "This augment defines the configuration of the 'static'
+       pseudo-protocol with data specific to IPv6 unicast.";
+    uses ipv6-uni-grp;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-key-chain@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-key-chain@2019-11-29.yang
new file mode 100644 (file)
index 0000000..69d8d8c
--- /dev/null
@@ -0,0 +1,230 @@
+module org-openroadm-key-chain {
+  namespace "http://org/openroadm/key-chain";
+  prefix org-openroadm-key-chain;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines the Yang model for key chain.
+
+     This model reuses data items defined in the IETF YANG model for
+     key-chain as described by RFC 8177.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Initial revision.";
+  }
+
+  feature hex-key-string {
+    description
+      "Support hexadecimal key string.";
+  }
+
+  feature independent-send-accept-lifetime {
+    description
+      "Support for independent send and accept key lifetimes.";
+  }
+
+  feature crypto-hmac-sha-1-12 {
+    description
+      "Support for TCP HMAC-SHA-1 12 byte digest hack.";
+  }
+
+  typedef key-chain-ref {
+    type leafref {
+      path "/org-openroadm-key-chain:key-chains/key-chain-list/org-openroadm-key-chain:name";
+    }
+    description
+      "This type is used by data models that need to reference
+       configured key-chains.";
+  }
+
+  grouping lifetime {
+    description
+      "Key lifetime specification.";
+    choice lifetime {
+      default "always";
+      description
+        "Options for specifying key accept or send lifetimes";
+      case always {
+        leaf always {
+          type empty;
+          description
+            "Indicates key lifetime is always valid.";
+        }
+      }
+      case start-end-time {
+        leaf start-date-time {
+          type yang:date-and-time;
+          description
+            "Start time.";
+        }
+        choice end-time {
+          default "infinite";
+          description
+            "End-time setting.";
+          case infinite {
+            leaf no-end-time {
+              type empty;
+              description
+                "Indicates key lifetime end-time in infinite.";
+            }
+          }
+          case duration {
+            leaf duration {
+              type uint32 {
+                range "1..2147483646";
+              }
+              units "seconds";
+              description
+                "Key lifetime duration, in seconds";
+            }
+          }
+          case end-date-time {
+            leaf end-date-time {
+              type yang:date-and-time;
+              description
+                "End time.";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  grouping crypto-algorithm-types {
+    description
+      "Cryptographic algorithm types.";
+    choice algorithm {
+      description
+        "Options for crytographic algorithm specification.";
+      case md5 {
+        leaf md5 {
+          type empty;
+          description
+            "The MD5 algorithm.";
+        }
+      }
+    }
+  }
+
+  grouping key-chain {
+    description
+      "key-chain specification grouping.";
+    leaf name {
+      type string;
+      description
+        "Name of the key-chain.";
+    }
+    list key-chain-entry {
+      key "key-id";
+      description
+        "One key.";
+      leaf key-id {
+        type uint64 {
+          range "1..255" {
+            error-message "Configured value is out of range";
+          }
+        }
+        description
+          "Key id.";
+      }
+      container key-string {
+        description
+          "The key string.";
+        choice key-string-style {
+          description
+            "Key string styles";
+          case keystring {
+            leaf keystring {
+              type string {
+                length "1..16" {
+                  error-message "Configured string exceeds the maximum length";
+                }
+              }
+              description
+                "Key string in ASCII format.";
+            }
+          }
+          case hexadecimal {
+            if-feature "hex-key-string";
+          }
+        }
+      }
+      container crypto-algorithm {
+        description
+          "Cryptographic algorithm associated with key.";
+        uses crypto-algorithm-types;
+      }
+    }
+  }
+
+  container key-chains {
+    description
+      "All configured key-chains for the device.";
+    list key-chain-list {
+      key "name";
+      description
+        "List of key-chains.";
+      uses key-chain;
+    }
+  }
+  container key-chains-state {
+    config false;
+    description
+      "All configured key-chains state.";
+    list key-chain-list-state {
+      description
+        "One key-chain state.";
+      leaf name-state {
+        type string;
+        description
+          "Configured name of the key-chain.";
+      }
+      list key-chain-entry {
+        key "key-id";
+        description
+          "One key.";
+        leaf key-id {
+          type uint64;
+          description
+            "Configurd key id.";
+        }
+        container crypto-algorithm-state {
+          description
+            "Configured cryptographic algorithm.";
+          uses crypto-algorithm-types;
+        }
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-lldp@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-lldp@2020-05-29.yang
new file mode 100644 (file)
index 0000000..a541eac
--- /dev/null
@@ -0,0 +1,365 @@
+module org-openroadm-lldp {
+  namespace "http://org/openroadm/lldp";
+  prefix org-openroadm-lldp;
+
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import iana-afn-safi {
+    prefix ianaaf;
+    revision-date 2013-07-04;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for lldp protocol.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping nbr-info-grp {
+    description
+      "Display LLDP Neighbour ";
+    leaf remoteSysName {
+      type string;
+      description
+        "remote neighbour system name";
+    }
+    leaf remoteMgmtAddressSubType {
+      type ianaaf:address-family;
+      description
+        "remote neighbour Management Address Subtype Enumeration";
+    }
+    leaf remoteMgmtAddress {
+      type inet:ip-address;
+      description
+        "remote neighbour management address";
+    }
+    leaf remotePortIdSubType {
+      type enumeration {
+        enum other {
+          value 0;
+          description
+            "reserved";
+        }
+        enum ifalias {
+          value 1;
+          description
+            "Interface Alias (IfAlias - IETF RFC 2863) ";
+        }
+        enum portcomponent {
+          value 2;
+          description
+            "Port component (EntPhysicalAlias IETF RFC 4133)";
+        }
+        enum macaddress {
+          value 3;
+          description
+            "MAC address (IEEE Std 802) ";
+        }
+        enum networkaddress {
+          value 4;
+          description
+            "Network Address";
+        }
+        enum ifname {
+          value 5;
+          description
+            "Interface Name (ifName - IETF RFC 2863)";
+        }
+        enum agentcircuitid {
+          value 6;
+          description
+            "Agent Circuit Id (IETF RFC 3046)";
+        }
+        enum local {
+          value 7;
+          description
+            "Locally assigned";
+        }
+      }
+      description
+        "remote neighbour Port ID Subtype Enumeration";
+    }
+    leaf remotePortId {
+      type string;
+      description
+        "remote neighbour port Id";
+    }
+    leaf remoteChassisIdSubType {
+      type enumeration {
+        enum reserved {
+          value 0;
+          description
+            "reserved";
+        }
+        enum chassiscomponent {
+          value 1;
+          description
+            "Chassis component (EntPhysicalAlias IETF RFC 4133)";
+        }
+        enum ifalias {
+          value 2;
+          description
+            "Interface Alias (IfAlias - IETF RFC 2863) ";
+        }
+        enum portcomponent {
+          value 3;
+          description
+            "Port component (EntPhysicalAlias IETF RFC 4133)";
+        }
+        enum macaddress {
+          value 4;
+          description
+            "MAC address (IEEE Std 802) ";
+        }
+        enum networkaddress {
+          value 5;
+          description
+            "Network Address";
+        }
+        enum ifname {
+          value 6;
+          description
+            "Interface Name (ifName - IETF RFC 2863)";
+        }
+        enum local {
+          value 7;
+          description
+            "Locally assigned";
+        }
+      }
+      description
+        "Chassis ID Subtype Enumeration";
+    }
+    leaf remoteChassisId {
+      type string;
+      description
+        "remote neighbour Chassis Id";
+    }
+  }
+
+  grouping lldp-container {
+    container lldp {
+      description
+        "LLDP configurable and retrievable";
+      container global-config {
+        description
+          "LLDP global configurations";
+        leaf adminStatus {
+          type enumeration {
+            enum disable {
+              value 0;
+              description
+                "Disable the LLDP feature per NE";
+            }
+            enum enable {
+              value 1;
+              description
+                "Enable the LLDP feature per NE";
+            }
+          }
+          default "enable";
+          description
+            "LLDP feature Enable/Disable per NE";
+        }
+        leaf msgTxInterval {
+          type uint16 {
+            range "5..32768";
+          }
+          default "30";
+          description
+            "LLDP frame Retransmit Interval in seconds";
+        }
+        leaf msgTxHoldMultiplier {
+          type uint8 {
+            range "2..10";
+          }
+          default "4";
+          description
+            "TTL value for the TLVs transmitter over wire in seconds";
+        }
+      }
+      list port-config {
+        key "ifName";
+        description
+          "LLDP port configurations";
+        leaf ifName {
+          type leafref {
+            path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+          }
+          description
+            "Ethernet interface name where LLDP runs";
+        }
+        leaf adminStatus {
+          type enumeration {
+            enum disable {
+              value 0;
+              description
+                "Disables the LLDP frames transmit and receive on specific interface";
+            }
+            enum txandrx {
+              value 1;
+              description
+                "Enable Transmit and Receive LLDP frames on specific interface";
+            }
+          }
+          default "txandrx";
+          description
+            "LLDP enable per port basis";
+        }
+      }
+      container nbr-list {
+        config false;
+        description
+          "LLDP Oper data - Neighbour List information";
+        list if-name {
+          key "ifName";
+          leaf ifName {
+            type string;
+            description
+              "Ethernet interface name where LLDP runs";
+          }
+          uses nbr-info-grp;
+        }
+      }
+    }
+  }
+
+  notification lldp-nbr-info-change {
+    description
+      "LLDP: Neighbor Information Changed
+       remoteSysName
+       remoteSysMgmtAddressSubType
+       remoteSysMgmtAddress
+       remotePortIdSubType
+       remotePortId
+       remoteChassisIdSubType
+       remoteChassisId
+       All of the above attributes are sent in event";
+    leaf notification-type {
+      type org-openroadm-resource-types:resource-notification-type;
+    }
+    leaf resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      description
+        "resource-type for this notification is interface";
+    }
+    leaf resource {
+      type string;
+      description
+        "resource interface-name";
+    }
+    container nbr-info {
+      uses nbr-info-grp;
+    }
+    leaf event-time {
+      type yang:date-and-time;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
+    when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm' or /org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='ila'";
+    uses lldp-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-maintenance-loopback@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-maintenance-loopback@2019-11-29.yang
new file mode 100644 (file)
index 0000000..ed46bb9
--- /dev/null
@@ -0,0 +1,88 @@
+module org-openroadm-maintenance-loopback {
+  namespace "http://org/openroadm/maintenance-loopback";
+  prefix org-openroadm-maint-loopback;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for maintenance loopback.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping maint-loopback {
+    container maint-loopback {
+      leaf enabled {
+        type boolean;
+        default "false";
+        description
+          "loopback operation enable flag";
+      }
+      leaf type {
+        when "../enabled = 'true'";
+        type enumeration {
+          enum fac {
+            value 0;
+            description
+              "pre-FEC Loopback in the facility direction";
+          }
+          enum term {
+            value 1;
+            description
+              "Loopback in the terminal direction";
+          }
+          enum fac2 {
+            value 2;
+            description
+              "post-FEC Loopback in the facility direction";
+          }
+        }
+        default "fac";
+        description
+          "Set Loopback type (or direction).";
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-maintenance-testsignal@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-maintenance-testsignal@2020-05-29.yang
new file mode 100644 (file)
index 0000000..ce1b486
--- /dev/null
@@ -0,0 +1,207 @@
+module org-openroadm-maintenance-testsignal {
+  yang-version 1.1;
+  namespace "http://org/openroadm/maintenance-testsignal";
+  prefix org-openroadm-maint-testsignal;
+
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for maintenance testsignal.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping maint-testsignal {
+    description
+      "Maintenance testsignal grouping";
+    container maint-testsignal {
+      description
+        "Maintenance testsignal container";
+      typedef testsig-type {
+        type enumeration {
+          enum fac {
+            value 0;
+            description
+              "test signal in the facility direction";
+          }
+          enum term {
+            value 1;
+            description
+              "test signal in the terminal direction";
+          }
+        }
+        description
+          "Testsignal enum typedef";
+      }
+
+      action clear-diagnostics {
+        description
+          "Perform maintenance and diagnostic counter clear.";
+        input {
+          leaf type {
+            type testsig-type;
+            description
+              "Maintenance and Diagnostic counter to be cleared.  If the type is not specified then it will reset the counter for the enabled type(s)";
+          }
+        }
+        output {
+          leaf status {
+            type org-openroadm-common-types:rpc-status;
+            mandatory true;
+            description
+              "RPC status";
+          }
+          leaf status-message {
+            type string;
+            description
+              "status message";
+          }
+        }
+      }
+      leaf enabled {
+        type boolean;
+        default "false";
+        description
+          "testsignal enabled flag";
+      }
+      leaf testPattern {
+        when "../enabled = 'true'";
+        type enumeration {
+          enum PRBS {
+            value 0;
+            description
+              "Unframed, inverted PN-31 pattern or PRBS31 pattern per IEEE 802.3 clause 50.3.8.2 (inverted PN-31 at line rate)";
+          }
+          enum PRBS31 {
+            value 1;
+            description
+              "PRBS31 with standard mapping per G.709";
+          }
+          enum PRBS23 {
+            value 2;
+            description
+              "SONET/SDH Framed,inverted PN-23 pattern.";
+          }
+          enum PRZEROS {
+            value 3;
+            description
+              "pseudo-random with zeros data pattern per IEEE 802.3 clause 49.2.8";
+          }
+          enum IDLE {
+            value 4;
+            description
+              "Scrambled IDLE test-pattern per IEEE 802.3ba";
+          }
+        }
+        mandatory true;
+        description
+          "Set test signal pattern";
+      }
+      leaf type {
+        when "../enabled = 'true'";
+        type testsig-type;
+        default "fac";
+        description
+          "Set test signal type (or direction).";
+      }
+      leaf inSync {
+        type boolean;
+        config false;
+        description
+          "sync status of the received test signal";
+      }
+      leaf seconds {
+        when "../enabled = 'true' and ../inSync = 'true'";
+        type uint32;
+        config false;
+        mandatory true;
+        description
+          "number of seconds the received test signal is in sync.";
+      }
+      leaf bitErrors {
+        when "../enabled = 'true'";
+        type uint32 {
+          range "0..4294967295";
+        }
+        config false;
+        description
+          "bit errors for test signal.";
+      }
+      leaf bitErrorRate {
+        type decimal64 {
+          fraction-digits 17;
+        }
+        config false;
+        description
+          "bit error rate of the received test signal";
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-media-channel-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-media-channel-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..7b1e03a
--- /dev/null
@@ -0,0 +1,163 @@
+module org-openroadm-media-channel-interfaces {
+  namespace "http://org/openroadm/media-channel-interfaces";
+  prefix org-openroadm-media-channel-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility och interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+
+  grouping mc-ttp-attributes {
+    description
+      "Media channel termination point. Models bandwidth allocation in physical media. Network media channels may be provisioned in the spectrum characterized by the frequency limits.";
+    leaf min-freq {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Minimum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+    }
+    leaf max-freq {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Maximum Frequency in THz. Granularity is hardware dependent, based on pixel resolution. eg. ITU 12.5GHz frequency slots. Range covers C+L";
+    }
+    leaf center-freq {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config false;
+      description
+        "Center Frequency in THz. Granularity is hardware dependent, based on center-freq-granularity.";
+    }
+    leaf slot-width {
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config false;
+      description
+        "Width of the slot.  Granularity is hardware dependent, based on slot-width-granularity";
+    }
+  }
+
+  grouping mc-ttp-container {
+    container mc-ttp {
+      description
+        "Media Channel Trail Termination Point (MC-TTP)";
+      uses mc-ttp-attributes;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:mediaChannelTrailTerminationPoint'";
+    uses mc-ttp-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-network-media-channel-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-network-media-channel-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..08d9f1b
--- /dev/null
@@ -0,0 +1,151 @@
+module org-openroadm-network-media-channel-interfaces {
+  namespace "http://org/openroadm/network-media-channel-interfaces";
+  prefix org-openroadm-network-media-channel-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility och interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+
+  grouping nmc-ctp-attributes {
+    description
+      "Network Media Channel attributes";
+    leaf frequency {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      config true;
+      description
+        "Center Frequency in THz.  This is not constrained by mc-capabilities.  It must fit (when combined with width) inside any containing media channel.";
+    }
+    leaf width {
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config true;
+      description
+        "Frequency width in GHz.  This is not constrained by mc-capabilities.  It must fit (when combined with frequency) inside any containing media channel.";
+    }
+  }
+
+  grouping nmc-ctp-container {
+    container nmc-ctp {
+      description
+        "Network Media Channel Connection Termination Point (NMC-CTP)";
+      uses nmc-ctp-attributes;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:networkMediaChannelConnectionTerminationPoint'";
+    uses nmc-ctp-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-optical-channel-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-optical-channel-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..357fcdd
--- /dev/null
@@ -0,0 +1,202 @@
+module org-openroadm-optical-channel-interfaces {
+  namespace "http://org/openroadm/optical-channel-interfaces";
+  prefix org-openroadm-optical-channel-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-optical-operational-interfaces {
+    prefix org-openroadm-optical-operational-interfaces;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility och interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping och-attributes {
+    description
+      "Optical Channel attributes";
+    leaf provision-mode {
+      type org-openroadm-common-optical-channel-types:provision-mode-type;
+      default "explicit";
+      description
+        "The provision-mode specified by the controller. Default to 'explicit' (ie, the set of optical parameter specified in MSA Optical Spec).
+         The 'profile' provision-mode is introduced in MSA 5.0 to support the bookended xponder application";
+    }
+    leaf rate {
+      when "../provision-mode = 'explicit'";
+      type identityref {
+        base org-openroadm-common-optical-channel-types:och-rate-identity;
+      }
+      description
+        "rate";
+    }
+    leaf frequency {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      description
+        "Center Frequency in THz.";
+    }
+    leaf width {
+      when "../provision-mode = 'explicit'";
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config false;
+      description
+        "Frequency width in GHz.";
+    }
+    leaf modulation-format {
+      when "../provision-mode = 'explicit'";
+      type org-openroadm-common-optical-channel-types:modulation-format;
+      description
+        "Modulation format";
+    }
+    leaf transmit-power {
+      type org-openroadm-common-link-types:power-dBm;
+      description
+        "The target transmit power for this channel. When set, the xponder will work to ensure that port-current-power reaches this level. Applicable only to channel on top of xpdr-network port";
+    }
+    leaf optical-operational-mode {
+      type string;
+      description
+        "Optical-operational-mode sets the xponder settings based on one of the operational mode capabilities as published by the device.  This attribute is mandatory when the provision-mode is set to profile.";
+    }
+    container operational-mode-params {
+      when "../provision-mode = 'profile'";
+      config false;
+      description
+        "The container containing the optical parameters for the specified operational mode.";
+      uses org-openroadm-optical-operational-interfaces:optical-operational-modes-grp-attr;
+    }
+  }
+
+  grouping och-container {
+    description
+      "OCH container group";
+    container och {
+      description
+        "Optical Channel (OCh):
+         Models the optical channel interfaces for an Optical White Box.";
+      uses och-attributes;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:opticalChannel'";
+    description
+      "augment for optical channel container";
+    uses och-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-optical-operational-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-optical-operational-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..bcaff15
--- /dev/null
@@ -0,0 +1,92 @@
+module org-openroadm-optical-operational-interfaces {
+  namespace "http://org/openroadm/optical-operational-interfaces";
+  prefix org-openroadm-optical-operational-interfaces;
+
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device flexible optical transport network group interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2018,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+
+  grouping optical-operational-modes-grp-attr {
+    description
+      "optical operational modes attribute grouping";
+    leaf spectral-width {
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      units "GHz";
+      description
+        "The required minimum signal spectral width of signal at -22 dbm.";
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-optical-transport-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-optical-transport-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..dd173a0
--- /dev/null
@@ -0,0 +1,219 @@
+module org-openroadm-optical-transport-interfaces {
+  namespace "http://org/openroadm/optical-transport-interfaces";
+  prefix org-openroadm-optical-transport-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This module contains YANG definitions
+     for the Optical Transport Interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping ots-attributes {
+    description
+      "Optical Transport Section (OTS) attributes";
+    leaf fiber-type {
+      type enumeration {
+        enum smf {
+          value 0;
+          description
+            "Single Mode Fiber";
+        }
+        enum eleaf {
+          value 1;
+          description
+            "ELEAF";
+        }
+        enum oleaf {
+          value 2;
+          description
+            "OLEAF";
+        }
+        enum dsf {
+          value 3;
+          description
+            "DSF";
+        }
+        enum truewave {
+          value 4;
+          description
+            "TRUEWAVE Reduced Slope";
+        }
+        enum truewavec {
+          value 5;
+          description
+            "TRUEWAVE Classic";
+        }
+        enum nz-dsf {
+          value 6;
+          description
+            "NZ-DSF";
+        }
+        enum ull {
+          value 7;
+          description
+            "Ultra Low Loss (ULL)";
+        }
+      }
+      default "smf";
+      description
+        "fiber type
+         Default    : SMF ";
+    }
+    leaf span-loss-receive {
+      type org-openroadm-common-link-types:ratio-dB;
+      description
+        "Span loss on the receiver side. Set by the controller and used by device to set AMP gain.";
+    }
+    leaf span-loss-transmit {
+      type org-openroadm-common-link-types:ratio-dB;
+      description
+        "Span loss on the transmitter side. Set by the controller and used by device to configure MSA compliant channel launch power";
+    }
+    leaf ingress-span-loss-aging-margin {
+      type org-openroadm-common-link-types:ratio-dB;
+      default "0";
+      config true;
+      description
+        "Span-loss margin used to set optical amplifier gain and output-voa.
+         Day one attenuation of the link, at initial commissioning may increase across wdm link life.
+         span-loss-aging-margin defines the maximum additional loss the wdm link may experience in addition
+         to initial loss without requiring a new design (new amplifier settings). ";
+    }
+    leaf eol-max-load-pIn {
+      type org-openroadm-common-link-types:power-dBm;
+      config true;
+      description
+        "End Of Life Total input power at maximum load used for amplifier control.
+         Calculated during the design, this value shall be used by the amplifier device
+         for the setting so that the reasonable margin is kept to reach this value
+         at the end of life of the wdm link, considering span-loss aging margins are reached ";
+    }
+  }
+
+  grouping ots-container {
+    container ots {
+      description
+        "Optical Transport Section (OTS):
+          Models the optical interfaces for an Optical White Box.
+          The network side is represented by the OTS/OMS.";
+      uses ots-attributes;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:opticalTransport'";
+    uses ots-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-optical-tributary-signal-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-optical-tributary-signal-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..514e7b7
--- /dev/null
@@ -0,0 +1,235 @@
+module org-openroadm-optical-tributary-signal-interfaces {
+  namespace "http://org/openroadm/optical-channel-tributary-signal-interfaces";
+  prefix org-openroadm-optical-tributary-signal-interfaces;
+
+  import org-openroadm-common-link-types {
+    prefix org-openroadm-common-link-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-optical-operational-interfaces {
+    prefix org-openroadm-optical-operational-interfaces;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device optical tributary signal interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2018,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+
+  grouping otsi-attributes {
+    description
+      "OTSi attributes group";
+    leaf provision-mode {
+      type org-openroadm-common-optical-channel-types:provision-mode-type;
+      default "explicit";
+      description
+        "The provision-mode specified by the controller. Default to 'explicit' (ie, the set of optical parameter specified in MSA Optical Spec).
+         The 'profile' provision-mode is introduced in MSA 5.0 to support the bookended xponder application";
+    }
+    leaf otsi-rate {
+      when "../provision-mode = 'explicit'";
+      type identityref {
+        base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+      }
+      description
+        "OTSi rate";
+    }
+    leaf otsi-member-id {
+      type uint16;
+      description
+        "The member ID to uniquely identify each member in an OTSi group and the order of each member in the group.  For each group, system shall support non-consecutive member IDs.  User shall not set up two members with the same member ID.  Similar to FlexO PHY-ID in the FlexO Group (PID in G.709.1/3)";
+    }
+    leaf frequency {
+      type org-openroadm-common-optical-channel-types:frequency-THz;
+      description
+        "Center Frequency in THz.";
+    }
+    leaf width {
+      when "../provision-mode = 'explicit'";
+      type org-openroadm-common-optical-channel-types:frequency-GHz;
+      config false;
+      description
+        "Frequency width in GHz.";
+    }
+    leaf modulation-format {
+      when "../provision-mode = 'explicit'";
+      type org-openroadm-common-optical-channel-types:modulation-format;
+      description
+        "Modulation format";
+    }
+    leaf transmit-power {
+      type org-openroadm-common-link-types:power-dBm;
+      description
+        "The target transmit power for this channel. When set, the xponder will work to ensure that port-current-power reaches this level. Applicable only to channel on top of xpdr-network port";
+    }
+
+    uses org-openroadm-common-types:fec-grouping {
+      when "provision-mode = 'explicit'";
+      description
+        "OTSi FEC / Forward Error Correction";
+    }
+    leaf optical-operational-mode {
+      when "../provision-mode = 'profile'";
+      type string;
+      description
+        "Optical-operational-mode sets the xponder settings based on one of the operational mode capabilities as published by the device.  This attribute is mandatory when the provision-mode is set to profile.";
+    }
+    container operational-mode-params {
+      when "../provision-mode = 'profile'";
+      config false;
+      description
+        "The container containing the optical parameters for the specified operational mode";
+      uses org-openroadm-optical-operational-interfaces:optical-operational-modes-grp-attr;
+    }
+    leaf supported-group-if {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+      }
+      config false;
+      description
+        "OTSiG or FlexO-group interface name.";
+    }
+    container flexo {
+      presence "Explicit assigment for flexo container";
+      description
+        "Flexo presence container";
+      leaf foic-type {
+        type identityref {
+          base org-openroadm-common-optical-channel-types:foic-identity;
+        }
+        mandatory true;
+        description
+          "Assigned flexo instance type";
+      }
+      leaf-list iid {
+        type uint8;
+        min-elements 1;
+        ordered-by user;
+        description
+          "A list of FlexO instance identification (G.709.1 clause 9.2.3)";
+      }
+      leaf-list accepted-group-id {
+        type uint32;
+        description
+          "AcGID[1]..AcGID[n] on a per FlexO instance basis (G.798 2019-12, Figure 15-10 FlexO-n/OTUCn_A_Sk processes)";
+      }
+      leaf-list accepted-iid {
+        type uint8;
+        description
+          "AcIID[1]..AcIID[n] on a per FlexO instance basis (G.798 2019-12, Figure 15-10 FlexO-n/OTUCn_A_Sk processes)";
+      }
+    }
+  }
+
+  grouping otsi-container {
+    description
+      "OTSI container group";
+    container otsi {
+      description
+        "OTSi container";
+      uses org-openroadm-optical-tributary-signal-interfaces:otsi-attributes;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:otsi'";
+    description
+      "augment for otsi";
+    uses org-openroadm-optical-tributary-signal-interfaces:otsi-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ospf@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ospf@2020-05-29.yang
new file mode 100644 (file)
index 0000000..017f547
--- /dev/null
@@ -0,0 +1,2546 @@
+module org-openroadm-ospf {
+  namespace "http://org/openroadm/ospf";
+  prefix org-openroadm-ospf;
+
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-routing {
+    prefix org-openroadm-routing;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-key-chain {
+    prefix org-openroadm-key-chain;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines the Yang model for ospf.
+
+     This model reuses data items defined in the IETF YANG model for
+     OSPF described by draft-ietf-ospf-yang-00.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Initial revision.";
+  }
+
+  feature multi-topology {
+    description
+      "Support MTR.";
+  }
+
+  feature multi-area-adj {
+    description
+      "OSPF multi-area adjacency support as in RFC 5185.";
+  }
+
+  feature router-id {
+    description
+      "Set router ID per instance.";
+  }
+
+  feature demand-circuit {
+    description
+      "OSPF demand circuit support as in RFC 1793.";
+  }
+
+  feature mtu-ignore {
+    description
+      "Disable OSPF MTU mismatch detection on receiving
+       DBD packets.";
+  }
+
+  feature lls {
+    description
+      "OSPF link-local signaling (LLS) as in RFC 5613.";
+  }
+
+  feature prefix-suppression {
+    description
+      "OSPF prefix suppression support as in RFC 6860.";
+  }
+
+  feature bfd {
+    description
+      "OSPF BFD support.";
+  }
+
+  feature ttl-security {
+    description
+      "OSPF ttl security check.";
+  }
+
+  feature nsr {
+    description
+      "Non-Stop-Routing (NSR).";
+  }
+
+  feature graceful-restart {
+    description
+      "Graceful OSPF Restart as defined in RFC3623 and RFC5187.";
+  }
+
+  feature protocol-shutdown {
+    description
+      "Shutdown the protocol.";
+  }
+
+  feature auto-cost {
+    description
+      "Calculate OSPF interface cost according to
+       reference bandwidth.";
+  }
+
+  feature max-ecmp {
+    description
+      "Setting maximum number of ECMP paths.";
+  }
+
+  feature max-lsa {
+    description
+      "Setting maximum number of LSAs OSPF will receive.";
+  }
+
+  feature te-rid {
+    description
+      "TE router-id.";
+  }
+
+  feature ldp-igp-sync {
+    description
+      "LDP IGP synchronization.";
+  }
+
+  feature ldp-igp-autoconfig {
+    description
+      "LDP IGP auto-config.";
+  }
+
+  feature protocol-if-shutdown {
+    description
+      "Shutdown the protocol over an interface.";
+  }
+
+  feature ospfv3-authentication-ipsec {
+    description
+      "Use IPsec for OSPFv3 authentication.";
+  }
+
+  feature instance-inheritance {
+    description
+      "Support instance inheritance";
+  }
+
+  feature area-inheritance {
+    description
+      "Support area inheritance";
+  }
+
+  feature interface-inheritance {
+    description
+      "Support interface inheritance";
+  }
+
+  identity ospf {
+    base org-openroadm-routing:routing-protocol;
+    description
+      "OSPF Protocol";
+  }
+
+  identity ospfv2 {
+    base ospf;
+    description
+      "OSPFv2";
+  }
+
+  identity ospfv3 {
+    base ospf;
+    description
+      "OSPFv3";
+  }
+
+  identity operation-mode {
+    description
+      "OSPF operation mode.";
+  }
+
+  identity ships-in-the-night {
+    base operation-mode;
+    description
+      "Ships-in-the-night operation mode in which
+       each OSPF instance carries only one address family";
+  }
+
+  identity area-type {
+    description
+      "Base identity for OSPF area type.";
+  }
+
+  identity normal {
+    base area-type;
+    description
+      "OSPF normal area.";
+  }
+
+  identity stub {
+    base area-type;
+    description
+      "OSPF stub area.";
+  }
+
+  identity nssa {
+    base area-type;
+    description
+      "OSPF NSSA area.";
+  }
+
+  identity if-link-type {
+    description
+      "Base identity for OSPF interface link type.";
+  }
+
+  identity if-link-type-normal {
+    base if-link-type;
+    description
+      "OSPF interface link type normal.";
+  }
+
+  identity if-link-type-virtual-link {
+    base if-link-type;
+    description
+      "OSPF interface link type virtual link.";
+  }
+
+  identity if-link-type-sham-link {
+    base if-link-type;
+    description
+      "OSPF interface link type sham link.";
+  }
+
+  typedef uint24 {
+    type uint32 {
+      range "0 .. 16777215";
+    }
+    description
+      "24-bit unsigned integer.";
+  }
+
+  typedef area-id-type {
+    type union {
+      type uint32;
+      type yang:dotted-quad;
+    }
+    description
+      "Area ID type.";
+  }
+
+  typedef if-state-type {
+    type enumeration {
+      enum Down {
+        value 1;
+        description
+          "Interface down state";
+      }
+      enum Loopback {
+        value 2;
+        description
+          "Interface loopback state";
+      }
+      enum Waiting {
+        value 3;
+        description
+          "Interface waiting state";
+      }
+      enum Point-to-Point {
+        value 4;
+        description
+          "Interface point-to-point state";
+      }
+      enum DR {
+        value 5;
+        description
+          "Interface Designated Router (DR) state";
+      }
+      enum BDR {
+        value 6;
+        description
+          "Interface Backup Designated Router (BDR) state";
+      }
+      enum DR-Other {
+        value 7;
+        description
+          "Interface Other Designated Router state";
+      }
+    }
+    description
+      "OSPF interface state type.";
+  }
+
+  typedef nbr-state-type {
+    type enumeration {
+      enum Down {
+        value 1;
+        description
+          "Neighbor down state";
+      }
+      enum Attempt {
+        value 2;
+        description
+          "Neighbor attempt state";
+      }
+      enum Init {
+        value 3;
+        description
+          "Neighbor init state";
+      }
+      enum 2-Way {
+        value 4;
+        description
+          "Neighbor 2-Way state";
+      }
+      enum ExStart {
+        value 5;
+        description
+          "Neighbor exchange start state";
+      }
+      enum Exchange {
+        value 6;
+        description
+          "Neighbor exchange state";
+      }
+      enum Loading {
+        value 7;
+        description
+          "Neighbor loading state";
+      }
+      enum Full {
+        value 8;
+        description
+          "Neighbor full state";
+      }
+    }
+    description
+      "OSPF neighbor state type.";
+  }
+
+  typedef restart-helper-status-type {
+    type enumeration {
+      enum Not-Helping {
+        value 1;
+        description
+          "Restart helper status not helping.";
+      }
+      enum Helping {
+        value 2;
+        description
+          "Restart helper status helping.";
+      }
+    }
+    description
+      "Restart helper status type.";
+  }
+
+  typedef restart-exit-reason-type {
+    type enumeration {
+      enum None {
+        value 1;
+        description
+          "Not attempted.";
+      }
+      enum InProgress {
+        value 2;
+        description
+          "Restart in progress.";
+      }
+      enum Completed {
+        value 3;
+        description
+          "Successfully completed.";
+      }
+      enum TimedOut {
+        value 4;
+        description
+          "Timed out.";
+      }
+      enum TopologyChanged {
+        value 5;
+        description
+          "Aborted due to topology change.";
+      }
+    }
+    description
+      "Describes the outcome of the last attempt at a
+       graceful restart, either by itself or acting
+       as a helper.";
+  }
+
+  typedef packet-type {
+    type enumeration {
+      enum Hello {
+        value 1;
+        description
+          "OSPF hello packet.";
+      }
+      enum Database-Descripton {
+        value 2;
+        description
+          "OSPF database description packet.";
+      }
+      enum Link-State-Request {
+        value 3;
+        description
+          "OSPF link state request packet.";
+      }
+      enum Link-State-Update {
+        value 4;
+        description
+          "OSPF link state update packet.";
+      }
+      enum Link-State-Ack {
+        value 5;
+        description
+          "OSPF link state acknowlegement packet.";
+      }
+    }
+    description
+      "OSPF packet type.";
+  }
+
+  typedef nssa-translator-state-type {
+    type enumeration {
+      enum Enabled {
+        value 1;
+        description
+          "NSSA translator enabled state.";
+      }
+      enum Elected {
+        description
+          "NSSA translator elected state.";
+      }
+      enum Disabled {
+        value 3;
+        description
+          "NSSA translator disabled state.";
+      }
+    }
+    description
+      "OSPF NSSA translator state type.";
+  }
+
+  typedef restart-status-type {
+    type enumeration {
+      enum Not-Restarting {
+        value 1;
+        description
+          "Router is not restarting.";
+      }
+      enum Planned-Restart {
+        description
+          "Router is going through planned restart.";
+      }
+      enum Unplanned-Restart {
+        value 3;
+        description
+          "Router is going through unplanned restart.";
+      }
+    }
+    description
+      "OSPF graceful restart status type.";
+  }
+
+  grouping interface-common-config {
+    description
+      "Common configuration for all types of interfaces,
+       including virtual link and sham link";
+    leaf cost {
+      type uint16 {
+        range "1..65535" {
+          error-message "Configured value is out of range";
+        }
+      }
+      description
+        "Interface cost.";
+    }
+    leaf hello-interval {
+      type uint16 {
+        range "1..65535" {
+          error-message "Configured value is out of range";
+        }
+      }
+      units "seconds";
+      description
+        "Time between hello packets.";
+    }
+    leaf dead-interval {
+      type uint16 {
+        range "1..65535" {
+          error-message "Configured value is out of range";
+        }
+      }
+      units "seconds";
+      must '../dead-interval > ../hello-interval' {
+        error-message "The dead interval must be larger than the hello interval";
+        description
+          "The value MUST be greater than 'hello-internval'.";
+      }
+      description
+        "Interval after which a neighbor is declared dead.";
+    }
+    leaf rtrPriority {
+      type uint8 {
+        range "0..255";
+      }
+      description
+        "Router priority for DR election.";
+    }
+    leaf retransmit-interval {
+      type uint16 {
+        range "1..65535" {
+          error-message "Configured value is out of range";
+        }
+      }
+      units "seconds";
+      description
+        "Time between retransmitting unacknowledged Link State
+         Advertisements (LSAs).";
+    }
+    leaf transmit-delay {
+      type uint16 {
+        range "1..65535" {
+          error-message "Configured value is out of range";
+        }
+      }
+      units "seconds";
+      description
+        "Estimated time needed to send link-state update.";
+    }
+    leaf mtu-ignore {
+      if-feature "mtu-ignore";
+      type boolean;
+      description
+        "Enable/Disable ignoring of MTU in DBD packets.";
+    }
+    container authentication {
+      description
+        "Authentication configuration.";
+      choice auth-type-selection {
+        description
+          "Options for expressing authentication setting";
+        case auth-ipsec {
+          when "../../../../../org-openroadm-routing:type = 'ospfv3'" {
+            description
+              "Applied to OSPFv3 only";
+          }
+          if-feature "ospfv3-authentication-ipsec";
+          leaf sa {
+            type string;
+            description
+              "SA name";
+          }
+        }
+        case auth-trailer-key-chain {
+          leaf key-chain {
+            type org-openroadm-key-chain:key-chain-ref;
+            description
+              "key-chain name";
+          }
+        }
+        case auth-trailer-key {
+          leaf key {
+            type string {
+              length "1..8" {
+                error-message "Configured string exceeds the maximum length";
+              }
+            }
+            description
+              "Key string in ASCII format.";
+          }
+        }
+      }
+    }
+  }
+
+  grouping interface-config {
+    description
+      "Configuration for real interfaces.";
+    leaf network-type {
+      type enumeration {
+        enum broadcast {
+          description
+            "Specify OSPF broadcast multi-access network.";
+        }
+        enum non-broadcast {
+          description
+            "Specify OSPF Non-Broadcast Multi-Access
+             (NBMA) network.";
+        }
+        enum point-to-multipoint {
+          description
+            "Specify OSPF point-to-multipoint network.";
+        }
+        enum point-to-point {
+          description
+            "Specify OSPF point-to-point network.";
+        }
+      }
+      description
+        "Network type.";
+    }
+    leaf passive {
+      type boolean;
+      description
+        "Enable/Disable passive.";
+    }
+    uses interface-common-config;
+  }
+
+  grouping tlv {
+    description
+      "TLV";
+    leaf type {
+      type uint16;
+      description
+        "TLV type.";
+    }
+    leaf length {
+      type uint16;
+      description
+        "TLV length.";
+    }
+    leaf value {
+      type yang:hex-string;
+      description
+        "TLV value.";
+    }
+  }
+
+  grouping ospfv2-lsa-body {
+    description
+      "OSPFv2 LSA body.";
+    container router {
+      when '../../header/type = 1' {
+        description
+          "Only apply to Router-LSA.";
+      }
+      description
+        "Router LSA.";
+      leaf flags {
+        type bits {
+          bit V {
+            description
+              "When set, the router is an endpoint of one or
+               more virtual links.";
+          }
+          bit E {
+            description
+              "When set, the router is an AS Boundary Router
+               (ASBR).";
+          }
+          bit B {
+            description
+              "When set, the router is an Area Border Router (ABR).";
+          }
+        }
+        description
+          "Flags";
+      }
+      leaf num-of-links {
+        type uint16;
+        description
+          "Number of links.";
+      }
+      list link {
+        key "link-id link-data";
+        description
+          "Router LSA link.";
+        leaf link-id {
+          type union {
+            type inet:ipv4-address;
+            type yang:dotted-quad;
+          }
+          description
+            "Link ID";
+        }
+        leaf link-data {
+          type union {
+            type inet:ipv4-address;
+            type uint32;
+          }
+          description
+            "Link data.";
+        }
+        leaf type {
+          type uint8;
+          description
+            "Link type.";
+        }
+        list topology {
+          key "mt-id";
+          description
+            "Topology specific information.";
+          leaf mt-id {
+            type uint8;
+            description
+              "The MT-ID for topology enabled on the link.";
+          }
+          leaf metric {
+            type uint16;
+            description
+              "Metric for the topology.";
+          }
+        }
+      }
+    }
+    container network {
+      when '../../header/type = 2' {
+        description
+          "Only apply to network LSA.";
+      }
+      description
+        "Network LSA.";
+      leaf network-mask {
+        type inet:ipv4-address;
+        description
+          "The IP address mask for the network";
+      }
+      leaf-list attached-router {
+        type yang:dotted-quad;
+        description
+          "List of the routers attached to the network.";
+      }
+    }
+    container summary {
+      when '../../header/type = 3 or ../../header/type = 4' {
+        description
+          "Only apply to Summary-LSA.";
+      }
+      description
+        "Summary LSA.";
+      leaf network-mask {
+        type inet:ipv4-address;
+        description
+          "The IP address mask for the network";
+      }
+      list topology {
+        key "mt-id";
+        description
+          "Topology specific information.";
+        leaf mt-id {
+          type uint8;
+          description
+            "The MT-ID for topology enabled on the link.";
+        }
+        leaf metric {
+          type uint24;
+          description
+            "Metric for the topology.";
+        }
+      }
+    }
+    container external {
+      when '../../header/type = 5 or ../../header/type = 7' {
+        description
+          "Only apply to AS-external-LSA and NSSA-LSA.";
+      }
+      description
+        "External LSA.";
+      leaf network-mask {
+        type inet:ipv4-address;
+        description
+          "The IP address mask for the network";
+      }
+      list topology {
+        key "mt-id";
+        description
+          "Topology specific information.";
+        leaf mt-id {
+          type uint8;
+          description
+            "The MT-ID for topology enabled on the link.";
+        }
+        leaf flags {
+          type bits {
+            bit E {
+              description
+                "When set, the metric specified is a Type 2
+                 external metric.";
+            }
+          }
+          description
+            "Flags.";
+        }
+        leaf metric {
+          type uint24;
+          description
+            "Metric for the topology.";
+        }
+        leaf forwarding-address {
+          type inet:ipv4-address;
+          description
+            "Forwarding address.";
+        }
+        leaf external-route-tag {
+          type uint32;
+          description
+            "Route tag.";
+        }
+      }
+    }
+  }
+
+  grouping ospfv3-lsa-options {
+    description
+      "OSPFv3 LSA options";
+    leaf options {
+      type bits {
+        bit DC {
+          description
+            "When set, the router support demand circuits.";
+        }
+        bit R {
+          description
+            "When set, the originator is an active router.";
+        }
+        bit N {
+          description
+            "If set, the router is attached to an NSSA";
+        }
+        bit E {
+          description
+            "This bit describes the way AS-external-LSAs
+             are flooded";
+        }
+        bit V6 {
+          description
+            "If clear, the router/link should be excluded
+             from IPv6 routing calculaton";
+        }
+      }
+      mandatory true;
+      description
+        "OSPFv3 LSA options.";
+    }
+  }
+
+  grouping ospfv3-lsa-prefix {
+    description
+      "OSPFv3 LSA prefix.";
+    leaf prefix {
+      type inet:ip-prefix;
+      description
+        "Prefix";
+    }
+    leaf prefix-options {
+      type bits {
+        bit NU {
+          description
+            "When set, the prefix should be excluded
+             from IPv6 unicast calculations.";
+        }
+        bit LA {
+          description
+            "When set, the prefix is actually an IPv6 interface
+             address of the Advertising Router.";
+        }
+        bit P {
+          description
+            "When set, the NSSA area prefix should be
+             readvertised by the translating NSSA area border.";
+        }
+        bit DN {
+          description
+            "When set, the inter-area-prefix-LSA or
+             AS-external-LSA prefix has been advertised in a VPN
+             environment.";
+        }
+      }
+      mandatory true;
+      description
+        "Prefix options.";
+    }
+  }
+
+  grouping ospfv3-lsa-external {
+    description
+      "AS-External and NSSA LSA.";
+    leaf metric {
+      type uint24;
+      description
+        "Metric";
+    }
+    leaf flags {
+      type bits {
+        bit E {
+          description
+            "When set, the metric specified is a Type 2
+             external metric.";
+        }
+      }
+      description
+        "Flags.";
+    }
+    leaf referenced-ls-type {
+      type uint16;
+      description
+        "Referenced Link State type.";
+    }
+    uses ospfv3-lsa-prefix;
+    leaf forwarding-address {
+      type inet:ipv6-address;
+      description
+        "Forwarding address.";
+    }
+    leaf external-route-tag {
+      type uint32;
+      description
+        "Route tag.";
+    }
+    leaf referenced-link-state-id {
+      type uint32;
+      description
+        "Referenced Link State ID.";
+    }
+  }
+
+  grouping ospfv3-lsa-body {
+    description
+      "OSPFv3 LSA body.";
+    container router {
+      when '../../header/type = 8193' {
+        description
+          "Only apply to Router-LSA.";
+      }
+      description
+        "Router LSA.";
+      leaf flags {
+        type bits {
+          bit V {
+            description
+              "When set, the router is an endpoint of one or
+               more virtual links.";
+          }
+          bit E {
+            description
+              "When set, the router is an AS Boundary Router
+               (ASBR).";
+          }
+          bit B {
+            description
+              "When set, the router is an Area Border Router (ABR).";
+          }
+          bit Nt {
+            description
+              "When set, the router is an NSSA border router
+               that is unconditionally translating NSSA-LSAs
+               into AS-external-LSAs.";
+          }
+        }
+        mandatory true;
+        description
+          "LSA option.";
+      }
+      uses ospfv3-lsa-options;
+      list link {
+        key "interface-id neighbor-interface-id neighbor-router-id";
+        description
+          "Router LSA link.";
+        leaf interface-id {
+          type uint32;
+          description
+            "Interface ID.";
+        }
+        leaf neighbor-interface-id {
+          type uint32;
+          description
+            "Neighbor Interface ID.";
+        }
+        leaf neighbor-router-id {
+          type yang:dotted-quad;
+          description
+            "Neighbor Router ID";
+        }
+        leaf type {
+          type uint8;
+          description
+            "Link type.";
+        }
+        leaf metric {
+          type uint16;
+          description
+            "Metric.";
+        }
+      }
+    }
+    container network {
+      when '../../header/type = 8194' {
+        description
+          "Only apply to network LSA.";
+      }
+      description
+        "Network LSA.";
+      uses ospfv3-lsa-options;
+      leaf-list attached-router {
+        type yang:dotted-quad;
+        description
+          "List of the routers attached to the network.";
+      }
+    }
+    container inter-area-prefix {
+      when '../../header/type = 8195' {
+        description
+          "Only apply to inter-area-prefix LSA.";
+      }
+      description
+        "Inter-Area-Prefix LSA.";
+      leaf metric {
+        type uint24;
+        description
+          "Metric";
+      }
+      uses ospfv3-lsa-prefix;
+    }
+    container inter-area-router {
+      when '../../header/type = 8196' {
+        description
+          "Only apply to inter-area-router LSA.";
+      }
+      description
+        "Inter-Area-Router LSA.";
+      uses ospfv3-lsa-options;
+      leaf metric {
+        type uint24;
+        description
+          "Metric";
+      }
+      leaf destination-router-id {
+        type yang:dotted-quad;
+        description
+          "The Router ID of the router being described by the LSA.";
+      }
+    }
+    container as-external {
+      when '../../header/type = 16389' {
+        description
+          "Only apply to as-external LSA.";
+      }
+      description
+        "AS-External LSA.";
+      uses ospfv3-lsa-external;
+    }
+    container nssa {
+      when '../../header/type = 8199' {
+        description
+          "Only apply to nssa LSA.";
+      }
+      description
+        "NSSA LSA.";
+      uses ospfv3-lsa-external;
+    }
+    container link {
+      when '../../header/type = 8' {
+        description
+          "Only apply to link LSA.";
+      }
+      description
+        "Link LSA.";
+      leaf rtr-priority {
+        type uint8;
+        description
+          "Router Priority of the interface.";
+      }
+      uses ospfv3-lsa-options;
+      leaf link-local-interface-address {
+        type inet:ipv6-address;
+        description
+          "The originating router's link-local
+           interface address on the link.";
+      }
+      leaf num-of-prefixes {
+        type uint32;
+        description
+          "Number of prefixes.";
+      }
+      list prefix {
+        key "prefix";
+        description
+          "List of prefixes associated with the link.";
+        uses ospfv3-lsa-prefix;
+      }
+    }
+    container intra-area-prefix {
+      when '../../header/type = 8201' {
+        description
+          "Only apply to intra-area-prefix LSA.";
+      }
+      description
+        "Intra-Area-Prefix LSA.";
+      leaf referenced-ls-type {
+        type uint16;
+        description
+          "Referenced Link State type.";
+      }
+      leaf referenced-link-state-id {
+        type uint32;
+        description
+          "Referenced Link State ID.";
+      }
+      leaf referenced-adv-router {
+        type inet:ipv4-address;
+        description
+          "Referenced Advertising Router.";
+      }
+      leaf num-of-prefixes {
+        type uint16;
+        description
+          "Number of prefixes.";
+      }
+      list prefix {
+        key "prefix";
+        description
+          "List of prefixes associated with the link.";
+        uses ospfv3-lsa-prefix;
+        leaf metric {
+          type uint24;
+          description
+            "Metric";
+        }
+      }
+    }
+  }
+
+  grouping lsa-header {
+    description
+      "Common LSA for OSPFv2 and OSPFv3";
+    leaf age {
+      type uint16;
+      mandatory true;
+      description
+        "LSA age.";
+    }
+    leaf type {
+      type uint16;
+      mandatory true;
+      description
+        "LSA type.";
+    }
+    leaf adv-router {
+      type yang:dotted-quad;
+      mandatory true;
+      description
+        "LSA advertising router.";
+    }
+    leaf seq-num {
+      type uint32;
+      mandatory true;
+      description
+        "LSA sequence number.";
+    }
+    leaf checksum {
+      type uint16;
+      mandatory true;
+      description
+        "LSA checksum.";
+    }
+    leaf length {
+      type uint16;
+      mandatory true;
+      description
+        "LSA length.";
+    }
+  }
+
+  grouping ospfv2-lsa {
+    description
+      "OSPFv2 LSA.";
+    container header {
+      description
+        "Decoded OSPFv2 LSA header data.";
+      leaf option {
+        type bits {
+          bit DC {
+            description
+              "When set, the router support demand circuits.";
+          }
+          bit P {
+            description
+              "Only used in type-7 LSA. When set, the NSSA
+               border router should translate the type-7 LSA
+               to type-5 LSA.";
+          }
+          bit MC {
+            description
+              "When set, the router support MOSPF.";
+          }
+          bit E {
+            description
+              "This bit describes the way AS-external-LSAs
+               are flooded";
+          }
+        }
+        mandatory true;
+        description
+          "LSA option.";
+      }
+      leaf lsa-id {
+        type inet:ipv4-address;
+        mandatory true;
+        description
+          "LSA ID.";
+      }
+      leaf opaque-type {
+        when '../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11' {
+          description
+            "Only apply to opaque LSA.";
+        }
+        type uint8;
+        mandatory true;
+        description
+          "Opaque type.";
+      }
+      leaf opaque-id {
+        when '../../header/type = 9 or ../../header/type = 10 or ../../header/type = 11' {
+          description
+            "Only apply to opaque LSA.";
+        }
+        type uint24;
+        mandatory true;
+        description
+          "Opaque id.";
+      }
+      uses lsa-header;
+    }
+    container body {
+      description
+        "Decoded OSPFv2 LSA body data.";
+      uses ospfv2-lsa-body;
+    }
+  }
+
+  grouping ospfv3-lsa {
+    description
+      "Decoded OSPFv3 LSA.";
+    container header {
+      description
+        "Decoded OSPFv3 LSA header data.";
+      leaf lsa-id {
+        type uint32;
+        mandatory true;
+        description
+          "LSA ID.";
+      }
+      uses lsa-header;
+    }
+    container body {
+      description
+        "Decoded OSPF LSA body data.";
+      uses ospfv3-lsa-body;
+    }
+  }
+
+  grouping lsa-common {
+    description
+      "Common field for OSPF LSA represenation.";
+    leaf decoded-completed {
+      type boolean;
+      description
+        "The OSPF LSA body is fully decoded.";
+    }
+  }
+
+  grouping link-scope-lsa {
+    description
+      "OSPF link-scope LSA.";
+    uses lsa-common;
+    choice version {
+      description
+        "OSPFv2 or OSPFv3 LSA body.";
+      container ospfv2 {
+        when "../../../../../../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+          description
+            "Applied to OSPFv2 only";
+        }
+        description
+          "OSPFv2 LSA";
+        uses ospfv2-lsa;
+      }
+      container ospfv3 {
+        when "../../../../../../../org-openroadm-routing:type = 'ospfv3'" {
+          description
+            "Applied to OSPFv3 only";
+        }
+        description
+          "OSPFv3 LSA";
+        uses ospfv3-lsa;
+      }
+    }
+  }
+
+  grouping area-scope-lsa {
+    description
+      "OSPF area-scope LSA.";
+    uses lsa-common;
+    choice version {
+      description
+        "OSPFv2 or OSPFv3 LSA body.";
+      container ospfv2 {
+        when "../../../../../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+          description
+            "Applied to OSPFv2 only";
+        }
+        description
+          "OSPFv2 LSA";
+        uses ospfv2-lsa;
+      }
+      container ospfv3 {
+        when "../../../../../../org-openroadm-routing:type = 'ospfv3'" {
+          description
+            "Applied to OSPFv3 only";
+        }
+        description
+          "OSPFv3 LSA";
+        uses ospfv3-lsa;
+      }
+    }
+  }
+
+  grouping as-scope-lsa {
+    description
+      "OSPF AS-scope LSA.";
+    uses lsa-common;
+    choice version {
+      description
+        "OSPFv2 or OSPFv3 LSA body.";
+      container ospfv2 {
+        when "../../../../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+          description
+            "Applied to OSPFv2 only";
+        }
+        description
+          "OSPFv2 LSA";
+        uses ospfv2-lsa;
+      }
+      container ospfv3 {
+        when "../../../../../org-openroadm-routing:type = 'ospfv3'" {
+          description
+            "Applied to OSPFv3 only";
+        }
+        description
+          "OSPFv3 LSA";
+        uses ospfv3-lsa;
+      }
+    }
+  }
+
+  grouping lsa-key {
+    description
+      "OSPF LSA key.";
+    leaf lsa-id {
+      type union {
+        type inet:ipv4-address;
+        type uint32;
+      }
+      description
+        "LSA ID.";
+    }
+    leaf adv-router {
+      type inet:ipv4-address;
+      description
+        "Advertising router.";
+    }
+  }
+
+  grouping af-area-config {
+    description
+      "OSPF address-family specific area config state.";
+    list range {
+      key "prefix";
+      description
+        "Summarize routes matching address/mask (border
+         routers only)";
+      leaf prefix {
+        type inet:ip-prefix;
+        description
+          "IPv4 or IPv6 prefix";
+      }
+      leaf advertise {
+        type boolean;
+        description
+          "Advertise or hide.";
+      }
+      leaf cost {
+        type uint24 {
+          range "0..16777214";
+        }
+        description
+          "Cost of summary route.";
+      }
+    }
+  }
+
+  grouping area-config {
+    description
+      "OSPF area config state.";
+    leaf area-type {
+      type identityref {
+        base area-type;
+      }
+      default "normal";
+      description
+        "Area type.";
+    }
+    leaf summary {
+      when "../area-type = 'stub' or ../area-type = 'nssa'" {
+        description
+          "Summary generation valid for stub/NSSA area.";
+      }
+      type boolean;
+      description
+        "Enable/Disable summary generation to the stub or
+         NSSA area.";
+    }
+    leaf default-cost {
+      when "../area-type = 'stub' or ../area-type = 'nssa'" {
+        description
+          "Default cost for LSA advertised into stub or
+           NSSA area.";
+      }
+      type uint32 {
+        range "1..16777215";
+      }
+      description
+        "Set the summary default-cost for a stub or NSSA area.";
+    }
+    uses af-area-config {
+      when "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-ospf:ospf/org-openroadm-ospf:operation-mode = 'org-openroadm-ospf:ships-in-the-night'" {
+        description
+          "Ships in the night configuration.";
+      }
+    }
+  }
+
+  grouping instance-config {
+    description
+      "OSPF instance config state.";
+    leaf router-id {
+      if-feature "router-id";
+      type yang:dotted-quad;
+      mandatory true;
+      description
+        "Defined in RFC 2328. A 32-bit number
+         that uniquely identifies the router.";
+    }
+    container admin-distance {
+      description
+        "Admin distance config state.";
+      choice granularity {
+        description
+          "Options for expressing admin distance
+           for intra-area and inter-area route";
+        case detail {
+          leaf intra-area {
+            type uint8 {
+              range "1..255" {
+                error-message "Configured value is out of range";
+              }
+            }
+            description
+              "Admin distance for intra-area route.";
+          }
+          leaf inter-area {
+            type uint8 {
+              range "1..255" {
+                error-message "Configured value is out of range";
+              }
+            }
+            description
+              "Admin distance for inter-area route.";
+          }
+        }
+      }
+      leaf external {
+        type uint8 {
+          range "1..255" {
+            error-message "Configured value is out of range";
+          }
+        }
+        description
+          "Admin distance for both external route.";
+      }
+    }
+    container graceful-restart {
+      if-feature "graceful-restart";
+      description
+        "Graceful restart config state.";
+      leaf enable {
+        type boolean;
+        description
+          "Enable/Disable graceful restart as defined in RFC 3623.";
+      }
+      leaf helper-enable {
+        type boolean;
+        default "true";
+        description
+          "Enable RestartHelperSupport in RFC 3623 Section B.2.";
+      }
+      leaf restart-interval {
+        type uint16 {
+          range "1..1800";
+        }
+        units "seconds";
+        default "120";
+        description
+          "RestartInterval option in RFC 3623 Section B.1.";
+      }
+      leaf helper-strict-lsa-checking {
+        type boolean;
+        description
+          "RestartHelperStrictLSAChecking option in RFC 3623
+           Section B.2.";
+      }
+    }
+    container auto-cost {
+      if-feature "auto-cost";
+      description
+        "Auto cost config state.";
+      leaf enable {
+        type boolean;
+        description
+          "Enable/Disable auto cost.";
+      }
+      leaf reference-bandwidth {
+        type uint32 {
+          range "1..4294967";
+        }
+        units "Mbits";
+        description
+          "Configure reference bandwidth in term of Mbits";
+      }
+    }
+  }
+
+  grouping interface-operation {
+    description
+      "OSPF interface operation state.";
+    reference
+      "RFC2328 Section 9";
+    uses interface-config;
+    leaf state {
+      type if-state-type;
+      description
+        "Interface state.";
+    }
+    leaf hello-timer {
+      type uint32;
+      units "milliseconds";
+      description
+        "Hello timer.";
+    }
+    leaf wait-timer {
+      type uint32;
+      units "milliseconds";
+      description
+        "Wait timer.";
+    }
+    leaf dr {
+      type inet:ipv4-address;
+      description
+        "DR.";
+    }
+    leaf bdr {
+      type inet:ipv4-address;
+      description
+        "BDR.";
+    }
+  }
+
+  grouping neighbor-operation {
+    description
+      "OSPF neighbor operation data.";
+    leaf address {
+      type inet:ip-address;
+      description
+        "Neighbor address.";
+    }
+    leaf dr {
+      type inet:ipv4-address;
+      description
+        "Designated Router.";
+    }
+    leaf bdr {
+      type inet:ipv4-address;
+      description
+        "Backup Designated Router.";
+    }
+    leaf state {
+      type nbr-state-type;
+      description
+        "OSPF neighbor state.";
+    }
+  }
+
+  grouping instance-operation {
+    description
+      "OSPF Address Family operation state.";
+    leaf router-id {
+      type yang:dotted-quad;
+      description
+        "Defined in RFC 2328. A 32-bit number
+         that uniquely identifies the router.";
+    }
+  }
+
+  grouping route-content {
+    description
+      "This grouping defines OSPF-specific route attributes.";
+    leaf metric {
+      type uint32;
+      description
+        "OSPF route metric.";
+    }
+    leaf tag {
+      type uint32;
+      default "0";
+      description
+        "OSPF route tag.";
+    }
+    leaf route-type {
+      type enumeration {
+        enum intra-area {
+          description
+            "OSPF intra-area route";
+        }
+        enum inter-area {
+          description
+            "OSPF inter-area route";
+        }
+        enum external-1 {
+          description
+            "OSPF external route type 1";
+        }
+        enum external-2 {
+          description
+            "OSPF External route type 2";
+        }
+        enum nssa-1 {
+          description
+            "OSPF NSSA external route type 1";
+        }
+        enum nssa-2 {
+          description
+            "OSPF NSSA external route type 2";
+        }
+      }
+      description
+        "OSPF route type";
+    }
+  }
+
+  grouping notification-instance-hdr {
+    description
+      "This group describes common instance specific
+       data for notifications.";
+    leaf routing-instance {
+      type org-openroadm-routing:routing-instance-ref;
+      description
+        "Describe the routing instance.";
+    }
+    leaf routing-protocol-name {
+      type string;
+      description
+        "Describes the name of the OSPF routing protocol.";
+    }
+    container instance-af {
+      description
+        "Describes the address family of the OSPF instance.";
+      leaf af {
+        type identityref {
+          base org-openroadm-routing:address-family;
+        }
+        description
+          "Address-family of the instance.";
+      }
+    }
+  }
+
+  notification if-state-change {
+    description
+      "This notification is sent when interface
+       state change is detected.";
+    uses notification-instance-hdr;
+    leaf link-type {
+      type identityref {
+        base if-link-type;
+      }
+      description
+        "Type of OSPF interface.";
+    }
+    container interface {
+      description
+        "Normal interface.";
+      leaf interface {
+        type org-openroadm-device:interface-ref;
+        description
+          "Interface.";
+      }
+    }
+    container virtual-link {
+      description
+        "virtual-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+    }
+    container sham-link {
+      description
+        "sham-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf local-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link local address.";
+      }
+      leaf remote-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link remote address.";
+      }
+    }
+    leaf state {
+      type if-state-type;
+      description
+        "Interface state.";
+    }
+  }
+
+  notification if-config-error {
+    description
+      "This notification is sent when interface
+       config error is detected.";
+    uses notification-instance-hdr;
+    leaf link-type {
+      type identityref {
+        base if-link-type;
+      }
+      description
+        "Type of OSPF interface.";
+    }
+    container interface {
+      description
+        "Normal interface.";
+      leaf interface {
+        type org-openroadm-device:interface-ref;
+        description
+          "Interface.";
+      }
+      leaf packet-source {
+        type yang:dotted-quad;
+        description
+          "Source address.";
+      }
+    }
+    container virtual-link {
+      description
+        "virtual-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+    }
+    container sham-link {
+      description
+        "sham-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf local-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link local address.";
+      }
+      leaf remote-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link remote address.";
+      }
+    }
+    leaf packet-type {
+      type packet-type;
+      description
+        "OSPF packet type.";
+    }
+    leaf error {
+      type enumeration {
+        enum badVersion {
+          description
+            "Bad version";
+        }
+        enum areaMismatch {
+          description
+            "Area mistmatch";
+        }
+        enum unknownNbmaNbr {
+          description
+            "Unknown NBMA neighbor";
+        }
+        enum unknownVirtualNbr {
+          description
+            "Unknown virtual link neighbor";
+        }
+        enum authTypeMismatch {
+          description
+            "Auth type mismatch";
+        }
+        enum authFailure {
+          description
+            "Auth failure";
+        }
+        enum netMaskMismatch {
+          description
+            "Network mask mismatch";
+        }
+        enum helloIntervalMismatch {
+          description
+            "Hello interval mismatch";
+        }
+        enum deadIntervalMismatch {
+          description
+            "Dead interval mismatch";
+        }
+        enum optionMismatch {
+          description
+            "Option mismatch";
+        }
+        enum mtuMismatch {
+          description
+            "MTU mismatch";
+        }
+        enum duplicateRouterId {
+          description
+            "Duplicate router ID";
+        }
+        enum noError {
+          description
+            "No error";
+        }
+      }
+      description
+        "Error code.";
+    }
+  }
+
+  notification nbr-state-change {
+    description
+      "This notification is sent when neighbor
+       state change is detected.";
+    uses notification-instance-hdr;
+    leaf link-type {
+      type identityref {
+        base if-link-type;
+      }
+      description
+        "Type of OSPF interface.";
+    }
+    container interface {
+      description
+        "Normal interface.";
+      leaf interface {
+        type org-openroadm-device:interface-ref;
+        description
+          "Interface.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+      leaf neighbor-ip-addr {
+        type yang:dotted-quad;
+        description
+          "Neighbor address.";
+      }
+    }
+    container virtual-link {
+      description
+        "virtual-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+    }
+    container sham-link {
+      description
+        "sham-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf local-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link local address.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+      leaf neighbor-ip-addr {
+        type yang:dotted-quad;
+        description
+          "Neighbor address.";
+      }
+    }
+    leaf state {
+      type nbr-state-type;
+      description
+        "Neighbor state.";
+    }
+  }
+
+  notification nbr-restart-helper-status-change {
+    description
+      "This notification is sent when neighbor restart
+       helper status change is detected.";
+    uses notification-instance-hdr;
+    leaf link-type {
+      type identityref {
+        base if-link-type;
+      }
+      description
+        "Type of OSPF interface.";
+    }
+    container interface {
+      description
+        "Normal interface.";
+      leaf interface {
+        type org-openroadm-device:interface-ref;
+        description
+          "Interface.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+      leaf neighbor-ip-addr {
+        type yang:dotted-quad;
+        description
+          "Neighbor address.";
+      }
+    }
+    container virtual-link {
+      description
+        "virtual-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+    }
+    leaf status {
+      type restart-helper-status-type;
+      description
+        "Restart helper status.";
+    }
+    leaf age {
+      type uint32;
+      units "seconds";
+      description
+        "Remaining time in current OSPF graceful restart
+         interval, if the router is acting as a restart
+         helper for the neighbor.";
+    }
+    leaf exit-reason {
+      type restart-exit-reason-type;
+      description
+        "Restart helper exit reason.";
+    }
+  }
+
+  notification rx-bad-packet {
+    description
+      "This notification is sent when an OSPF packet
+       has been received on a interface that cannot be parsed.";
+    uses notification-instance-hdr;
+    leaf link-type {
+      type identityref {
+        base if-link-type;
+      }
+      description
+        "Type of OSPF interface.";
+    }
+    container interface {
+      description
+        "Normal interface.";
+      leaf interface {
+        type org-openroadm-device:interface-ref;
+        description
+          "Interface.";
+      }
+      leaf packet-source {
+        type yang:dotted-quad;
+        description
+          "Source address.";
+      }
+    }
+    container virtual-link {
+      description
+        "virtual-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf neighbor-router-id {
+        type yang:dotted-quad;
+        description
+          "Neighbor router id.";
+      }
+    }
+    container sham-link {
+      description
+        "sham-link.";
+      leaf area-id {
+        type uint32;
+        description
+          "Area ID.";
+      }
+      leaf local-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link local address.";
+      }
+      leaf remote-ip-addr {
+        type inet:ip-address;
+        description
+          "Sham link remote address.";
+      }
+    }
+    leaf packet-type {
+      type packet-type;
+      description
+        "OSPF packet type.";
+    }
+  }
+
+  notification lsdb-approaching-overflow {
+    description
+      "This notification is sent when the number of LSAs
+       in the router's link state database has exceeded
+       ninety percent of the ext-lsdb-limit.";
+    uses notification-instance-hdr;
+    leaf ext-lsdb-limit {
+      type uint32;
+      description
+        "The maximum number of non-default AS-external LSAs
+         entries that can be stored in the link state database.";
+    }
+  }
+
+  notification lsdb-overflow {
+    description
+      "This notification is sent when the number of LSAs
+       in the router's link state database has exceeded
+       ext-lsdb-limit.";
+    uses notification-instance-hdr;
+    leaf ext-lsdb-limit {
+      type uint32;
+      description
+        "The maximum number of non-default AS-external LSAs
+         entries that can be stored in the link state database.";
+    }
+  }
+
+  notification nssa-translator-status-change {
+    description
+      "This notification is sent when there is a change
+       in the router's ability to translate OSPF NSSA LSAs
+       OSPF AS-External LSAs.";
+    uses notification-instance-hdr;
+    leaf area-id {
+      type uint32;
+      description
+        "Area ID.";
+    }
+    leaf status {
+      type nssa-translator-state-type;
+      description
+        "NSSA translator status.";
+    }
+  }
+
+  notification restart-status-change {
+    description
+      "This notification is sent when the graceful restart
+       state for the router has changed.";
+    uses notification-instance-hdr;
+    leaf status {
+      type restart-status-type;
+      description
+        "Restart status.";
+    }
+    leaf restart-interval {
+      type uint16 {
+        range "1..1800";
+      }
+      units "seconds";
+      default "120";
+      description
+        "Restart interval.";
+    }
+    leaf exit-reason {
+      type restart-exit-reason-type;
+      description
+        "Restart exit reason.";
+    }
+  }
+
+  grouping ospf-grp {
+    container ospf {
+      description
+        "OSPF.";
+      container all-instances-inherit {
+        if-feature "instance-inheritance";
+        description
+          "Inheritance support to all instances.";
+        container area {
+          description
+            "Area config to be inherited by all areas in
+             all instances.";
+        }
+        container interface {
+          description
+            "Interface config to be inherited by all interfaces
+             in all instances.";
+        }
+      }
+      leaf operation-mode {
+        type identityref {
+          base operation-mode;
+        }
+        default "org-openroadm-ospf:ships-in-the-night";
+        description
+          "OSPF operation mode.";
+      }
+      list instance {
+        key "routing-instance af";
+        description
+          "An OSPF routing protocol instance.";
+        leaf routing-instance {
+          type org-openroadm-routing:routing-instance-ref;
+          description
+            "For protocol centric model, which is supported in
+             default-instance only, this could reference any layer 3
+             routing-instance.
+             For routing-instance centric model, must reference the
+             enclosing routing-instance.";
+        }
+        leaf af {
+          type identityref {
+            base org-openroadm-routing:address-family;
+          }
+          description
+            "Address-family of the instance.";
+        }
+        uses instance-config;
+        container all-areas-inherit {
+          if-feature "area-inheritance";
+          description
+            "Inheritance for all areas.";
+          container area {
+            description
+              "Area config to be inherited by all areas.";
+          }
+          container interface {
+            description
+              "Interface config to be inherited by all interfaces
+               in all areas.";
+          }
+        }
+        list area {
+          key "area-id";
+          description
+            "List of ospf areas";
+          leaf area-id {
+            type yang:dotted-quad;
+            description
+              "Area ID.";
+          }
+          uses area-config;
+          container all-interfaces-inherit {
+            if-feature "interface-inheritance";
+            description
+              "Inheritance for all interfaces";
+            container interface {
+              description
+                "Interface config to be inherited by all
+                 interfaces.";
+            }
+          }
+          list virtual-link {
+            when "../area-id != '0' and ../area-type = 'normal'" {
+              description
+                "Transit area must be non-backbone normal area.";
+            }
+            key "router-id";
+            description
+              "OSPF virtual link";
+            leaf router-id {
+              type yang:dotted-quad;
+              description
+                "Virtual link router ID.";
+            }
+            uses interface-common-config;
+          }
+          list interface {
+            key "interface";
+            description
+              "List of OSPF interfaces.";
+            leaf interface {
+              type org-openroadm-device:interface-ref;
+              description
+                "Interface.";
+            }
+            uses interface-config;
+          }
+        }
+      }
+    }
+    description
+      "Grouping for OSPF";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol" {
+    when "org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2' or org-openroadm-routing:type = 'org-openroadm-ospf:ospfv3'" {
+      description
+        "This augment is only valid for a routing protocol instance
+         of OSPF (type 'ospfv2' or 'ospfv3').";
+    }
+    description
+      "OSPF augmentation.";
+    uses ospf-grp;
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-ospf:ospf/org-openroadm-ospf:instance" {
+    when "../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2' or
+          ../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv3'" {
+        description
+          "This augment is only valid for OSPF
+           (type 'ospfv2' or 'ospfv3').";
+    }
+    if-feature "multi-topology";
+    description
+      "OSPF multi-topology routing-protocol augmentation.";
+  }
+
+  grouping topology-cost-grp {
+    list topology {
+      key "name";
+      description
+        "OSPF interface topology.";
+      leaf name {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:ribs/org-openroadm-routing:rib/org-openroadm-routing:name";
+        }
+        description
+          "One of the topology enabled on this interface";
+      }
+      leaf cost {
+        type uint32;
+        description
+          "Interface cost for this topology";
+      }
+    }
+    description
+      "Grouping for topology cost";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-ospf:ospf/org-openroadm-ospf:instance/org-openroadm-ospf:area/org-openroadm-ospf:interface" {
+    when "../../../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+      description
+        "This augment is only valid for OSPFv2.";
+    }
+    if-feature "org-openroadm-ospf:multi-topology";
+    description
+      "OSPF multi-topology interface augmentation.";
+    uses topology-cost-grp;
+  }
+
+  grouping ospf-lsa-grp {
+    container ospf {
+      description
+        "OSPF";
+      list instance {
+        key "routing-instance af";
+        description
+          "An OSPF routing protocol instance.";
+        leaf routing-instance {
+          type org-openroadm-routing:routing-instance-ref;
+          description
+            "For protocol centric model, which is supported in
+             default-instance only, this could reference any layer 3
+             routing-instance.
+             For routing-instance centric model, must reference the
+             enclosing routing-instance.";
+        }
+        leaf af {
+          type identityref {
+            base org-openroadm-routing:address-family;
+          }
+          description
+            "Address-family of the instance.";
+        }
+        uses instance-operation;
+        list area {
+          key "area-id";
+          description
+            "List of OSPF areas";
+          leaf area-id {
+            type area-id-type;
+            description
+              "Area ID.";
+          }
+          list interface {
+            key "interface";
+            description
+              "List of OSPF interfaces.";
+            leaf interface {
+              type org-openroadm-device:interface-ref;
+              description
+                "Interface.";
+            }
+            uses interface-operation;
+            list neighbor {
+              key "neighbor-id";
+              description
+                "List of OSPF neighbors.";
+              leaf neighbor-id {
+                type inet:ipv4-address;
+                description
+                  "Neighbor ID.";
+              }
+              uses neighbor-operation;
+            }
+            list link-scope-lsas {
+              when "../../../../../org-openroadm-routing:type = 'ospfv3'" {
+                description
+                  "Link scope LSA only exists in OSPFv3.";
+              }
+              key "lsa-type";
+              description
+                "List OSPF link scope LSA databases";
+              leaf lsa-type {
+                type uint8;
+                description
+                  "OSPF link scope LSA type.";
+              }
+              list link-scope-lsa {
+                key "lsa-id adv-router";
+                description
+                  "List of OSPF link scope LSAs";
+                uses lsa-key;
+                uses link-scope-lsa;
+              }
+            }
+          }
+          list area-scope-lsas {
+            key "lsa-type";
+            description
+              "List OSPF area scope LSA databases";
+            leaf lsa-type {
+              type uint8;
+              description
+                "OSPF area scope LSA type.";
+            }
+            list area-scope-lsa {
+              key "lsa-id adv-router";
+              description
+                "List of OSPF area scope LSAs";
+              uses lsa-key;
+              uses area-scope-lsa;
+            }
+          }
+        }
+        list as-scope-lsas {
+          key "lsa-type";
+          description
+            "List OSPF AS scope LSA databases";
+          leaf lsa-type {
+            type uint8;
+            description
+              "OSPF AS scope LSA type.";
+          }
+          list as-scope-lsa {
+            key "lsa-id adv-router";
+            description
+              "List of OSPF AS scope LSAs";
+            uses lsa-key;
+            uses as-scope-lsa;
+          }
+        }
+      }
+    }
+    description
+      "Grouping for ospf lsa";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing-state/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol" {
+    when "org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2' or org-openroadm-routing:type = 'org-openroadm-ospf:ospfv3'" {
+      description
+        "This augment is only valid for a routing protocol instance
+         of type 'ospfv2' or 'ospfv3'.";
+    }
+    description
+      "OSPF configuration.";
+    uses ospf-lsa-grp;
+  }
+
+  grouping topology-area-grp {
+    list topology {
+      key "name";
+      description
+        "OSPF topology.";
+      leaf name {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:ribs/org-openroadm-routing:rib/org-openroadm-routing:name";
+        }
+        description
+          "RIB";
+      }
+      list area {
+        key "area-id";
+        description
+          "List of ospf areas";
+        leaf area-id {
+          type area-id-type;
+          description
+            "Area ID.";
+        }
+      }
+    }
+    description
+      "Grouping for topology area";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing-state/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-ospf:ospf/org-openroadm-ospf:instance" {
+    when "../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+      description
+        "This augment is only valid for OSPFv2.";
+    }
+    if-feature "multi-topology";
+    description
+      "OSPF multi-topology routing-protocol augmentation.";
+    uses topology-area-grp;
+  }
+
+  grouping topology-grp {
+    list topology {
+      key "name";
+      description
+        "OSPF interface topology.";
+      leaf name {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:ribs/org-openroadm-routing:rib/org-openroadm-routing:name";
+        }
+        description
+          "One of the topology enabled on this interface";
+      }
+    }
+    description
+      "Grouping for topology";
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing-state/org-openroadm-routing:routing-instance/org-openroadm-routing:routing-protocols/org-openroadm-routing:routing-protocol/org-openroadm-ospf:ospf/org-openroadm-ospf:instance/org-openroadm-ospf:area/org-openroadm-ospf:interface" {
+    when "../../../../org-openroadm-routing:type = 'org-openroadm-ospf:ospfv2'" {
+      description
+        "This augment is only valid for OSPFv2.";
+    }
+    if-feature "org-openroadm-ospf:multi-topology";
+    description
+      "OSPF multi-topology interface augmentation.";
+    uses topology-grp;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-otn-common@2020-03-27.yang b/ordmodels/device/src/main/yang/org-openroadm-otn-common@2020-03-27.yang
new file mode 100644 (file)
index 0000000..21f1bb3
--- /dev/null
@@ -0,0 +1,198 @@
+module org-openroadm-otn-common {
+  namespace "http://org/openroadm/otn-common";
+  prefix org-openroadm-otn-common;
+
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-common-attributes {
+    prefix org-openroadm-common-attributes;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for common OTN interface attributes and types.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+
+  typedef otn-interface-enum {
+    type enumeration {
+      enum otu {
+        value 1;
+        description
+          "OTU enumeration";
+      }
+      enum odu-path {
+        value 2;
+        description
+          "ODU Path enumeration";
+      }
+      enum odu-tcm {
+        value 3;
+        description
+          "ODU TCM enumeration";
+      }
+    }
+    description
+      "Enumeration type for otn interface";
+  }
+
+  grouping trail-trace-state {
+    description
+      "Trail trace state grouping";
+    leaf accepted-sapi {
+      type string;
+      config false;
+      description
+        "The accepted SAPI recovered from the received multi-frame TTI field.
+         Received SAPI contains the receive data, minus the sapi[0] and any 0x00 padding at the end";
+    }
+    leaf accepted-dapi {
+      type string;
+      config false;
+      description
+        "The accepted DAPI recovered from the received multi-frame TTI field
+         Received DAPI contains the receive data, minus the dapi[0] and any 0x00 padding at the end";
+    }
+    leaf accepted-operator {
+      type string;
+      config false;
+      description
+        "The accepted Operator Specific field recovered from the received multi-frame TTI field";
+    }
+  }
+
+  grouping trail-trace {
+    description
+      "Trail trace grouping";
+    uses org-openroadm-common-attributes:trail-trace-tx;
+    uses trail-trace-state;
+    uses org-openroadm-common-attributes:trail-trace-other;
+  }
+
+  notification otn-tti-info-change {
+    description
+      "Notification for OTN TTI";
+    leaf resource-type {
+      type org-openroadm-resource-types:resource-type-enum;
+      mandatory true;
+      description
+        "Resource type for OTN TTI";
+    }
+    leaf resource {
+      type string;
+      mandatory true;
+      description
+        "Resource for OTN TTI";
+    }
+    leaf otn-interface-type {
+      type otn-interface-enum;
+      mandatory true;
+      description
+        "OTN interface type for TTI";
+    }
+    leaf otn-interface-tcm-layer {
+      when "../otn-interface-type='odu-tcm'";
+      type uint8;
+      description
+        "TCM layer for OTN TTI";
+    }
+    leaf otn-interface-tcm-direction {
+      when "../otn-interface-type='odu-tcm'";
+      type org-openroadm-otn-common-types:tcm-direction-enum;
+      description
+        "TCM direction for OTN TTI";
+    }
+    container tti-info {
+      description
+        "Container for TTI info";
+      leaf accepted-sapi {
+        type string;
+        description
+          "Accepted SAPI for TTI";
+      }
+      leaf accepted-dapi {
+        type string;
+        description
+          "Accepted DAPI for TTI";
+      }
+      leaf accepted-operator {
+        type string;
+        description
+          "Accepted operator for TTI";
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-otn-odu-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-otn-odu-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..72ad065
--- /dev/null
@@ -0,0 +1,442 @@
+module org-openroadm-otn-odu-interfaces {
+  yang-version 1.1;
+  namespace "http://org/openroadm/otn-odu-interfaces";
+  prefix org-openroadm-otn-odu-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-maintenance-testsignal {
+    prefix org-openroadm-maint-testsignal;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-otn-common {
+    prefix org-openroadm-otn-common;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-common-attributes {
+    prefix org-openroadm-common-attributes;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility otnodu interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping msi-entry {
+    description
+      "OPU Multiplex Structure Identifier (G.709 clause 19.4.1)";
+    leaf trib-slot {
+      type uint16;
+      description
+        "tributary slot (TS)";
+    }
+    leaf odtu-type {
+      type identityref {
+        base org-openroadm-otn-common-types:odtu-type-identity;
+      }
+      description
+        "ODTU type, part of the MSI (Multiplex Structure Identifier)";
+    }
+    leaf trib-port {
+      type uint16;
+      description
+        "Tributary Port Number (0-based), part of the MSI";
+    }
+  }
+
+  grouping opucn-msi-entry {
+    description
+      "OPUCn Multiplex Structure Identifier (G.709 clause 20.4.1)";
+    leaf opucn-trib-slot {
+      type org-openroadm-otn-common-types:opucn-trib-slot-def;
+      description
+        "OPUCn tributary slot (TS)";
+    }
+    leaf availability {
+      type boolean;
+      description
+        "available";
+    }
+    leaf occupation {
+      type boolean;
+      description
+        "occupied";
+    }
+    leaf trib-port {
+      type uint16;
+      description
+        "OPUCn Tributary Port Number (0-based), part of the MSI";
+    }
+  }
+
+  grouping odu-attributes {
+    description
+      "ODU attributes";
+    leaf rate {
+      type identityref {
+        base org-openroadm-otn-common-types:odu-rate-identity;
+      }
+      description
+        "rate identity of the ODU. 'identityref' is used
+         to allow to extend for future higher rates";
+    }
+    leaf oducn-n-rate {
+      type uint16;
+      description
+        "ODUCn rate";
+    }
+    leaf oduflex-cbr-service {
+      type identityref {
+        base org-openroadm-otn-common-types:ODUflex-cbr-identity;
+      }
+      description
+        "ODUflex for CBR client signals (G.709)";
+    }
+    leaf oduflex-gfp-num-ts {
+      type uint16;
+      description
+        "For ODUflex GFP-F mapped client signals (G.709), the number of
+         tributary slot as per G.709 Table 7-8";
+    }
+    leaf oduflex-gfp-ts-bandwidth {
+      type uint16;
+      description
+        "The tributary slot minimum bit rates in the approximated value [Mbps]
+         given ODUflex (GFP) 100 ppm (G.709 Table 7-8) :
+           1249 Mbps [1 249 052.312 277 kbps] (n = 1 to 8) (ODU2.ts)
+           1254 Mbps [1 254 344.906 9646 kbps] (n = 9 to 32) ODU3.ts)
+           1301 Mbps [1 301 336.986 2867 kbps] (n = 33 to 80) (ODU4.ts)";
+    }
+    leaf oduflex-imp-s {
+      type uint16;
+      description
+        "For ODUflex IMP (Idle insertion Mapping Procedure) mapped client signals,
+         s = 2, 8, n x 5 with N >= 1 (G.709 12.2.6 & Table 7-3)";
+    }
+    leaf oduflex-flexe-n {
+      type uint16;
+      description
+        "For ODUflex for FlexE-aware client signals, n in the range of 1 to 20*254
+         (G.709 17.12)";
+    }
+    leaf odu-function {
+      type identityref {
+        base org-openroadm-otn-common-types:odu-function-identity;
+      }
+      description
+        "function of the ODU interface";
+    }
+    leaf monitoring-mode {
+      type enumeration {
+        enum not-terminated {
+          description
+            "Not Terminated: no detection or generation.
+             Overhead is passed through the interface transparently in receive direction";
+        }
+        enum terminated {
+          description
+            "Terminated: detection and generation enabled.
+             Overhead is erased (replaced with all zeros) in receive direction";
+        }
+        enum monitored {
+          description
+            "Monitored: detection enabled.
+             Overhead is passed through the interface transparently in receive direction";
+        }
+      }
+      description
+        "Monitoring mode of the ODU Overhead";
+    }
+    leaf no-oam-function {
+      type empty;
+      description
+        "No OAM functionality exists for this ODU interface, the entity exists in software only. This entity does not report alarms or PM and does not support TCM, TTI, delay measurement, loopbacks, test signal and other hardware-based functions. This is an optional parameter, only needs to be present when no-oam-function supported for this interface.";
+    }
+    leaf proactive-delay-measurement-enabled {
+      type boolean;
+      description
+        "enable/disable proactive Delay Measurement";
+    }
+    uses org-openroadm-common-attributes:parent-odu-allocation;
+    uses org-openroadm-otn-common:trail-trace;
+    uses org-openroadm-common-attributes:deg-threshold;
+    list tcm {
+      key "layer tcm-direction";
+      max-elements 12;
+      description
+        "Tandem Connection Management";
+      uses tcm-attributes;
+    }
+    uses opu;
+  }
+
+  grouping opu {
+    description
+      "OPU group";
+    container opu {
+      when "../monitoring-mode = 'terminated' or ../monitoring-mode = 'monitored'";
+      description
+        "Optical Channel Payload Unit (OPU)";
+      leaf payload-type {
+        type org-openroadm-otn-common-types:payload-type-def;
+        description
+          "Payload Type";
+      }
+      leaf rx-payload-type {
+        type org-openroadm-otn-common-types:payload-type-def;
+        description
+          "Received Payload Type";
+      }
+      leaf exp-payload-type {
+        type org-openroadm-otn-common-types:payload-type-def;
+        description
+          "Expected Payload Type";
+      }
+      container msi {
+        when "../payload-type = '20' or ../payload-type = '21'";
+        description
+          "Multiple Structure Identifier";
+        list tx-msi {
+          key "trib-slot";
+          description
+            "Transmit MSI";
+          uses msi-entry;
+        }
+        list rx-msi {
+          key "trib-slot";
+          description
+            "Received MSI";
+          uses msi-entry;
+        }
+        list exp-msi {
+          key "trib-slot";
+          description
+            "Expected MSI";
+          uses msi-entry;
+        }
+      }
+      container opucn-msi {
+        when "../payload-type = '22'";
+        description
+          "OPUCn Mutiplex Structure Identifier (G.709 clause 20.4.1)";
+        list tx-msi {
+          key "opucn-trib-slot";
+          description
+            "Transmit MSI";
+          uses opucn-msi-entry;
+        }
+        list rx-msi {
+          key "opucn-trib-slot";
+          description
+            "Received MSI";
+          uses opucn-msi-entry;
+        }
+        list exp-msi {
+          key "opucn-trib-slot";
+          description
+            "Expected MSI";
+          uses opucn-msi-entry;
+        }
+      }
+    }
+  }
+
+  grouping tcm-attributes {
+    description
+      "Tandem Connection Monitoring (TCM) attributes";
+    leaf layer {
+      type uint8 {
+        range "1..6";
+      }
+      description
+        "TCM layer";
+    }
+    leaf monitoring-mode {
+      type enumeration {
+        enum not-terminated {
+          description
+            "Not Terminated: no detection or generation.
+             Overhead is passed through the interface transparently in receive direction
+             unless extension is set for erase";
+        }
+        enum terminated {
+          description
+            "Terminated: detection and generation enabled.
+             Overhead is erased (replaced with all zeros) in receive direction, unless
+             extension is set to passthrough";
+        }
+        enum monitored {
+          description
+            "Monitored: detection enabled.
+             Overhead is passed through the interface transparently in receive direction
+             unless extension is set for erase";
+        }
+      }
+      description
+        "Monitoring mode of the TCM layer";
+    }
+    leaf ltc-act-enabled {
+      type boolean;
+      description
+        "enable/disable alarm transfer on detection of Loss of Tandem Connection (LTC)";
+    }
+    leaf proactive-delay-measurement-enabled {
+      type boolean;
+      description
+        "enable/disable proactive Delay Measurement for TCM";
+    }
+    leaf tcm-direction {
+      type org-openroadm-otn-common-types:tcm-direction-enum;
+      description
+        "Direction of TCM.";
+    }
+    uses org-openroadm-otn-common:trail-trace;
+    uses org-openroadm-common-attributes:deg-threshold;
+  }
+
+  grouping odu-container {
+    description
+      "ODU container group";
+    container odu {
+      presence "Attribute Nodes for Optical Data Unit (ODU)";
+      description
+        "Optical Channel Data Unit (ODU)";
+      uses odu-attributes {
+        refine "opu/rx-payload-type" {
+          config false;
+        }
+        refine "opu/msi" {
+          config false;
+        }
+        refine "opu/opucn-msi" {
+          config false;
+        }
+        refine "no-oam-function" {
+          config false;
+        }
+      }
+      uses org-openroadm-maint-testsignal:maint-testsignal;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:otnOdu'";
+    description
+      "augment for ODU container";
+    uses odu-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-otn-otu-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-otn-otu-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..590d97e
--- /dev/null
@@ -0,0 +1,193 @@
+module org-openroadm-otn-otu-interfaces {
+  namespace "http://org/openroadm/otn-otu-interfaces";
+  prefix org-openroadm-otn-otu-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-maintenance-loopback {
+    prefix org-openroadm-maint-loopback;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-otn-common {
+    prefix org-openroadm-otn-common;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-otn-common-types {
+    prefix org-openroadm-otn-common-types;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-common-attributes {
+    prefix org-openroadm-common-attributes;
+    revision-date 2020-03-27;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility otnotu interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping otu-attributes {
+    description
+      "OTU attributes";
+    leaf rate {
+      type identityref {
+        base org-openroadm-otn-common-types:otu-rate-identity;
+      }
+      description
+        "rate identity of the OTU. 'identityref' is used
+         to allow to extend for future higher rates";
+    }
+    leaf otu4-member-id {
+      when "../rate = 'org-openroadm-otn-common-types:OTU4'";
+      type uint16;
+      description
+        "To uniquely identify each member of an OTSi group and the order of each member in the group.
+         Similar to FlexO PHY-ID in the FlexO Group (PID in G.709.1/3)";
+    }
+    leaf otucn-n-rate {
+      type uint16;
+      description
+        "Specify the N associated with OTUCn, e.g. N = 2,3,4 for 200G/300G/400G respectively";
+    }
+    leaf otucn-M-subrate {
+      type uint16;
+      description
+        "OTUCn subrate (OTUCn-M), value of M specifies the number of active
+         5 Gbit/s OPUCn tributary slots (G.709 Annex H)";
+    }
+
+    uses org-openroadm-common-types:fec-grouping {
+      description
+        "OTU FEC / Forward Error Correction";
+    }
+    uses org-openroadm-otn-common:trail-trace;
+    uses org-openroadm-common-attributes:deg-threshold;
+  }
+
+  grouping otu-container {
+    container otu {
+      description
+        "Optical Channel Transport Unit (OTU)";
+      uses otu-attributes;
+      uses org-openroadm-maint-loopback:maint-loopback;
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:otnOtu'";
+    uses otu-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-otsi-group-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-otsi-group-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..56c558c
--- /dev/null
@@ -0,0 +1,117 @@
+module org-openroadm-otsi-group-interfaces {
+  namespace "http://org/openroadm/otsi-group-interfaces";
+  prefix org-openroadm-otsi-group-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+  import org-openroadm-common-optical-channel-types {
+    prefix org-openroadm-common-optical-channel-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device flexible optical transport network group interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2018,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+
+  grouping otsi-group-container {
+    description
+      "OTSI group container group";
+    container otsi-group {
+      description
+        "OTSI group container";
+      leaf group-rate {
+        type identityref {
+          base org-openroadm-common-optical-channel-types:otsi-rate-identity;
+        }
+        description
+          "Supported group rate";
+      }
+      leaf group-id {
+        type uint32;
+        description
+          "Mandatory for FlexO B100G.  Not required for Non-FlexO B100G.";
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:otsi-group'";
+    description
+      "augment for otsi group";
+    uses org-openroadm-otsi-group-interfaces:otsi-group-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-physical-types@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-physical-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..2360937
--- /dev/null
@@ -0,0 +1,153 @@
+module org-openroadm-physical-types {
+  namespace "http://org/openroadm/physical/types";
+  prefix org-openroadm-physical-types;
+
+  import org-openroadm-common-state-types {
+    prefix org-openroadm-common-state-types;
+    revision-date 2019-11-29;
+  }
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions of physical types.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping node-info {
+    description
+      "Physical inventory data used by the node";
+    leaf vendor {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "Vendor of the equipment";
+    }
+    leaf model {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "Physical resource model information.";
+    }
+    leaf serial-id {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "Product Code for this physical resource";
+    }
+  }
+
+  grouping common-info {
+    description
+      "Physical inventory data used by all other entities";
+    uses node-info;
+    leaf type {
+      type string;
+      config false;
+      description
+        "The specific type of this physical resource - ie the type of
+         shelf, type of circuit-pack, etc.";
+    }
+    leaf product-code {
+      type string;
+      config false;
+      description
+        "Product Code for this physical resource";
+    }
+    leaf manufacture-date {
+      type yang:date-and-time;
+      config false;
+      description
+        "Manufacture date of physical resource";
+    }
+    leaf clei {
+      type string;
+      config false;
+      description
+        "CLEI for this physical resource";
+    }
+    leaf hardware-version {
+      type string;
+      config false;
+      description
+        "The version of the hardware.";
+    }
+    leaf operational-state {
+      type org-openroadm-common-state-types:state;
+      config false;
+      mandatory true;
+      description
+        "Operational state of the physical resource";
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-pluggable-optics-holder-capability@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-pluggable-optics-holder-capability@2020-05-29.yang
new file mode 100644 (file)
index 0000000..2acb4aa
--- /dev/null
@@ -0,0 +1,153 @@
+module org-openroadm-pluggable-optics-holder-capability {
+  namespace "http://org/openroadm/pluggable-optics-holder-capability";
+  prefix org-openroadm-pluggable-optics-holder-capability;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-port-capability {
+    prefix org-openroadm-port-capability;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-port-types {
+    prefix org-openroadm-port-types;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for pluggable optics holder capability.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2017 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+
+  grouping pluggable-optics-holder-capability {
+    description
+      "Pluggable optics holder capability parameters.";
+    container pluggable-optics-holder-capability {
+      config false;
+      description
+        "Container for pluggable optics holder capability";
+      list supported-circuit-pack {
+        key "supported-circuit-pack-type supported-pluggable-id-type";
+        description
+          "List for supported circuit pack";
+        leaf supported-circuit-pack-type {
+          type string;
+          mandatory true;
+          description
+            "Type of pluggable circuit-pack supported";
+        }
+        leaf supported-pluggable-id-type {
+          type identityref {
+            base org-openroadm-port-types:pluggable-identifiers-identity;
+          }
+          description
+            "Supported pluggable id type";
+        }
+        list ports {
+          key "port-name";
+          description
+            "Port reference on supported pluggable circuit-pack";
+          leaf port-name {
+            type string;
+            description
+              "Port name";
+          }
+          uses org-openroadm-port-capability:port-capability-grp;
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:cp-slots" {
+    when "org-openroadm-device:slot-type='pluggable-optics-holder'";
+    uses pluggable-optics-holder-capability;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-port-capability@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-port-capability@2020-05-29.yang
new file mode 100644 (file)
index 0000000..684b2f8
--- /dev/null
@@ -0,0 +1,342 @@
+module org-openroadm-port-capability {
+  namespace "http://org/openroadm/port-capability";
+  prefix org-openroadm-port-capability;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-port-types {
+    prefix org-openroadm-port-types;
+    revision-date 2020-03-27;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for port capabilities.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2017 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+
+  grouping port-id-grp {
+    leaf circuit-pack-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
+      }
+      description
+        "Circuit-Pack identifier. Unique within the context of a device.";
+    }
+    leaf port-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports/org-openroadm-device:port-name";
+      }
+      description
+        "Port index identifier. Unique within the context of a circuit-pack.";
+    }
+  }
+
+  grouping slot-id-grp {
+    leaf circuit-pack-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:circuit-pack-name";
+      }
+      description
+        "Circuit-Pack identifier. Unique within the context of a device.";
+    }
+    leaf slot-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:cp-slots/org-openroadm-device:slot-name";
+      }
+      description
+        "cp-slot name. Unique within the context of a circuit-pack.";
+    }
+  }
+
+  grouping optical-operational-modes-grp-for-capability {
+    leaf-list optical-operational-mode-profile-name {
+      type leafref {
+        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:optical-operational-mode-profile/org-openroadm-device:profile-name";
+      }
+      config false;
+      description
+        "Optical operation capabilities leaf list";
+    }
+    description
+      "Optical operational modes grouping";
+  }
+
+  grouping port-capability-grp {
+    description
+      "OpenROADM port capability parameters.";
+    container port-capabilities {
+      config false;
+      list supported-interface-capability {
+        key "if-cap-type";
+        description
+          "Supported interface capability on the port.";
+        leaf if-cap-type {
+          type identityref {
+            base org-openroadm-port-types:supported-if-capability;
+          }
+          description
+            "Interface type/hierarchy/rate supported on this port";
+        }
+        leaf-list split-lambda-profile-name {
+          type leafref {
+            path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:split-lambda-profile/org-openroadm-device:profile-name";
+          }
+          description
+            "Split lambda mode capabilities";
+        }
+        leaf-list otsigroup-capability-profile-name {
+          type leafref {
+             path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:otsigroup-capability-profile/org-openroadm-device:profile-name";
+          }
+          description
+            "OTSI group capabilities";
+        }
+        uses optical-operational-modes-grp-for-capability;
+        container otn-capability {
+          description
+            "OTN capability";
+          leaf otn-capability-profile-name {
+            type leafref {
+              path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:otn-capability-profile/org-openroadm-device:profile-name";
+            }
+          }
+          list mpdr-client-restriction {
+            description
+              "Restriction rules for how LO ODUs are multiplexed into HO ODU
+               and the relation with mapped client ports.";
+            leaf network-ho-odu-circuit-pack-name {
+              type string;
+              mandatory true;
+              description
+                "Circuit-Pack identifier. Unique within the context of a device.";
+            }
+            leaf network-ho-odu-port-name {
+              type string;
+              mandatory true;
+              description
+                "port identifier.";
+            }
+            leaf-list muxp-profile-name {
+              type leafref {
+                path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:muxp-profile/org-openroadm-device:profile-name";
+              }
+            }
+          }
+          leaf otn-odu-mux-hierarchy-profile-name {
+            type leafref {
+              path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:otn-odu-mux-hierarchy-profile/org-openroadm-device:profile-name";
+            }
+            description
+              "OTN ODU Mux hierarchy capabilities";
+          }
+        }
+        container logical-port {
+          leaf circuit-pack-name {
+            type string;
+            description
+              "The circuit pack supporting the logical port";
+          }
+          leaf port-name {
+            type string;
+            description
+              "Port name for logical-port";
+          }
+          description
+            "Logical port container";
+        }
+      }
+    }
+  }
+
+  grouping port-group-restriction-grp {
+    container port-group-restriction {
+      config false;
+      list port-bandwidth-sharing {
+        key "port-sharing-id";
+        leaf port-sharing-id {
+          type uint16;
+        }
+        list port-list {
+          key "circuit-pack-name port-name";
+          uses port-id-grp;
+        }
+        list pluggable-optics-holder-list {
+          key "circuit-pack-name slot-name";
+          uses slot-id-grp;
+        }
+        leaf shared-bandwidth {
+          type uint16;
+          units "Gbps";
+        }
+        list possible-port-config {
+          key "config-id";
+          leaf config-id {
+            type uint16;
+          }
+          list port-if-type-config {
+            key "circuit-pack-name port-name";
+            uses port-id-grp;
+            leaf-list port-if-type {
+              type identityref {
+                base org-openroadm-port-types:supported-if-capability;
+              }
+            }
+            leaf otsi-rate {
+              type uint16;
+              units "Gbps";
+              description
+                "Optical Tributary Signal (OTSi) rate in Gbps";
+            }
+          }
+          list slot-if-type-config {
+            key "circuit-pack-name slot-name port-name";
+            uses slot-id-grp;
+            leaf port-name {
+              type string;
+            }
+            leaf-list port-if-type {
+              type identityref {
+                base org-openroadm-port-types:supported-if-capability;
+              }
+            }
+            leaf-list port-module-type {
+              type org-openroadm-port-types:port-module-types;
+            }
+            leaf otsi-rate {
+              type uint16;
+              units "Gbps";
+              description
+                "Optical Tributary Signal (OTSi) rate in Gbps";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  grouping provisioned-port-grp {
+    container provisioned-port-grp {
+      list port-bandwidth-sharing {
+        key "port-sharing-id";
+        leaf port-sharing-id {
+          type uint16;
+        }
+        leaf provisioned-port-config {
+          type uint16;
+          default "1";
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports" {
+    description
+      "augment for port capability";
+    uses port-capability-grp;
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device" {
+    description
+      "augment for port group restriction";
+    uses port-group-restriction-grp;
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device" {
+    description
+      "augment for provisioned port group";
+    uses provisioned-port-grp;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-ppp-interfaces@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-ppp-interfaces@2020-05-29.yang
new file mode 100644 (file)
index 0000000..b786cd0
--- /dev/null
@@ -0,0 +1,119 @@
+module org-openroadm-ppp-interfaces {
+  namespace "http://org/openroadm/ppp-interfaces";
+  prefix org-openroadm-ppp-interfaces;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-interfaces {
+    prefix openROADM-if;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility ppp link interfaces.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reprpppce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote prpppcts derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0";
+  }
+
+  grouping ppp-interfaces {
+    container ppp {
+      description
+        "PPP attributes. LCP attributes and 16 bit FCS default as per RFC 1662 and RFC 1570";
+      leaf magicNumber {
+        type boolean;
+        default "false";
+        description
+          "Boolean to indicate if magicNumber negotiation to remote is supported or not";
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
+    when "org-openroadm-device:type = 'openROADM-if:ppp'";
+    uses ppp-interfaces;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-prot-otn-linear-aps@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-prot-otn-linear-aps@2020-05-29.yang
new file mode 100644 (file)
index 0000000..e6dcd2d
--- /dev/null
@@ -0,0 +1,377 @@
+module org-openroadm-prot-otn-linear-aps {
+  namespace "http://org/openroadm/prot/otn-linear-aps";
+  prefix org-openroadm-prot-otn-linear-aps;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for device facility OTN linear APS protection groups.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+
+  identity odu-one-plus-one {
+    base org-openroadm-common-types:otn-protection-type;
+    description
+      "ODU Linear Protection 1+1 permanent bridge";
+  }
+
+  grouping odu-sncp-protection-grps {
+    list odu-sncp-pg {
+      key "name";
+      leaf name {
+        type string;
+        description
+          "The odu-sncp-protection-group name";
+      }
+      leaf level {
+        type enumeration {
+          enum line {
+            value 1;
+          }
+          enum path {
+            value 2;
+          }
+        }
+        mandatory true;
+        description
+          "Designates protection group as Line or Path";
+      }
+      leaf prot-type {
+        type identityref {
+          base org-openroadm-common-types:otn-protection-type;
+        }
+        default "odu-one-plus-one";
+        description
+          "The type of the protection group.";
+      }
+      leaf switching-direction {
+        type enumeration {
+          enum unidirectional-switching {
+            value 1;
+          }
+          enum bidirectional-switching {
+            value 2;
+          }
+        }
+        default "unidirectional-switching";
+        description
+          "Bidirectional refers to APS signaling enabled (G.873.1 Table 7-1 Table 8-1).";
+      }
+      leaf revertive {
+        type boolean;
+        default "false";
+        description
+          "Sets reversion behavior.";
+      }
+      leaf mode {
+        type enumeration {
+          enum SNC/Ne {
+            value 1;
+            description
+              "applicable to line or path switching";
+          }
+          enum SNC/Ns {
+            value 2;
+            description
+              "applicable to line or path switching";
+          }
+          enum SNC/S {
+            value 3;
+            description
+              "applicable to line or path switching";
+          }
+          enum SNC/I {
+            value 4;
+            description
+              "applicable to line switching only";
+          }
+          enum CL-SNCG/I {
+            value 5;
+            description
+              "applicable to line switching only";
+          }
+        }
+        mandatory true;
+        description
+          "Sets the protection mode";
+      }
+      leaf protection-trigger-level {
+        type enumeration {
+          enum OTUk/ODUkA-SSF-SSD {
+            value 1;
+            description
+              "applicable to SNC/I";
+          }
+          enum ODUkP/ODUjA-SSF-SSD {
+            value 2;
+            description
+              "applicable to CL-SNCG/I";
+          }
+          enum ODUP-SSF-SSD {
+            value 3;
+            description
+              "applicable to SNC/Ne";
+          }
+          enum ODUT1 {
+            value 4;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+          enum ODUT2 {
+            value 5;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+          enum ODUT3 {
+            value 6;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+          enum ODUT4 {
+            value 7;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+          enum ODUT5 {
+            value 8;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+          enum ODUT6 {
+            value 9;
+            description
+              "applicable to SNC/Ns or SNC/S";
+          }
+        }
+        description
+          "Indicates switch trigger.";
+      }
+      leaf wait-to-restore {
+        when "../revertive = 'true'";
+        type uint8 {
+          range "1..12";
+        }
+        units "minutes";
+        default "5";
+        description
+          "Wait to restore time in minutes";
+      }
+      container holdoff-timer {
+        leaf holdoff {
+          type uint8 {
+            range "0 | 20 | 100";
+          }
+          units "milliseconds";
+          default "0";
+          description
+            "switch hold-off time in milliseconds";
+        }
+        leaf holdoff-multiplier {
+          when '../holdoff= 100';
+          type uint8 {
+            range "1 .. 100";
+          }
+          default "1";
+          description
+            "switch holdoff time multiplier x100 milliseconds";
+        }
+      }
+      leaf working-if {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+        }
+        mandatory true;
+        description
+          "Designated work interface";
+      }
+      leaf-list pg-interfaces {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+        }
+        min-elements 1;
+        description
+          "List of interfaces in the PG";
+      }
+      leaf active-if {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+        }
+        config false;
+        description
+          "Active interface in the PG";
+      }
+    }
+  }
+
+  rpc odu-sncp-protection-switch {
+    description
+      "ODU SNCP Protection Switch RPC with synchronous implementation";
+    input {
+      leaf protection-group {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protection-grps/org-openroadm-prot-otn-linear-aps:odu-sncp-pg/org-openroadm-prot-otn-linear-aps:name";
+        }
+        mandatory true;
+        description
+          "Target protection group";
+      }
+      leaf pg-interface {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+        }
+        mandatory true;
+        description
+          "Target protection group interface";
+      }
+      leaf switch-command {
+        type enumeration {
+          enum Lock-Out-Protect {
+            value 1;
+          }
+          enum Force-Switch {
+            value 2;
+          }
+          enum Manual-Switch {
+            value 3;
+          }
+          enum Release {
+            value 4;
+          }
+        }
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification odu-sncp-pg-switch-event {
+    leaf switch-status {
+      type enumeration {
+        enum switched-to-protect {
+          value 1;
+        }
+        enum switched-back-to-working {
+          value 2;
+        }
+      }
+      description
+        "Completed protection switch";
+    }
+    leaf odu-sncp-pg-name {
+      type string;
+      description
+        "The odu-sncp-protection-group name";
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protection-grps" {
+    uses odu-sncp-protection-grps;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-routing@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-routing@2020-05-29.yang
new file mode 100644 (file)
index 0000000..ab1d930
--- /dev/null
@@ -0,0 +1,563 @@
+module org-openroadm-routing {
+  namespace "http://org/openroadm/routing";
+  prefix org-openroadm-routing;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines Yang model for routing.
+
+     This model reuses data items defined in the IETF YANG model for
+     interfaces described by RFC 8022.
+
+     Some attributes which are not required in Open ROADM MSA are removed.
+     Yang file included are changed to fit into Open ROADM MSA yang structure.
+
+     IETF code is subject to the following copyright and license:
+     Copyright (c) IETF Trust and the persons identified as authors of
+     the code.
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, is permitted pursuant to, and subject to the license
+     terms contained in, the Simplified BSD License set forth in
+     Section 4.c of the IETF Trust's Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2015-05-25 {
+    description
+      "Initial revision.";
+    reference
+      "RFC XXXX: A YANG Data Model for Routing Management";
+  }
+
+  feature multiple-ribs {
+    description
+      "This feature indicates that the server supports user-defined
+       RIBs.
+
+       Servers that do not advertise this feature SHOULD provide
+       exactly one system-controlled RIB per routing-instance and
+       supported address family and make them also the default RIBs.
+       These RIBs then appear as entries of the list
+       /routing-state/routing-instance/ribs/rib.";
+  }
+
+  feature router-id {
+    description
+      "This feature indicates that the server supports configuration
+       of an explicit 32-bit router ID that is used by some routing
+       protocols.
+
+       Servers that do not advertise this feature set a router ID
+       algorithmically, usually to one of configured IPv4 addresses.
+       However, this algorithm is implementation-specific.";
+  }
+
+  identity address-family {
+    description
+      "Base identity from which identities describing address
+       families are derived.";
+  }
+
+  identity ipv4 {
+    base address-family;
+    description
+      "This identity represents IPv4 address family.";
+  }
+
+  identity ipv6 {
+    base address-family;
+    description
+      "This identity represents IPv6 address family.";
+  }
+
+  identity routing-instance {
+    description
+      "Base identity from which identities describing routing
+       instance types are derived.";
+  }
+
+  identity default-routing-instance {
+    base routing-instance;
+    description
+      "This identity represents either a default routing instance, or
+       the only routing instance on systems that do not support
+       multiple instances.";
+  }
+
+  identity vrf-routing-instance {
+    base routing-instance;
+    description
+      "This identity represents a VRF routing instance. The type is
+       distinct from the default-routing-instance. There may be
+       multiple vrf-routing-interfaces.";
+  }
+
+  identity routing-protocol {
+    description
+      "Base identity from which routing protocol identities are
+       derived.";
+  }
+
+  identity direct {
+    base routing-protocol;
+    description
+      "Routing pseudo-protocol that provides routes to directly
+       connected networks.";
+  }
+
+  identity static {
+    base routing-protocol;
+    description
+      "Static routing pseudo-protocol.";
+  }
+
+  typedef routing-instance-ref {
+    type leafref {
+      path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:name";
+    }
+    description
+      "This type is used for leafs that reference a routing instance
+       configuration.";
+  }
+
+  typedef routing-instance-state-ref {
+    type leafref {
+      path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing-state/org-openroadm-routing:routing-instance/org-openroadm-routing:name";
+    }
+    description
+      "This type is used for leafs that reference state data of a
+       routing instance.";
+  }
+
+  typedef route-preference {
+    type uint32;
+    description
+      "This type is used for route preferences.";
+  }
+
+  grouping address-family-group {
+    description
+      "This grouping provides a leaf identifying an address
+       family.";
+    leaf address-family {
+      type identityref {
+        base address-family;
+      }
+      mandatory true;
+      description
+        "Address family.";
+    }
+  }
+
+  grouping router-id {
+    description
+      "This grouping provides router ID.";
+    leaf router-id {
+      type yang:dotted-quad;
+      description
+        "A 32-bit number in the form of a dotted quad that is used by
+         some routing protocols identifying a router.";
+      reference
+        "RFC 2328: OSPF Version 2.";
+    }
+  }
+
+  grouping special-next-hop-group {
+    description
+      "This grouping provides a leaf with an enumeration of special
+       next-hops.";
+    leaf special-next-hop {
+      type enumeration {
+        enum blackhole {
+          description
+            "Silently discard the packet.";
+        }
+        enum unreachable {
+          description
+            "Discard the packet and notify the sender with an error
+             message indicating that the destination host is
+             unreachable.";
+        }
+        enum prohibit {
+          description
+            "Discard the packet and notify the sender with an error
+             message indicating that the communication is
+             administratively prohibited.";
+        }
+        enum receive {
+          description
+            "The packet will be received by the local system.";
+        }
+      }
+      description
+        "Special next-hop options.";
+    }
+  }
+
+  grouping next-hop-content {
+    description
+      "Generic parameters of next-hops in static routes.";
+    choice next-hop-options {
+      mandatory true;
+      description
+        "Options for next-hops in static routes.
+
+         It is expected that other cases will be added through
+         augments from other modules, e.g., for Equal-Cost Multipath
+         routing (ECMP).";
+      case simple-next-hop {
+        description
+          "Simple next-hop is specified as an outgoing interface,
+           next-hop address or both.
+
+           Address-family-specific modules are expected to provide
+           'next-hop-address' leaf via augmentation.";
+        leaf outgoing-interface {
+          type leafref {
+            path "/org-openroadm-device:org-openroadm-device/org-openroadm-routing:routing/org-openroadm-routing:routing-instance/org-openroadm-routing:interfaces/org-openroadm-routing:interface";
+          }
+          description
+            "Name of the outgoing interface.";
+        }
+      }
+      case special-next-hop {
+        uses special-next-hop-group;
+      }
+    }
+  }
+
+  grouping route-metadata {
+    description
+      "Common route metadata.";
+    leaf source-protocol {
+      type identityref {
+        base routing-protocol;
+      }
+      mandatory true;
+      description
+        "Type of the routing protocol from which the route
+         originated.";
+    }
+    leaf active {
+      type empty;
+      description
+        "Presence of this leaf indicates that the route is preferred
+         among all routes in the same RIB that have the same
+         destination prefix.";
+    }
+    leaf last-updated {
+      type yang:date-and-time;
+      description
+        "Time stamp of the last modification of the route. If the
+         route was never modified, it is the time when the route was
+         inserted into the RIB.";
+    }
+  }
+
+  grouping routing-grp {
+    container routing {
+      description
+        "Configuration parameters for the routing subsystem.";
+      list routing-instance {
+        key "name";
+        description
+          "Configuration of a routing instance.";
+        leaf name {
+          type string;
+          description
+            "The name of the routing instance.
+
+             For system-controlled entries, the value of this leaf must
+             be the same as the name of the corresponding entry in
+             state data.
+
+             For user-controlled entries, an arbitrary name can be
+             used.";
+        }
+        leaf type {
+          type identityref {
+            base routing-instance;
+          }
+          default "org-openroadm-routing:default-routing-instance";
+          description
+            "The type of the routing instance.";
+        }
+        leaf enabled {
+          type boolean;
+          default "true";
+          description
+            "Enable/disable the routing instance.
+
+             If this parameter is false, the parent routing instance is
+             disabled and does not appear in state data, despite any
+             other configuration that might be present.";
+        }
+        uses router-id {
+          if-feature "router-id";
+          description
+            "Configuration of the global router ID. Routing protocols
+             that use router ID can use this parameter or override it
+             with another value.";
+        }
+        leaf description {
+          type string;
+          description
+            "Textual description of the routing instance.";
+        }
+        container interfaces {
+          description
+            "Assignment of the routing instance's interfaces.";
+          leaf-list interface {
+            type org-openroadm-device:interface-ref;
+            description
+              "The name of a configured network layer interface to be
+               assigned to the routing-instance.";
+          }
+        }
+        container routing-protocols {
+          description
+            "Configuration of routing protocol instances.";
+          list routing-protocol {
+            key "type name";
+            description
+              "Each entry contains configuration of a routing protocol
+               instance.";
+            leaf type {
+              type identityref {
+                base routing-protocol;
+              }
+              description
+                "Type of the routing protocol - an identity derived
+                 from the 'routing-protocol' base identity.";
+            }
+            leaf name {
+              type string;
+              description
+                "An arbitrary name of the routing protocol instance.";
+            }
+            leaf description {
+              type string;
+              description
+                "Textual description of the routing protocol
+                 instance.";
+            }
+            container static-routes {
+              when "../type='org-openroadm-routing:static'" {
+                description
+                  "This container is only valid for the 'static'
+                   routing protocol.";
+              }
+              description
+                "Configuration of the 'static' pseudo-protocol.
+
+                 Address-family-specific modules augment this node with
+                 their lists of routes.";
+            }
+          }
+        }
+        container ribs {
+          description
+            "Configuration of RIBs.";
+          list rib {
+            key "name";
+            description
+              "Each entry contains configuration for a RIB identified
+               by the 'name' key.
+
+               Entries having the same key as a system-controlled entry
+               of the list /routing-state/routing-instance/ribs/rib are
+               used for configuring parameters of that entry. Other
+               entries define additional user-controlled RIBs.";
+            leaf name {
+              type string;
+              description
+                "The name of the RIB.
+
+                 For system-controlled entries, the value of this leaf
+                 must be the same as the name of the corresponding
+                 entry in state data.
+
+                 For user-controlled entries, an arbitrary name can be
+                 used.";
+            }
+            uses address-family-group {
+              description
+                "Address family of the RIB.
+
+                 It is mandatory for user-controlled RIBs. For
+                 system-controlled RIBs it can be omitted, otherwise it
+                 must match the address family of the corresponding
+                 state entry.";
+              refine "address-family" {
+                mandatory false;
+              }
+            }
+            leaf description {
+              type string;
+              description
+                "Textual description of the RIB.";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device" {
+    uses routing-grp;
+  }
+
+  grouping routing-state-grp {
+    container routing-state {
+      config false;
+      description
+        "State data of the routing subsystem.";
+      list routing-instance {
+        key "name";
+        description
+          "Each list entry is a container for state data of a routing
+           instance.
+
+           An implementation MUST support routing instance(s) of the
+           type 'rt:default-routing-instance', and MAY support other
+           types. An implementation MAY restrict the number of routing
+           instances of each supported type.
+
+           An implementation SHOULD create at least one
+           system-controlled instance, and MAY allow the clients to
+           create user-controlled routing instances in
+           configuration.";
+        leaf name {
+          type string;
+          description
+            "The name of the routing instance.
+
+             For system-controlled instances the name is persistent,
+             i.e., it SHOULD NOT change across reboots.";
+        }
+        leaf type {
+          type identityref {
+            base routing-instance;
+          }
+          description
+            "The routing instance type.";
+        }
+        uses router-id {
+          description
+            "Global router ID.
+
+             It may be either configured or assigned algorithmically by
+             the implementation.";
+        }
+        container routing-protocols {
+          description
+            "Container for the list of routing protocol instances.";
+          list routing-protocol {
+            key "type name";
+            description
+              "State data of a routing protocol instance.
+
+               An implementation MUST provide exactly one
+               system-controlled instance of the type 'direct'. Other
+               instances MAY be created by configuration.";
+            leaf type {
+              type identityref {
+                base routing-protocol;
+              }
+              description
+                "Type of the routing protocol.";
+            }
+            leaf name {
+              type string;
+              description
+                "The name of the routing protocol instance.
+
+                 For system-controlled instances this name is
+                 persistent, i.e., it SHOULD NOT change across
+                 reboots.";
+            }
+          }
+        }
+        container ribs {
+          description
+            "Container for RIBs.";
+          list rib {
+            key "name";
+            min-elements 1;
+            description
+              "Each entry represents a RIB identified by the 'name'
+               key. All routes in a RIB MUST belong to the same address
+               family.
+
+               For each routing instance, an implementation SHOULD
+               provide one system-controlled default RIB for each
+               supported address family.";
+            leaf name {
+              type string;
+              description
+                "The name of the RIB.";
+            }
+            uses address-family-group;
+            leaf default-rib {
+              if-feature "multiple-ribs";
+              type boolean;
+              default "true";
+              description
+                "This flag has the value of 'true' if and only if the
+                 RIB is the default RIB for the given address family.
+
+                 A default RIB always receives direct routes. By
+                 default it also receives routes from all routing
+                 protocols.";
+            }
+            container routes {
+              description
+                "Current content of the RIB.";
+            }
+          }
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device" {
+    uses routing-state-grp;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-rstp@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-rstp@2020-05-29.yang
new file mode 100644 (file)
index 0000000..aa7a2e6
--- /dev/null
@@ -0,0 +1,394 @@
+module org-openroadm-rstp {
+  namespace "http://org/openroadm/rstp";
+  prefix org-openroadm-rstp;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-resource-types {
+    prefix org-openroadm-resource-types;
+    revision-date 2019-11-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for rstp protocol.
+
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-05-30 {
+    description
+      "Version 3.1.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  typedef bridge-id-type {
+    type string;
+    description
+      "Unique Bridge Identifier";
+  }
+
+  grouping rstp-common-bridge-config {
+    leaf bridge-priority {
+      type uint32 {
+        range "0..61440";
+      }
+      default "32768";
+      description
+        "Bridge Priority Value";
+    }
+    leaf shutdown {
+      type empty;
+      description
+        "Bridge admin state";
+    }
+    leaf hold-time {
+      type uint32 {
+        range "1..10";
+      }
+      default "2";
+      description
+        "The time interval during which no more than two
+            BPDUs transmitted by this node in seconds - not used in rstp mode (in seconds)";
+    }
+    leaf hello-time {
+      type uint32 {
+        range "1..2";
+      }
+      default "2";
+      description
+        "The time between the transmission of BPDU's by this node on any
+            port, when role is root (in seconds)";
+    }
+    leaf max-age {
+      type uint32 {
+        range "6..40";
+      }
+      default "20";
+      description
+        "The value that all bridges use for MaxAge when this bridge
+            is acting as the root";
+    }
+    leaf forward-delay {
+      type uint32 {
+        range "4..30";
+      }
+      default "15";
+      description
+        "The port on the Switch spends this time in the listening
+            state while moving from the blocking state to the forwarding state (in seconds)";
+    }
+    leaf transmit-hold-count {
+      type uint32 {
+        range "1..10";
+      }
+      default "2";
+      description
+        "Maximum BPDU transmission rate";
+    }
+  }
+
+  grouping rstp-root-bridge-attr {
+    leaf root-bridge-port {
+      type uint32;
+      description
+        "Port id of the root port";
+    }
+    leaf root-path-cost {
+      type uint32;
+      description
+        "The cost of the path to the root as
+               seen from this bridge";
+    }
+    leaf root-bridge-priority {
+      type uint32;
+      description
+        "Root Bridge Priority Value";
+    }
+    leaf root-bridge-id {
+      type bridge-id-type;
+      description
+        "Root Bridge identifier";
+    }
+    leaf root-hold-time {
+      type uint32;
+      description
+        "The time interval during which no more than two
+               BPDUs transmitted by this node in seconds at root node (in seconds)";
+    }
+    leaf root-hello-time {
+      type uint32;
+      description
+        "The time between the transmission of BPDU's used at root node (in seconds)";
+    }
+    leaf root-max-age {
+      type uint32;
+      description
+        "The value that all bridges use for MaxAge used at root node";
+    }
+    leaf root-forward-delay {
+      type uint32;
+      description
+        "The time in seconds spent on the listening state used at root node (in seconds)";
+    }
+  }
+
+  grouping rstp-bridge-port-state-attr {
+    list rstp-bridge-port-table {
+      key "ifname";
+      max-elements 15;
+      description
+        "This table contains port-specific information for rstp state attributes";
+      leaf ifname {
+        type string {
+          length "1..255";
+        }
+        description
+          "Interface name of the port";
+      }
+      leaf bridge-port-state {
+        type enumeration {
+          enum discarding;
+          enum blocked;
+          enum learning;
+          enum forwarding;
+          enum unknown;
+        }
+        description
+          "The port's current state";
+      }
+      leaf bridge-port-role {
+        type enumeration {
+          enum designated;
+          enum root;
+          enum alternate;
+          enum disabled;
+          enum backup;
+          enum unknown;
+        }
+        description
+          "The role payed by this port in the bridge";
+      }
+      leaf bridge-port-id {
+        type uint32;
+        description
+          "Unique port id of this port";
+      }
+      leaf oper-edge-bridge-port {
+        type empty;
+        description
+          "The operational value of the Edge Port parameter";
+      }
+      leaf designated-bridge-port {
+        type uint32;
+        description
+          "Port id of the designated port";
+      }
+      leaf designated-bridgeid {
+        type bridge-id-type;
+        description
+          "The Bridge Identifier of the bridge that this port considers
+           to be the Designated Bridge for this port's segment";
+      }
+    }
+  }
+
+  grouping rstp-bridge-port-attr {
+    list rstp-bridge-port-table {
+      key "ifname";
+      max-elements 15;
+      description
+        "Table contains port-specific information for rstp config";
+      leaf ifname {
+        type leafref {
+          path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
+        }
+        description
+          "Interface name of the port";
+      }
+      leaf cost {
+        type uint32 {
+          range "2000..200000";
+        }
+        default "20000";
+        description
+          "The contribution of this port to the path cost of
+                 paths towards the spanning tree root which include this port also";
+      }
+      leaf priority {
+        type uint32 {
+          range "0..240";
+        }
+        description
+          "The value of the priority field";
+      }
+    }
+  }
+
+  grouping rstp-container {
+    container rstp {
+      description
+        "Open ROADM RSTP top level";
+      leaf max-bridge-instances {
+        type uint32;
+        config false;
+        description
+          "Number of bridge instances supported";
+      }
+      list rstp-bridge-instance {
+        key "bridge-name";
+        description
+          "rstp bridge instance";
+        leaf bridge-name {
+          type string {
+            length "1..255";
+          }
+          description
+            "unique name of the bridge";
+        }
+        container rstp-config {
+          description
+            "Collection of rstp configuration attributes";
+          uses rstp-common-bridge-config;
+          uses rstp-bridge-port-attr;
+        }
+        container rstp-state {
+          config false;
+          description
+            "Collection of rstp operational attributes";
+          container rstp-bridge-attr {
+            description
+              "Collection of operational rstp bridge attributes";
+            uses rstp-root-bridge-attr;
+            leaf bridge-id {
+              type bridge-id-type;
+              description
+                "Bridge identifier of the bridge";
+            }
+            leaf topo-change-count {
+              type uint32;
+              description
+                "The total number of topology changes";
+            }
+            leaf time-since-topo-change {
+              type uint32;
+              description
+                "Time since last topology changes occurred (in seconds)";
+            }
+          }
+          container rstp-bridge-port-attr {
+            description
+              "Collection of operational rstp port related attributes";
+            uses rstp-bridge-port-state-attr;
+          }
+        }
+      }
+    }
+  }
+
+  notification rstp-topology-change {
+    description
+      "RSTP: A topologyChange event is sent by a bridge when any of
+       its configured ports transitions from the Learning state
+       to the Forwarding state, or from the Forwarding state to
+       the Blocking state. The event is not sent if a rstp-new-root
+       event is sent for the same transition";
+    uses org-openroadm-resource-types:device-id;
+  }
+
+  notification rstp-new-root {
+    description
+      "RSTP:The rstp-new-root event indicates that the sending agent has
+       become the new root of the Spanning Tree ";
+    uses org-openroadm-resource-types:device-id;
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
+    when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm' or /org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='ila'";
+    uses rstp-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-security@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-security@2020-05-29.yang
new file mode 100644 (file)
index 0000000..53bfec1
--- /dev/null
@@ -0,0 +1,167 @@
+module org-openroadm-security {
+  yang-version 1.1;
+  namespace "http://org/openroadm/security";
+  prefix org-openroadm-security;
+
+  import org-openroadm-device {
+    prefix org-openroadm-device;
+    revision-date 2020-05-29;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model defines the Yang model for openroadm security.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Initial revision.";
+  }
+
+  typedef certificate-id-type {
+    type string {
+      length "3..250";
+      pattern '(([a-zA-Z]([a-zA-Z0-9_.-]*)([a-zA-Z0-9])))' {
+        error-message
+          "The certificate id must start with a letter and
+           end with a letter or digit. Interior characters are only
+           alphabets, digits, minus, underscore and dot.";
+      }
+    }
+    description
+      "The certificate id must starts with a letter and
+       end with a letter or digit. Interior characters are only
+       alphabets, digits, minus, underscore and dot.";
+  }
+
+  grouping security-container {
+    description
+      "Grouping for standalone security certificates";
+    container security {
+      description
+        "Security related Configurations";
+      list certificate {
+        key "certificate-id";
+        max-elements 10;
+        description
+          "A list of certificates for this system";
+        action install {
+          description
+            "Install certificate.";
+          input {
+            leaf filename {
+              type string;
+              description
+                "Name of the certificate file to be installed.";
+            }
+          }
+          output {
+            uses org-openroadm-common-types:rpc-response-status;
+          }
+        }
+        leaf certificate-id {
+          type certificate-id-type;
+          description
+            "Certificate identifier";
+        }
+        leaf information {
+          type string;
+          config false;
+          description
+            "Information about the certificate
+             (subject line in the certificate).";
+        }
+      }
+      list ca-certificate {
+        key "ca-certificate-id";
+        max-elements 10;
+        description
+          "A list of CA certificates for this system";
+        action install {
+          description
+            "Install certificate.";
+          input {
+            leaf filename {
+              type string;
+              description
+                "Name of the CA certificate file to be installed.";
+            }
+          }
+          output {
+            uses org-openroadm-common-types:rpc-response-status;
+          }
+        }
+        leaf ca-certificate-id {
+          type certificate-id-type;
+          description
+            "CA certificate identifier";
+        }
+        leaf information {
+          type string;
+          config false;
+          description
+            "Information about the CA certificate
+             (subject line in the certificate).";
+        }
+      }
+    }
+  }
+
+  augment "/org-openroadm-device:org-openroadm-device" {
+    description
+      "Augment for security container under device";
+    uses security-container;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-swdl@2020-05-29.yang b/ordmodels/device/src/main/yang/org-openroadm-swdl@2020-05-29.yang
new file mode 100644 (file)
index 0000000..dfdc8b3
--- /dev/null
@@ -0,0 +1,215 @@
+module org-openroadm-swdl {
+  namespace "http://org/openroadm/de/swdl";
+  prefix org-openroadm-swdl;
+
+  import ietf-yang-types {
+    prefix yang;
+    revision-date 2013-07-15;
+  }
+  import org-openroadm-common-types {
+    prefix org-openroadm-common-types;
+    revision-date 2020-05-29;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "Yang definitions for System Management.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2020-05-29 {
+    description
+      "Version 7.1.0";
+  }
+  revision 2020-03-27 {
+    description
+      "Version 7.0.0";
+  }
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-09-27 {
+    description
+      "Version 6.0.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Version 5.1.0";
+  }
+  revision 2019-03-29 {
+    description
+      "Version 5.0.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2018-09-28 {
+    description
+      "Version 4.0.0";
+  }
+  revision 2018-03-30 {
+    description
+      "Version 3.0.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2017-06-26 {
+    description
+      "Version 2.0";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping sw-bank {
+    description
+      "software bank group";
+    leaf sw-version {
+      type string;
+      description
+        "Gissue of the SW in this bank";
+    }
+    leaf sw-validation-timer {
+      type string {
+        pattern '(([0-1][0-9]|2[0-3])-([0-5][0-9])-([0-5][0-9]))';
+      }
+      description
+        "value of validation timer in hh-mm-ss";
+    }
+    leaf activation-date-time {
+      type yang:date-and-time;
+      description
+        "activation date and time: The date load was activated";
+    }
+  }
+
+  grouping database-info-group {
+    description
+      "database info group";
+    leaf last-restored-time {
+      type yang:date-and-time;
+      description
+        "last restored time for the database, or the time that the database was created, whichever is later";
+    }
+    leaf rollback-timer {
+      type string {
+        pattern '(([0-1][0-9]|2[0-3])-([0-5][0-9])-([0-5][0-9]))';
+      }
+      description
+        "value of rollback timer in hh-mm-ss";
+    }
+    leaf activation-date-time {
+      type yang:date-and-time;
+      description
+        "activation date and time: The date load was activated";
+    }
+  }
+
+  rpc sw-stage {
+    description
+      "SW stage - copies the SW from repo to staging bank";
+    input {
+      leaf filename {
+        type string {
+          length "10..255";
+        }
+        description
+          "file name which has the load";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc sw-activate {
+    description
+      "Activate new load";
+    input {
+      leaf version {
+        type string;
+        description
+          " software version of the new load which is being activated";
+      }
+      leaf validationTimer {
+        type string;
+        description
+          "validation timer hh-mm-ss";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  rpc cancel-validation-timer {
+    description
+      "Cancel validation timer which user provisioned as part of activate command";
+    input {
+      leaf accept {
+        type boolean;
+        default "true";
+        description
+          " TRUE means  validation timer is cancelled and new load is accepted";
+      }
+    }
+    output {
+      uses org-openroadm-common-types:rpc-response-status;
+    }
+  }
+
+  notification sw-stage-notification {
+    description
+      "notification for sw-stage.";
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+
+  notification sw-activate-notification {
+    description
+      "notification for sw-activate events.";
+    leaf sw-active-notification-type {
+      type org-openroadm-common-types:activate-notification-type;
+    }
+    uses org-openroadm-common-types:rpc-response-status;
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-syslog@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-syslog@2019-11-29.yang
new file mode 100644 (file)
index 0000000..10e4308
--- /dev/null
@@ -0,0 +1,363 @@
+module org-openroadm-syslog {
+  namespace "http://org/openroadm/syslog";
+  prefix org-openroadm-syslog;
+
+  import ietf-inet-types {
+    prefix inet;
+    revision-date 2013-07-15;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This module contains a collection of YANG definitions
+     for Syslog configuration.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.
+
+     Also contains code components extracted from IETF Interfaces.  These code components
+     are copyrighted and licensed as follows:
+
+     Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
+     All rights reserved.
+
+     This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
+     to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
+     publication of this document. Please review these documents carefully, as they
+     describe your rights and restrictions with respect to this document. Code Components
+     extracted from this document must include Simplified BSD License text as described in
+     Section 4.e of the Trust Legal Provisions and are provided without warranty as
+     described in the Simplified BSD License.";
+  reference
+    "RFC 5424: The Syslog Protocol";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2017-09-29 {
+    description
+      "Version 2.1";
+  }
+  revision 2017-07-28 {
+    description
+      "Version 2.0.1 - added revision-date to imports";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  feature selector-sevop-config {
+    description
+      "This feature represents the ability to select messages
+       using the additional operators equal to, or not equal to
+       when comparing the Syslog message severity.";
+  }
+
+  feature selector-match-config {
+    description
+      "This feature represents the ability to select messages based
+       on a Posix 1003.2 regular expression pattern match.";
+  }
+
+  identity syslog-facility {
+    description
+      "The base identity to represent syslog facilities";
+  }
+
+  typedef severity {
+    type enumeration {
+      enum emergency {
+        value 0;
+        description
+          "Emergency Level Msg";
+      }
+      enum alert {
+        value 1;
+        description
+          "Alert Level Msg";
+      }
+      enum critical {
+        value 2;
+        description
+          "Critical Level Msg";
+      }
+      enum error {
+        value 3;
+        description
+          "Error Level Msg";
+      }
+      enum warning {
+        value 4;
+        description
+          "Warning Level Msg";
+      }
+      enum notice {
+        value 5;
+        description
+          "Notification Level Msg";
+      }
+      enum info {
+        value 6;
+        description
+          "Informational Level Msg";
+      }
+      enum debug {
+        value 7;
+        description
+          "Debugging Level Msg";
+      }
+      enum all {
+        value 8;
+        description
+          "This enum describes the case where all severities
+           are selected.";
+      }
+      enum none {
+        value 9;
+        description
+          "This enum describes the case where no severities
+           are selected.";
+      }
+    }
+    description
+      "The definitions for Syslog message severity as per RFC 5424.
+       Extended the RFC definition with enums for all and none";
+  }
+
+  grouping syslog-severity {
+    description
+      "This grouping defines the Syslog severity which is used to
+       select log messages.";
+    leaf severity {
+      type severity;
+      mandatory true;
+      description
+        "This leaf specifies the Syslog message severity. When
+         severity is specified, the default severity comparison
+         is all messages of the specified severity and greater are
+         selected. 'all' is a special case which means all severities
+         are selected. 'none' is a special case which means that
+         no selection should occur or disable this filter.";
+    }
+    leaf severity-operator {
+      when "../severity != 'all' and
+                       ../severity != 'none'" {
+          description
+            "The severity-operator is not applicable for severity 'all' or
+             severity 'none'";
+      }
+      if-feature "selector-sevop-config";
+      type enumeration {
+        enum equals-or-higher {
+          description
+            "This enum specifies all messages of the specified
+             severity and higher are logged according to the
+             given log-action";
+        }
+        enum equals {
+          description
+            "This enum specifies all messages that are for
+             the specified severity are logged according to the
+             given log-action";
+        }
+        enum not-equals {
+          description
+            "This enum specifies all messages that are not for
+             the specified severity are logged according to the
+             given log-action";
+        }
+      }
+      default "equals-or-higher";
+      description
+        "This leaf describes the option to specify how the
+         severity comparison is performed.";
+    }
+  }
+
+  grouping syslog-selector {
+    description
+      "This grouping defines a Syslog selector which is used to
+       select log messages for the log-action (buffer, file,
+       etc). Choose one of the following:
+         no-log-facility
+         log-facility [<facility> <severity>...]";
+    container log-selector {
+      description
+        "This container describes the log selector parameters
+         for Syslog.";
+      choice selector-facility {
+        mandatory true;
+        description
+          "This choice describes the option to specify no
+           facilities, or a specific facility which can be
+           all for all facilities.";
+        case no-log-facility {
+          description
+            "This case specifies no facilities will match when
+             comparing the Syslog message facility. This is a
+             method that can be used to effectively disable a
+             particular log-action (buffer, file, etc).";
+          leaf no-facilities {
+            type empty;
+            description
+              "This leaf specifies that no facilities are selected
+               for this log-action.";
+          }
+        }
+        case log-facility {
+          description
+            "This case specifies one or more specified facilities
+             will match when comparing the Syslog message facility.";
+          list log-facility {
+            key "facility";
+            description
+              "This list describes a collection of Syslog
+               facilities and severities.";
+            leaf facility {
+              type union {
+                type identityref {
+                  base syslog-facility;
+                }
+                type enumeration {
+                  enum all {
+                    description
+                      "This enum describes the case where all
+                       facilities are requested.";
+                  }
+                }
+              }
+              description
+                "The leaf uniquely identifies a Syslog facility.";
+            }
+            uses syslog-severity;
+          }
+        }
+      }
+    }
+  }
+
+  container syslog {
+    description
+      "This container describes the configuration parameters for
+       Syslog.";
+    leaf local-syslog-filename {
+      type string;
+      config false;
+      mandatory true;
+      description
+        "The syslog file name. It should be a fully qualified name
+         so that the user can get the file using transfer RPC.";
+    }
+    container log-actions {
+      description
+        "This container describes the log-action parameters
+         for Syslog.";
+      container remote {
+        description
+          "This container describes the configuration parameters for
+           remote logging.";
+        list destination {
+          key "name";
+          description
+            "This list describes a collection of remote logging
+             destinations.";
+          leaf name {
+            type string;
+            description
+              "An arbitrary name for the endpoint to connect to.";
+          }
+          choice transport {
+            mandatory true;
+            description
+              "This choice describes the transport option.";
+            case tcp {
+              container tcp {
+                description
+                  "This container describes the TCP transport
+                   options.";
+                reference
+                  "RFC 6587: Transmission of Syslog Messages over TCP";
+                leaf address {
+                  type inet:host;
+                  description
+                    "The leaf uniquely specifies the address of
+                     the remote host. One of the following must
+                     be specified: an ipv4 address, an ipv6
+                     address, or a host name.";
+                }
+                leaf port {
+                  type inet:port-number;
+                  default "514";
+                  description
+                    "This leaf specifies the port number used to
+                     deliver messages to the remote server.";
+                }
+              }
+            }
+            case udp {
+              container udp {
+                description
+                  "This container describes the UDP transport
+                   options.";
+                reference
+                  "RFC 5426: Transmission of Syslog Messages over UDP";
+                leaf address {
+                  type inet:host;
+                  description
+                    "The leaf uniquely specifies the address of
+                     the remote host. One of the following must be
+                     specified: an ipv4 address, an ipv6 address,
+                     or a host name.";
+                }
+                leaf port {
+                  type inet:port-number;
+                  default "514";
+                  description
+                    "This leaf specifies the port number used to
+                     deliver messages to the remote server.";
+                }
+              }
+            }
+          }
+          uses syslog-selector;
+        }
+      }
+    }
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-telemetry-types@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-telemetry-types@2019-11-29.yang
new file mode 100644 (file)
index 0000000..ba78942
--- /dev/null
@@ -0,0 +1,58 @@
+module org-openroadm-telemetry-types {
+  yang-version 1;
+  namespace "http://org/openroadm/telemetry-types";
+  prefix org-openroadm-telemetry-types;
+
+  import openconfig-telemetry-types {
+    prefix openconfig-telemetry-types;
+    revision-date 2017-08-24;
+  }
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "This model extends openconfig-telemetry-types.yang
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2019-05-31 {
+    description
+      "Initial revision.";
+  }
+
+  identity ENC_JSON {
+    base openconfig-telemetry-types:DATA_ENCODING_METHOD;
+    description
+      "JSON encoded based on RFC7159";
+  }
+}
diff --git a/ordmodels/device/src/main/yang/org-openroadm-wavelength-map@2019-11-29.yang b/ordmodels/device/src/main/yang/org-openroadm-wavelength-map@2019-11-29.yang
new file mode 100644 (file)
index 0000000..80b2414
--- /dev/null
@@ -0,0 +1,84 @@
+module org-openroadm-wavelength-map {
+  namespace "http://org/openroadm/wavelength-map";
+  prefix org-openroadm-wavelength-map;
+
+  organization
+    "Open ROADM MSA";
+  contact
+    "OpenROADM.org";
+  description
+    "YANG definitions for mapping wavelength-number to center frequency and wavelength value.
+
+     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
+     All other rights reserved.
+
+     Redistribution and use in source and binary forms, with or without modification,
+     are permitted provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this
+       list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimer in the documentation and/or
+       other materials provided with the distribution.
+     * Neither the Members of the Open ROADM MSA Agreement nor the names of its
+       contributors may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
+     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
+     OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+     WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+     POSSIBILITY OF SUCH DAMAGE.";
+
+  revision 2019-11-29 {
+    description
+      "Version 6.1.0";
+  }
+  revision 2018-11-30 {
+    description
+      "Version 4.1.0";
+  }
+  revision 2017-12-15 {
+    description
+      "Version 2.2";
+  }
+  revision 2016-10-14 {
+    description
+      "Version 1.2";
+  }
+
+  grouping wavelength-map-g {
+    list wavelengths {
+      key "wavelength-number";
+      config false;
+      leaf wavelength-number {
+        type uint32;
+      }
+      leaf center-frequency {
+        type decimal64 {
+          fraction-digits 3;
+          range "191.350..196.100";
+        }
+        units "THz";
+        description
+          "Frequency of the transmit optical channel
+           Domain range:  191.350THz .. 196.100THz ";
+      }
+      leaf wavelength {
+        type decimal64 {
+          fraction-digits 2;
+          range "1528.77..1566.72";
+        }
+        units "nm";
+        description
+          "Lambda corresponding to transmit frequency
+           Domain range:  1528.72nm .. 1566.72nm ";
+      }
+    }
+  }
+}
index 8fb0708ec929f40efe7855b14dd14d45af901b3a..34709a481b146612e61b0deec490036e7994ccd9 100644 (file)
@@ -54,8 +54,8 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceRpcResultSp;
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.rev200520.ServiceRpcResultSpBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ConnectionType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.ODU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.OTU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.OTU4;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev161014.PmGranularity;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
@@ -197,7 +197,6 @@ public class RendererServiceOperationsImpl implements RendererServiceOperations
                         if ((input.getServiceAEnd().getOduServiceRate() != null)
                             && (input.getServiceAEnd().getOduServiceRate().equals(ODU4.class))) {
                             // For the service of OTU4 infrastructure
-                            // First create the OCH and OTU interfaces
                             String serviceRate = "100G"; // For OtnDeviceRendererServiceImpl
                             LOG.info("Service format for {} is {} and rate is {}", input.getServiceName(),
                                 input.getServiceAEnd().getOduServiceRate(), serviceRate);