org-openroadm-device

YANG definitions of ROADM device Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, All other rights rese...

  • Version: 2022-09-30

    org-openroadm-device@2022-09-30


    
      module org-openroadm-device {
    
        yang-version 1;
    
        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 "2022-09-30";
        }
        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 "2021-05-28";
        }
        import org-openroadm-common-optical-channel-types {
          prefix
            org-openroadm-common-optical-channel-types;
          revision-date "2021-12-10";
        }
        import org-openroadm-device-types {
          prefix org-openroadm-device-types;
          revision-date "2020-12-11";
        }
        import org-openroadm-resource-types {
          prefix org-openroadm-resource-types;
          revision-date "2022-03-25";
        }
        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 "2020-09-25";
        }
        import org-openroadm-port-types {
          prefix org-openroadm-port-types;
          revision-date "2020-12-11";
        }
        import org-openroadm-interfaces {
          prefix org-openroadm-interfaces;
          revision-date "2022-09-30";
        }
        import org-openroadm-swdl {
          prefix org-openroadm-swdl;
          revision-date "2022-09-30";
        }
        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 "2021-12-10";
        }
        import org-openroadm-otn-common-types {
          prefix
            org-openroadm-otn-common-types;
          revision-date "2021-09-24";
        }
        import org-openroadm-common-phy-codes {
          prefix
            org-openroadm-common-phy-codes;
          revision-date "2022-05-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 "2022-09-30" {
          description "Version 12.0";
        }
    
        revision "2022-05-27" {
          description "Version 11.1";
        }
    
        revision "2022-03-25" {
          description "Version 11.0";
        }
    
        revision "2021-12-10" {
          description "Version 10.1";
        }
    
        revision "2021-09-24" {
          description "Version 10.0";
        }
    
        revision "2021-05-28" {
          description "Version 9.1";
        }
    
        revision "2021-03-26" {
          description "Version 9.0";
        }
    
        revision "2020-12-11" {
          description "Version 8.1";
        }
    
        revision "2020-09-25" {
          description "Version 8.0";
        }
    
        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";
        }
    
    
        feature netconf-idle-supervision {
          description
            "This feature indicates that the device supports NETCONF idle supervision.";
        }
    
        feature ssh-idle-supervision {
          description
            "This feature indicates that the device supports SSH keep-alive and idle supervision.";
        }
    
        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.";
        }
    
        identity flexo-modulation-format-identity {
          description
            "Flexo modulation format identification";
        }
    
        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;
              leaf shelf-name {
                type leafref {
                  path "/org-openroadm-device/shelves/shelf-name";
                }
                mandatory true;
                description
                  "shelf-name for the operation";
              }
              leaf circuit-pack-name {
                type leafref {
                  path "/org-openroadm-device/circuit-packs/circuit-pack-name";
                }
                mandatory true;
                description
                  "circuit-pack-name for the operation";
              }
            }  // choice equipment-entity
    
            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 {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc led-control
    
        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 {
            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";
            }
    
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc create-tech-info
    
        rpc get-connection-port-trail {
          input {
            leaf connection-name {
              type string;
              mandatory true;
            }
          }
    
          output {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
    
            list ports {
              leaf rack {
                type string;
              }
    
              leaf shelf {
                type string;
              }
    
              leaf slot {
                type string;
              }
    
              leaf subSlot {
                type string;
              }
    
              leaf circuit-pack-name {
                type leafref {
                  path "/org-openroadm-device/circuit-packs/circuit-pack-name";
                }
                mandatory true;
                description
                  "Circuit-Pack identifier. Unique within the context of a device.";
              }
    
              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 ports
          }
        }  // rpc get-connection-port-trail
    
        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";
              leaf degree-number {
                type leafref {
                  path "/org-openroadm-device/degree/degree-number";
                }
                mandatory true;
                description
                  "The degree-number defined in degree";
              }
              leaf amp-number {
                type leafref {
                  path "/org-openroadm-device/line-amplifier/amp-number";
                }
                mandatory true;
                description
                  "The amp-number defined in line-amplifier";
              }
            }  // choice degree-or-amp
    
            leaf support-timer {
              type uint16 {
                range "1..600";
              }
              default "20";
            }
          }
    
          output {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc disable-automatic-shutoff
    
        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";
              leaf degree-number {
                type leafref {
                  path "/org-openroadm-device/degree/degree-number";
                }
                mandatory true;
                description
                  "The degree-number defined in degree";
              }
              leaf amp-number {
                type leafref {
                  path "/org-openroadm-device/line-amplifier/amp-number";
                }
                mandatory true;
                description
                  "The amp-number defined in line-amplifier";
              }
            }  // choice degree-or-amp
    
            leaf port-direction {
              type org-openroadm-common-alarm-pm-types:direction;
            }
    
            leaf distance {
              type decimal64 {
                fraction-digits 2;
              }
              description
                "Units are in meters (m)";
            }
    
            leaf resolution {
              type decimal64 {
                fraction-digits 2;
              }
              description
                "Units for (sampling) resolution are in meters (m)";
            }
          }
    
          output {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc start-scan
    
        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 {
            leaf status {
              type rpc-status;
              mandatory true;
              description "Successful or Failed";
            }
    
            leaf status-message {
              type string;
              description
                "Gives a more detailed status";
            }
          }
        }  // rpc set-current-datetime
    
        notification create-tech-info-notification {
          description
            "This Notification is sent when the create-tech-info is complete or failed.";
          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";
          }
    
          leaf status {
            type rpc-status;
            mandatory true;
            description "Successful or Failed";
          }
    
          leaf status-message {
            type string;
            description
              "Gives a more detailed status";
          }
        }  // notification create-tech-info-notification
    
        notification otdr-scan-result {
          description
            "This Notification is sent when the otdr-scan-result is complete or failed.";
          leaf status {
            type rpc-status;
            mandatory true;
            description "Successful or Failed";
          }
    
          leaf status-message {
            type string;
            description
              "Gives a more detailed status";
          }
    
          leaf result-file {
            type string;
          }
        }  // notification otdr-scan-result
    
        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.";
          }
    
          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 {
                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.";
                }
              }  // case by-user
            }  // choice server-or-user
          }  // container changed-by
    
          leaf datastore {
            type enumeration {
              enum "running" {
                value 0;
                description
                  "The <running> datastore has changed.";
              }
              enum "startup" {
                value 1;
                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.";
            }
          }  // list edit
        }  // notification change-notification
      }  // module org-openroadm-device
    

© 2023 YumaWorks, Inc. All rights reserved.