SELECT pg_catalog.set_config('search_path', '', false);

INSERT INTO public.dataspace VALUES (1, 'NCMP-Admin');
INSERT INTO public.dataspace VALUES (3, 'NFP-Operational');
INSERT INTO public.dataspace VALUES (4, 'generalTestDataspace');
INSERT INTO public.dataspace VALUES (5, 'cpsPerformanceDataspace');

INSERT INTO public.schema_set VALUES (1, 'cm-data-subscriptions', 1);
INSERT INTO public.schema_set VALUES (2, 'dmi-registry-2024-02-23', 1);
INSERT INTO public.schema_set VALUES (3, 'bookstoreSchemaSet', 4);
INSERT INTO public.schema_set VALUES (4, 'bookstoreSchemaSet', 5);
INSERT INTO public.schema_set VALUES (5, 'largeSchemaSet', 5);

INSERT INTO public.anchor VALUES (1, 'cm-data-subscriptions', 1, 1);
INSERT INTO public.anchor VALUES (2, 'ncmp-dmi-registry', 2, 1);
INSERT INTO public.anchor VALUES (3, 'openroadm1', 5, 5);
INSERT INTO public.anchor VALUES (4, 'openroadm2', 5, 5);
INSERT INTO public.anchor VALUES (5, 'openroadm3', 5, 5);
INSERT INTO public.anchor VALUES (6, 'writeTestAnchor', 5, 5);


INSERT INTO public.yang_resource VALUES (1, 'cm-data-subscriptions@2024-02-12.yang', 'module cm-data-subscriptions {
  yang-version 1.1;
  namespace "org:onap:cps:ncmp";

  prefix cmds;

  revision "2024-02-12" {
    description
      "First release of cm data (notification) subscriptions model";
  }

  container datastores {

    list datastore {
      key "name";

      leaf name {
        type string;
      }

      container cm-handles {

        list cm-handle {
          key "id";

          leaf id {
            type string;
          }

          container filters {

            list filter {
              key "xpath";

              leaf xpath {
                type string;
              }

              leaf-list subscriptionIds {
                type string;
              }

            }
          }
        }
      }
    }
  }
}
', 'a524ec4ed37a693b6adecabbe6c1b47722fa2a1e5f72f82d35a429c999ce53bb', 'cm-data-subscriptions', '2024-02-12');
INSERT INTO public.yang_resource VALUES (2, 'dmi-registry@2024-02-23.yang', 'module dmi-registry {

  yang-version 1.1;

  namespace "org:onap:cps:ncmp";

  prefix dmi-reg;

  contact "toine.siebelink@est.tech";

  revision "2024-02-23" {
      description
      "Added data-producer-identifier";
    }

  revision "2023-11-27" {
    description
    "Added alternate-id";
  }

  revision "2023-08-23" {
    description
    "Added module-set-tag";
  }

  revision "2022-05-10" {
    description
    "Added data-sync-enabled, sync-state with state, last-sync-time, data-store-sync-state with operational and running syncstate";
  }

  revision "2022-02-10" {
    description
    "Added state, lock-reason, lock-reason-details to aid with cmHandle sync and timestamp to aid with retry/timeout scenarios";
  }

  revision "2021-12-13" {
    description
    "Added new list of public-properties and additional-properties for a Cm-Handle which are exposed to clients of the NCMP interface";
  }

  revision "2021-10-20" {
    description
    "Added dmi-data-service-name & dmi-model-service-name to allow separate DMI instances for each responsibility";
  }

  revision "2021-05-20" {
    description
    "Initial Version";
  }

  grouping LockReason {
    leaf reason {
      type string;
    }
    leaf details {
      type string;
    }
  }

  grouping SyncState {
   leaf sync-state {
     type string;
   }
   leaf last-sync-time {
     type string;
   }
  }

  grouping Datastores {
    container operational {
      uses SyncState;
    }
    container running {
      uses SyncState;
    }
  }

  container dmi-registry {
    list cm-handles {
      key "id";
      leaf id {
        type string;
      }
      leaf dmi-service-name {
        type string;
      }
      leaf dmi-data-service-name {
        type string;
      }
      leaf dmi-model-service-name {
        type string;
      }
      leaf module-set-tag {
        type string;
      }
      leaf alternate-id {
        type string;
      }
      leaf data-producer-identifier {
        type string;
      }

      list additional-properties {
        key "name";
        leaf name {
          type string;
        }
        leaf value {
          type string;
        }
      }

      list public-properties {
        key "name";
        leaf name {
          type string;
        }
        leaf value {
          type string;
        }
      }

      container state {
        leaf cm-handle-state {
          type string;
        }

        container lock-reason {
          uses LockReason;
        }

        leaf last-update-time {
          type string;
        }

        leaf data-sync-enabled {
          type boolean;
          default "false";
        }

        container datastores {
          uses Datastores;
        }
      }
    }
  }
}

', '8379cdf0ed84d5c72dca4c9e272e4a89242cfcd67e572bafad4b74d04505e96a', 'dmi-registry', '2024-02-23');
INSERT INTO public.yang_resource VALUES (3, 'bookstoreTypes', 'module bookstore-types {
  yang-version 1.1;
  namespace "org:onap:cps:types:sample";

  prefix types;

  revision "2024-01-30" {
    description
      "Sample Types";
  }

  typedef year {
    type uint16 {
      range "1000..9999";
    }
  }

}', '66128105686991ec259da67118ea6fee5356e12523ebcd9884814a8953445da9', 'bookstore-types', '2024-01-30');
INSERT INTO public.yang_resource VALUES (4, 'bookstore', 'module stores {
    yang-version 1.1;
    namespace "org:onap:cps:sample";

    prefix book-store;

    import bookstore-types {
        prefix "types";
        revision-date 2024-01-30;
    }

    revision "2024-02-08" {
        description
            "Order of book authors is preserved";
    }

    revision "2024-01-30" {
        description
            "Extracted bookstore types";
    }

    revision "2020-09-15" {
        description
        "Sample Model";
    }

    list bookstore-address {
        key "bookstore-name";
        leaf bookstore-name {
            type string;
            description
            "Name of bookstore. Example: My Bookstore";
        }
        leaf address {
            type string;
            description
            "Address of store";
        }
        leaf postal-code {
            type string;
            description
            "Postal code of store";
        }
    }

    container bookstore {

        leaf bookstore-name {
            type string;
        }

        container webinfo {
            leaf domain-name {
                type string;
            }
            leaf contact-email {
                type string;
            }
        }

        container support-info {
                    leaf support-office {
                        type string;
                    }
                    container contact-emails {
                        leaf email {
                            type string;
                        }
                    }
                }

        container container-without-leaves { }

        container premises {
            list addresses {
                key "house-number street";

                leaf house-number {
                    type uint16;
                }
                leaf street {
                    type string;
                }
                leaf town {
                    type string;
                }
                leaf county {
                    type string;
                }
            }
        }

        list categories {

            key "code";

            leaf code {
                type string;
            }

            leaf name {
                type string;
            }

            list books {
                key title;

                leaf title {
                    type string;
                }
                leaf lang {
                    type string;
                }
                leaf-list authors {
                    ordered-by user;
                    type string;
                }
                leaf-list editions {
                    type types:year;
                }
                leaf price {
                    type uint64;
                }
            }
        }
    }
}
', 'e535a0faa97dbec0448956245834f692a4bba0361a9875f664f6b8680f3f52d9', 'stores', '2024-02-08');
INSERT INTO public.yang_resource VALUES (5, 'ietf-netconf@2011-06-01.yang', 'module ietf-netconf {

  // the namespace for NETCONF XML definitions is unchanged
  // from RFC 4741, which this document replaces
  namespace "urn:ietf:params:xml:ns:netconf:base:1.0";

  prefix nc;

  import ietf-inet-types {
    prefix inet;
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   <http://tools.ietf.org/wg/netconf/>
     WG List:  <netconf@ietf.org>

     WG Chair: Bert Wijnen
               <bertietf@bwijnen.net>

     WG Chair: Mehmet Ersue
               <mehmet.ersue@nsn.com>

     Editor:   Martin Bjorklund
               <mbj@tail-f.com>

     Editor:   Juergen Schoenwaelder
               <j.schoenwaelder@jacobs-university.de>

     Editor:   Andy Bierman
               <andy.bierman@brocade.com>";
  description
    "NETCONF Protocol Data Types and Protocol Operations.

     Copyright (c) 2011 IETF Trust and the persons identified as
     the document authors.  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).

     This version of this YANG module is part of RFC 6241; see
     the RFC itself for full legal notices.";

  revision 2011-06-01 {
    description
      "Initial revision;";
    reference
      "RFC 6241: Network Configuration Protocol";
  }

  extension get-filter-element-attributes {
    description
      "If this extension is present within an ''anyxml''
       statement named ''filter'', which must be conceptually
       defined within the RPC input section for the <get>
       and <get-config> protocol operations, then the
       following unqualified XML attribute is supported
       within the <filter> element, within a <get> or
       <get-config> protocol operation:

         type : optional attribute with allowed
                value strings ''subtree'' and ''xpath''.
                If missing, the default value is ''subtree''.

       If the ''xpath'' feature is supported, then the
       following unqualified XML attribute is
       also supported:

         select: optional attribute containing a
                 string representing an XPath expression.
                 The ''type'' attribute must be equal to ''xpath''
                 if this attribute is present.";
  }

  // NETCONF capabilities defined as features
  feature writable-running {
    description
      "NETCONF :writable-running capability;
       If the server advertises the :writable-running
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.2";
  }

  feature candidate {
    description
      "NETCONF :candidate capability;
       If the server advertises the :candidate
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.3";
  }

  feature confirmed-commit {
    if-feature candidate;
    description
      "NETCONF :confirmed-commit:1.1 capability;
       If the server advertises the :confirmed-commit:1.1
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";

    reference "RFC 6241, Section 8.4";
  }

  feature rollback-on-error {
    description
      "NETCONF :rollback-on-error capability;
       If the server advertises the :rollback-on-error
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.5";
  }

  feature validate {
    description
      "NETCONF :validate:1.1 capability;
       If the server advertises the :validate:1.1
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.6";
  }

  feature startup {
    description
      "NETCONF :startup capability;
       If the server advertises the :startup
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.7";
  }

  feature url {
    description
      "NETCONF :url capability;
       If the server advertises the :url
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.8";
  }

  feature xpath {
    description
      "NETCONF :xpath capability;
       If the server advertises the :xpath
       capability for a session, then this feature must
       also be enabled for that session.  Otherwise,
       this feature must not be enabled.";
    reference "RFC 6241, Section 8.9";
  }

  // NETCONF Simple Types

  typedef session-id-type {
    type uint32 {
      range "1..max";
    }
    description
      "NETCONF Session Id";
  }

  typedef session-id-or-zero-type {
    type uint32;
    description
      "NETCONF Session Id or Zero to indicate none";
  }
  typedef error-tag-type {
    type enumeration {
       enum in-use {
         description
           "The request requires a resource that
            already is in use.";
       }
       enum invalid-value {
         description
           "The request specifies an unacceptable value for one
            or more parameters.";
       }
       enum too-big {
         description
           "The request or response (that would be generated) is
            too large for the implementation to handle.";
       }
       enum missing-attribute {
         description
           "An expected attribute is missing.";
       }
       enum bad-attribute {
         description
           "An attribute value is not correct; e.g., wrong type,
            out of range, pattern mismatch.";
       }
       enum unknown-attribute {
         description
           "An unexpected attribute is present.";
       }
       enum missing-element {
         description
           "An expected element is missing.";
       }
       enum bad-element {
         description
           "An element value is not correct; e.g., wrong type,
            out of range, pattern mismatch.";
       }
       enum unknown-element {
         description
           "An unexpected element is present.";
       }
       enum unknown-namespace {
         description
           "An unexpected namespace is present.";
       }
       enum access-denied {
         description
           "Access to the requested protocol operation or
            data model is denied because authorization failed.";
       }
       enum lock-denied {
         description
           "Access to the requested lock is denied because the
            lock is currently held by another entity.";
       }
       enum resource-denied {
         description
           "Request could not be completed because of
            insufficient resources.";
       }
       enum rollback-failed {
         description
           "Request to roll back some configuration change (via
            rollback-on-error or <discard-changes> operations)
            was not completed for some reason.";

       }
       enum data-exists {
         description
           "Request could not be completed because the relevant
            data model content already exists.  For example,
            a ''create'' operation was attempted on data that
            already exists.";
       }
       enum data-missing {
         description
           "Request could not be completed because the relevant
            data model content does not exist.  For example,
            a ''delete'' operation was attempted on
            data that does not exist.";
       }
       enum operation-not-supported {
         description
           "Request could not be completed because the requested
            operation is not supported by this implementation.";
       }
       enum operation-failed {
         description
           "Request could not be completed because the requested
            operation failed for some reason not covered by
            any other error condition.";
       }
       enum partial-operation {
         description
           "This error-tag is obsolete, and SHOULD NOT be sent
            by servers conforming to this document.";
       }
       enum malformed-message {
         description
           "A message could not be handled because it failed to
            be parsed correctly.  For example, the message is not
            well-formed XML or it uses an invalid character set.";
       }
     }
     description "NETCONF Error Tag";
     reference "RFC 6241, Appendix A";
  }

  typedef error-severity-type {
    type enumeration {
      enum error {
        description "Error severity";
      }
      enum warning {
        description "Warning severity";
      }
    }
    description "NETCONF Error Severity";
    reference "RFC 6241, Section 4.3";
  }

  typedef edit-operation-type {
    type enumeration {
      enum merge {
        description
          "The configuration data identified by the
           element containing this attribute is merged
           with the configuration at the corresponding
           level in the configuration datastore identified
           by the target parameter.";
      }
      enum replace {
        description
          "The configuration data identified by the element
           containing this attribute replaces any related
           configuration in the configuration datastore
           identified by the target parameter.  If no such
           configuration data exists in the configuration
           datastore, it is created.  Unlike a
           <copy-config> operation, which replaces the
           entire target configuration, only the configuration
           actually present in the config parameter is affected.";
      }
      enum create {
        description
          "The configuration data identified by the element
           containing this attribute is added to the
           configuration if and only if the configuration
           data does not already exist in the configuration
           datastore.  If the configuration data exists, an
           <rpc-error> element is returned with an
           <error-tag> value of ''data-exists''.";
      }
      enum delete {
        description
          "The configuration data identified by the element
           containing this attribute is deleted from the
           configuration if and only if the configuration
           data currently exists in the configuration
           datastore.  If the configuration data does not
           exist, an <rpc-error> element is returned with
           an <error-tag> value of ''data-missing''.";
      }
      enum remove {
        description
          "The configuration data identified by the element
           containing this attribute is deleted from the
           configuration if the configuration
           data currently exists in the configuration
           datastore.  If the configuration data does not
           exist, the ''remove'' operation is silently ignored
           by the server.";
      }
    }
    default "merge";
    description "NETCONF ''operation'' attribute values";
    reference "RFC 6241, Section 7.2";
  }

  // NETCONF Standard Protocol Operations

  rpc get-config {
    description
      "Retrieve all or part of a specified configuration.";

    reference "RFC 6241, Section 7.1";

    input {
      container source {
        description
          "Particular configuration to retrieve.";

        choice config-source {
          mandatory true;
          description
            "The configuration to retrieve.";
          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config source.";
          }
          leaf running {
            type empty;
            description
              "The running configuration is the config source.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config source.
               This is optional-to-implement on the server because
               not all servers will support filtering for this
               datastore.";
          }
        }
      }

      anyxml filter {
        description
          "Subtree or XPath filter to use.";
        nc:get-filter-element-attributes;
      }
    }

    output {
      anyxml data {
        description
          "Copy of the source datastore subset that matched
           the filter criteria (if any).  An empty data container
           indicates that the request did not produce any results.";
      }
    }
  }

  rpc edit-config {
    description
      "The <edit-config> operation loads all or part of a specified
       configuration to the specified target configuration.";

    reference "RFC 6241, Section 7.2";

    input {
      container target {
        description
          "Particular configuration to edit.";

        choice config-target {
          mandatory true;
          description
            "The configuration target.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config target.";
          }
          leaf running {
            if-feature writable-running;
            type empty;
            description
              "The running configuration is the config source.";
          }
        }
      }

      leaf default-operation {
        type enumeration {
          enum merge {
            description
              "The default operation is merge.";
          }
          enum replace {
            description
              "The default operation is replace.";
          }
          enum none {
            description
              "There is no default operation.";
          }
        }
        default "merge";
        description
          "The default operation to use.";
      }

      leaf test-option {
        if-feature validate;
        type enumeration {
          enum test-then-set {
            description
              "The server will test and then set if no errors.";
          }
          enum set {
            description
              "The server will set without a test first.";
          }

          enum test-only {
            description
              "The server will only test and not set, even
               if there are no errors.";
          }
        }
        default "test-then-set";
        description
          "The test option to use.";
      }

      leaf error-option {
        type enumeration {
          enum stop-on-error {
            description
              "The server will stop on errors.";
          }
          enum continue-on-error {
            description
              "The server may continue on errors.";
          }
          enum rollback-on-error {
            description
              "The server will roll back on errors.
               This value can only be used if the ''rollback-on-error''
               feature is supported.";
          }
        }
        default "stop-on-error";
        description
          "The error option to use.";
      }

      choice edit-content {
        mandatory true;
        description
          "The content for the edit operation.";

        anyxml config {
          description
            "Inline Config content.";
        }
        leaf url {
          if-feature url;
          type inet:uri;
          description
            "URL-based config content.";
        }
      }
    }
  }

  rpc copy-config {
    description
      "Create or replace an entire configuration datastore with the
       contents of another complete configuration datastore.";

    reference "RFC 6241, Section 7.3";

    input {
      container target {
        description
          "Particular configuration to copy to.";

        choice config-target {
          mandatory true;
          description
            "The configuration target of the copy operation.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config target.";
          }
          leaf running {
            if-feature writable-running;
            type empty;
            description
              "The running configuration is the config target.
               This is optional-to-implement on the server.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config target.";
          }
          leaf url {
            if-feature url;
            type inet:uri;
            description
              "The URL-based configuration is the config target.";
          }
        }
      }

      container source {
        description
          "Particular configuration to copy from.";

        choice config-source {
          mandatory true;
          description
            "The configuration source for the copy operation.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config source.";
          }
          leaf running {
            type empty;
            description
              "The running configuration is the config source.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config source.";
          }
          leaf url {
            if-feature url;
            type inet:uri;
            description
              "The URL-based configuration is the config source.";
          }
          anyxml config {
            description
              "Inline Config content: <config> element.  Represents
               an entire configuration datastore, not
               a subset of the running datastore.";
          }
        }
      }
    }
  }

  rpc delete-config {
    description
      "Delete a configuration datastore.";

    reference "RFC 6241, Section 7.4";

    input {
      container target {
        description
          "Particular configuration to delete.";

        choice config-target {
          mandatory true;
          description
            "The configuration target to delete.";

          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config target.";
          }
          leaf url {
            if-feature url;
            type inet:uri;
            description
              "The URL-based configuration is the config target.";
          }
        }
      }
    }
  }

  rpc lock {
    description
      "The lock operation allows the client to lock the configuration
       system of a device.";

    reference "RFC 6241, Section 7.5";

    input {
      container target {
        description
          "Particular configuration to lock.";

        choice config-target {
          mandatory true;
          description
            "The configuration target to lock.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config target.";
          }
          leaf running {
            type empty;
            description
              "The running configuration is the config target.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config target.";
          }
        }
      }
    }
  }

  rpc unlock {
    description
      "The unlock operation is used to release a configuration lock,
       previously obtained with the ''lock'' operation.";

    reference "RFC 6241, Section 7.6";

    input {
      container target {
        description
          "Particular configuration to unlock.";

        choice config-target {
          mandatory true;
          description
            "The configuration target to unlock.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config target.";
          }
          leaf running {
            type empty;
            description
              "The running configuration is the config target.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config target.";
          }
        }
      }
    }
  }

  rpc get {
    description
      "Retrieve running configuration and device state information.";

    reference "RFC 6241, Section 7.7";

    input {
      anyxml filter {
        description
          "This parameter specifies the portion of the system
           configuration and state data to retrieve.";
        nc:get-filter-element-attributes;
      }
    }

    output {
      anyxml data {
        description
          "Copy of the running datastore subset and/or state
           data that matched the filter criteria (if any).
           An empty data container indicates that the request did not
           produce any results.";
      }
    }
  }

  rpc close-session {
    description
      "Request graceful termination of a NETCONF session.";

    reference "RFC 6241, Section 7.8";
  }

  rpc kill-session {
    description
      "Force the termination of a NETCONF session.";

    reference "RFC 6241, Section 7.9";

    input {
      leaf session-id {
        type session-id-type;
        mandatory true;
        description
          "Particular session to kill.";
      }
    }
  }

  rpc commit {
    if-feature candidate;

    description
      "Commit the candidate configuration as the device''s new
       current configuration.";

    reference "RFC 6241, Section 8.3.4.1";

    input {
      leaf confirmed {
        if-feature confirmed-commit;
        type empty;
        description
          "Requests a confirmed commit.";
        reference "RFC 6241, Section 8.3.4.1";
      }

      leaf confirm-timeout {
        if-feature confirmed-commit;
        type uint32 {
          range "1..max";
        }
        units "seconds";
        default "600";   // 10 minutes
        description
          "The timeout interval for a confirmed commit.";
        reference "RFC 6241, Section 8.3.4.1";
      }

      leaf persist {
        if-feature confirmed-commit;
        type string;
        description
          "This parameter is used to make a confirmed commit
           persistent.  A persistent confirmed commit is not aborted
           if the NETCONF session terminates.  The only way to abort
           a persistent confirmed commit is to let the timer expire,
           or to use the <cancel-commit> operation.

           The value of this parameter is a token that must be given
           in the ''persist-id'' parameter of <commit> or
           <cancel-commit> operations in order to confirm or cancel
           the persistent confirmed commit.

           The token should be a random string.";
        reference "RFC 6241, Section 8.3.4.1";
      }

      leaf persist-id {
        if-feature confirmed-commit;
        type string;
        description
          "This parameter is given in order to commit a persistent
           confirmed commit.  The value must be equal to the value
           given in the ''persist'' parameter to the <commit> operation.
           If it does not match, the operation fails with an
          ''invalid-value'' error.";
        reference "RFC 6241, Section 8.3.4.1";
      }

    }
  }

  rpc discard-changes {
    if-feature candidate;

    description
      "Revert the candidate configuration to the current
       running configuration.";
    reference "RFC 6241, Section 8.3.4.2";
  }

  rpc cancel-commit {
    if-feature confirmed-commit;
    description
      "This operation is used to cancel an ongoing confirmed commit.
       If the confirmed commit is persistent, the parameter
       ''persist-id'' must be given, and it must match the value of the
       ''persist'' parameter.";
    reference "RFC 6241, Section 8.4.4.1";

    input {
      leaf persist-id {
        type string;
        description
          "This parameter is given in order to cancel a persistent
           confirmed commit.  The value must be equal to the value
           given in the ''persist'' parameter to the <commit> operation.
           If it does not match, the operation fails with an
          ''invalid-value'' error.";
      }
    }
  }

  rpc validate {
    if-feature validate;

    description
      "Validates the contents of the specified configuration.";

    reference "RFC 6241, Section 8.6.4.1";

    input {
      container source {
        description
          "Particular configuration to validate.";

        choice config-source {
          mandatory true;
          description
            "The configuration source to validate.";

          leaf candidate {
            if-feature candidate;
            type empty;
            description
              "The candidate configuration is the config source.";
          }
          leaf running {
            type empty;
            description
              "The running configuration is the config source.";
          }
          leaf startup {
            if-feature startup;
            type empty;
            description
              "The startup configuration is the config source.";
          }
          leaf url {
            if-feature url;
            type inet:uri;
            description
              "The URL-based configuration is the config source.";
          }
          anyxml config {
            description
              "Inline Config content: <config> element.  Represents
               an entire configuration datastore, not
               a subset of the running datastore.";
          }
        }
      }
    }
  }

}
', 'd55fd4b2ad4d489b284322fb7246afad3ded2fe894ed9f32b5ebb96dae1e46a9', 'ietf-netconf', '2011-06-01');
INSERT INTO public.yang_resource VALUES (6, 'org-openroadm-ethernet-interfaces@2018-10-19.yang', 'module org-openroadm-ethernet-interfaces {
  namespace "http://org/openroadm/ethernet-interfaces";
  prefix org-openroadm-eth-interfaces;

  import org-openroadm-device {
    prefix org-openroadm-device;
    revision-date 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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. ";
    }
    leaf fec {
      type enumeration {
        enum "off";
        enum "rsfec";
      }
      description
        "Forward Error Correction Choices. ";
    }
    leaf duplex {
      type enumeration {
        enum "half" {
          value 0;
          description
            "half duplex";
        }
        enum "full" {
          value 1;
          description
            "full duplex";
        }
      }
      default "full";
      description
        "Set duplex selections.";
    }
    leaf mtu {
      type uint32 {
        range "1518..9000";
      }
      default "1522";
      description
        "Set Maximum Frame Size.";
    }
    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.";
    }
    leaf curr-speed {
      type string;
      config false;
      description
        "speed (UNKNOWN/AUTO/10/100/1000/10000) corresponding to the interface";
    }
    leaf curr-duplex {
      type string;
      config false;
      description
        "duplex (HALF/FULL) corresponding to the interface";
    }
  }

  grouping ethernet-container {
    container ethernet {
      description
        "Ethernet Interfaces";
      uses eth-attributes;
    }
  }

  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface" {
    when "org-openroadm-device:type = ''openROADM-if:ethernetCsmacd''";
    uses ethernet-container;
  }
}
', 'bf5f6fd545e5593c8e09f2ec99e928ed2edfb4ea955b310e9dfa83601fbb784c', 'org-openroadm-ethernet-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (7, 'org-openroadm-equipment-states-types@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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";
      }
    }
  }
}
', 'dbbfd8f1e172ed57d24a0b0b59169e1661c54d3d6db34f59eb50b6af7565b100', 'org-openroadm-equipment-states-types', '2017-12-15');
INSERT INTO public.yang_resource VALUES (8, 'org-openroadm-maintenance-loopback@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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).";
      }
    }
  }
}
', '118c494adae1cda41e2022f25070a6b22bee33acdf984284afe0e4ba752d235f', 'org-openroadm-maintenance-loopback', '2017-12-15');
INSERT INTO public.yang_resource VALUES (9, 'org-openroadm-otn-common@2017-06-26.yang', 'module org-openroadm-otn-common {
  namespace "http://org/openroadm/otn-common";
  prefix org-openroadm-otn-common;

  organization
    "Open ROADM MSA";
  contact
    "OpenROADM.org";
  description
    "YANG definitions for common OTN interface atrtributes and types. 
         
     Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
     AT&T Intellectual Property.  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 2017-06-26 {
    description
      "Version 2.0";
  }

  grouping trail-trace {
    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";
    }
    leaf accepted-sapi {
      type string;
      config false;
      description
        "The accepted SAPI recovered from the recieved 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 recieved 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 recieved multi-frame TTI field";
    }
    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 Accpeted TTI. Other TTI fields are ignored";
        }
        enum "DAPI" {
          description
            "Expected DAPI is compared to the Accpeted TTI. Other TTI fields are ignored";
        }
        enum "SAPI-and-DAPI" {
          description
            "Expected SAPI and Expected DAPI are compared to the Accpeted TTI. Operator specific TTI field is ignored";
        }
      }
      default "Disabled";
    }
  }

  grouping deg-threshold {
    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%";
    }
  }
}
', 'c6785acef6f4d5c83045a3b5236ce719fe8cde613972ae1cfddac7eefaaa43dd', 'org-openroadm-otn-common', '2017-06-26');
INSERT INTO public.yang_resource VALUES (10, 'org-openroadm-port-capability@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-port-types {
    prefix org-openroadm-port-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-prot-otn-linear-aps {
    prefix org-openroadm-prot-otn-linear-aps;
    revision-date 2018-10-19;
  }
  import org-openroadm-otn-common-types {
    prefix org-openroadm-otn-common-types;
    revision-date 2017-12-15;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  revision 2017-12-15 {
    description
      "Version 2.2";
  }
  revision 2017-09-29 {
    description
      "Version 2.1";
  }

  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";
  }

  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 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";
        }
        container otn-capability {
          leaf-list if-protection-capability {
            type identityref {
              base org-openroadm-prot-otn-linear-aps: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 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.";
          }
          container 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 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-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";
            }
          }
          container odu-mux-hierarchy {
            presence "HO ODU supported hierarchy.";
            list mux-capability {
              key "stage-number ho-odu-type ho-odu-payload-type";
              leaf stage-number {
                type uint8 {
                  range "1 .. 2";
                }
              }
              leaf ho-odu-type {
                type identityref {
                  base org-openroadm-otn-common-types:odu-rate-identity;
                }
              }
              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;
                }
              }
              leaf lo-odu-proactive-DMp {
                type boolean;
                description
                  "lo 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
                  "lo 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 tcm-direction-capability-type;
                description
                  "Supported tcm direction capability for low order ODU associated with the port.";
              }
            }
          }
        }
      }
    }
  }

  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;
              }
            }
          }
          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;
              }
            }
          }
        }
      }
    }
  }

  augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device:ports" {
    uses port-capability-grp;
  }
  augment "/org-openroadm-device:org-openroadm-device" {
    uses port-group-restriction-grp;
  }
}
', 'b5f60d01e70e17a00b4584c7c13a55691d7fb487f9046a08e97096f4be7a64b9', 'org-openroadm-port-capability', '2018-10-19');
INSERT INTO public.yang_resource VALUES (11, 'org-openroadm-syslog@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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;
        }
      }
    }
  }
}
', 'da6eb860ecf6efb0b7d32b11e6da3df852472b860e45f46bf667586f2f69beed', 'org-openroadm-syslog', '2017-12-15');
INSERT INTO public.yang_resource VALUES (12, 'org-openroadm-port-types@2018-10-19.yang', 'module org-openroadm-port-types {
  namespace "http://org/openroadm/port/types";
  prefix org-openroadm-port-types;

  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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-OMS {
    base supported-if-capability;
  }

  identity if-OTS {
    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-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-40GE-ODU3 {
    base supported-if-capability;
  }

  identity if-100GE-ODU4 {
    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;
  }

  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.";
  }

  grouping common-port {
    leaf port-power-capability-min-rx {
      type org-openroadm-common-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-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-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-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;
  }
}
', '26210c692c8d5bc4b13a08752b8b7b14cbc8cdbb3c50f36430ff628e9cfa9a5f', 'org-openroadm-port-types', '2018-10-19');
INSERT INTO public.yang_resource VALUES (29, 'org-openroadm-prot-otn-linear-aps@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 otn-protection-type {
    description
      "OTN base protection identity from which
         specific protection types are derived.";
  }

  identity odu-one-plus-one {
    base otn-protection-type;
    description
      "ODU Linear Protection 1+1 permanant 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 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;
  }
}
', '79d42551c9b7ddd7e0a5834004b968ba5c19c4c240b1f1b01ac2f9ffeb25e44d', 'org-openroadm-prot-otn-linear-aps', '2018-10-19');
INSERT INTO public.yang_resource VALUES (30, 'org-openroadm-probable-cause@2018-10-19.yang', 'module org-openroadm-probable-cause {
  namespace "http://org/openroadm/probableCause";
  prefix org-openroadm-probable-cause;

  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 Line Fail";
      }
      enum "automaticLaserShutdown" {
        value 7;
        description
          "Optical Line Fail";
      }
      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";
      }
    }
  }

  grouping probable-cause {
    leaf cause {
      type probable-cause-enum;
      mandatory true;
    }
    leaf extension {
      type string;
      mandatory false;
    }
    leaf direction {
      type org-openroadm-common-types:direction;
      mandatory true;
      description
        "Direction indication of the alarm.";
    }
    leaf location {
      type org-openroadm-common-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.";
    }
  }
}
', 'c867612aa8d5938354d8ef9e408168b793c66262c45d2cadd03f3a920e992e03', 'org-openroadm-probable-cause', '2018-10-19');
INSERT INTO public.yang_resource VALUES (31, 'org-openroadm-physical-types@2018-10-19.yang', 'module org-openroadm-physical-types {
  namespace "http://org/openroadm/physical/types";
  prefix org-openroadm-physical-types;

  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }
  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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-types:state;
      config false;
      description
        "Operational state of the physical resource";
    }
  }
}
', '573c1079e6183f2c2f4449d070b3935a331c0347de9fb1fc508ae2595c7ca476', 'org-openroadm-physical-types', '2018-10-19');
INSERT INTO public.yang_resource VALUES (32, 'ietf-yang-types@2013-07-15.yang', 'module ietf-yang-types {

  namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
  prefix "yang";

  organization
   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

  contact
   "WG Web:   <http://tools.ietf.org/wg/netmod/>
    WG List:  <mailto:netmod@ietf.org>

    WG Chair: David Kessens
              <mailto:david.kessens@nsn.com>

    WG Chair: Juergen Schoenwaelder
              <mailto:j.schoenwaelder@jacobs-university.de>

    Editor:   Juergen Schoenwaelder
              <mailto:j.schoenwaelder@jacobs-university.de>";

  description
   "This module contains a collection of generally useful derived
    YANG data types.

    Copyright (c) 2013 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).

    This version of this YANG module is part of RFC 6991; see
    the RFC itself for full legal notices.";

  revision 2013-07-15 {
    description
     "This revision adds the following new data types:
      - yang-identifier
      - hex-string
      - uuid
      - dotted-quad";
    reference
     "RFC 6991: Common YANG Data Types";
  }

  revision 2010-09-24 {
    description
     "Initial revision.";
    reference
     "RFC 6021: Common YANG Data Types";
  }

  /*** collection of counter and gauge types ***/

  typedef counter32 {
    type uint32;
    description
     "The counter32 type represents a non-negative integer
      that monotonically increases until it reaches a
      maximum value of 2^32-1 (4294967295 decimal), when it
      wraps around and starts increasing again from zero.

      Counters have no defined ''initial'' value, and thus, a
      single value of a counter has (in general) no information
      content.  Discontinuities in the monotonically increasing
      value normally occur at re-initialization of the
      management system, and at other times as specified in the
      description of a schema node using this type.  If such
      other times can occur, for example, the creation of
      a schema node of type counter32 at times other than
      re-initialization, then a corresponding schema node
      should be defined, with an appropriate type, to indicate
      the last discontinuity.

      The counter32 type should not be used for configuration
      schema nodes.  A default statement SHOULD NOT be used in
      combination with the type counter32.

      In the value set and its semantics, this type is equivalent
      to the Counter32 type of the SMIv2.";
    reference
     "RFC 2578: Structure of Management Information Version 2
                (SMIv2)";
  }

  typedef zero-based-counter32 {
    type yang:counter32;
    default "0";
    description
     "The zero-based-counter32 type represents a counter32
      that has the defined ''initial'' value zero.

      A schema node of this type will be set to zero (0) on creation
      and will thereafter increase monotonically until it reaches
      a maximum value of 2^32-1 (4294967295 decimal), when it
      wraps around and starts increasing again from zero.

      Provided that an application discovers a new schema node
      of this type within the minimum time to wrap, it can use the
      ''initial'' value as a delta.  It is important for a management
      station to be aware of this minimum time and the actual time
      between polls, and to discard data if the actual time is too
      long or there is no defined minimum time.

      In the value set and its semantics, this type is equivalent
      to the ZeroBasedCounter32 textual convention of the SMIv2.";
    reference
      "RFC 4502: Remote Network Monitoring Management Information
                 Base Version 2";
  }

  typedef counter64 {
    type uint64;
    description
     "The counter64 type represents a non-negative integer
      that monotonically increases until it reaches a
      maximum value of 2^64-1 (18446744073709551615 decimal),
      when it wraps around and starts increasing again from zero.

      Counters have no defined ''initial'' value, and thus, a
      single value of a counter has (in general) no information
      content.  Discontinuities in the monotonically increasing
      value normally occur at re-initialization of the
      management system, and at other times as specified in the
      description of a schema node using this type.  If such
      other times can occur, for example, the creation of
      a schema node of type counter64 at times other than
      re-initialization, then a corresponding schema node
      should be defined, with an appropriate type, to indicate
      the last discontinuity.

      The counter64 type should not be used for configuration
      schema nodes.  A default statement SHOULD NOT be used in
      combination with the type counter64.

      In the value set and its semantics, this type is equivalent
      to the Counter64 type of the SMIv2.";
    reference
     "RFC 2578: Structure of Management Information Version 2
                (SMIv2)";
  }

  typedef zero-based-counter64 {
    type yang:counter64;
    default "0";
    description
     "The zero-based-counter64 type represents a counter64 that
      has the defined ''initial'' value zero.




      A schema node of this type will be set to zero (0) on creation
      and will thereafter increase monotonically until it reaches
      a maximum value of 2^64-1 (18446744073709551615 decimal),
      when it wraps around and starts increasing again from zero.

      Provided that an application discovers a new schema node
      of this type within the minimum time to wrap, it can use the
      ''initial'' value as a delta.  It is important for a management
      station to be aware of this minimum time and the actual time
      between polls, and to discard data if the actual time is too
      long or there is no defined minimum time.

      In the value set and its semantics, this type is equivalent
      to the ZeroBasedCounter64 textual convention of the SMIv2.";
    reference
     "RFC 2856: Textual Conventions for Additional High Capacity
                Data Types";
  }

  typedef gauge32 {
    type uint32;
    description
     "The gauge32 type represents a non-negative integer, which
      may increase or decrease, but shall never exceed a maximum
      value, nor fall below a minimum value.  The maximum value
      cannot be greater than 2^32-1 (4294967295 decimal), and
      the minimum value cannot be smaller than 0.  The value of
      a gauge32 has its maximum value whenever the information
      being modeled is greater than or equal to its maximum
      value, and has its minimum value whenever the information
      being modeled is smaller than or equal to its minimum value.
      If the information being modeled subsequently decreases
      below (increases above) the maximum (minimum) value, the
      gauge32 also decreases (increases).

      In the value set and its semantics, this type is equivalent
      to the Gauge32 type of the SMIv2.";
    reference
     "RFC 2578: Structure of Management Information Version 2
                (SMIv2)";
  }

  typedef gauge64 {
    type uint64;
    description
     "The gauge64 type represents a non-negative integer, which
      may increase or decrease, but shall never exceed a maximum
      value, nor fall below a minimum value.  The maximum value
      cannot be greater than 2^64-1 (18446744073709551615), and
      the minimum value cannot be smaller than 0.  The value of
      a gauge64 has its maximum value whenever the information
      being modeled is greater than or equal to its maximum
      value, and has its minimum value whenever the information
      being modeled is smaller than or equal to its minimum value.
      If the information being modeled subsequently decreases
      below (increases above) the maximum (minimum) value, the
      gauge64 also decreases (increases).

      In the value set and its semantics, this type is equivalent
      to the CounterBasedGauge64 SMIv2 textual convention defined
      in RFC 2856";
    reference
     "RFC 2856: Textual Conventions for Additional High Capacity
                Data Types";
  }

  /*** collection of identifier-related types ***/

  typedef object-identifier {
    type string {
      pattern ''(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))''
            + ''(\.(0|([1-9]\d*)))*'';
    }
    description
     "The object-identifier type represents administratively
      assigned names in a registration-hierarchical-name tree.

      Values of this type are denoted as a sequence of numerical
      non-negative sub-identifier values.  Each sub-identifier
      value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
      are separated by single dots and without any intermediate
      whitespace.

      The ASN.1 standard restricts the value space of the first
      sub-identifier to 0, 1, or 2.  Furthermore, the value space
      of the second sub-identifier is restricted to the range
      0 to 39 if the first sub-identifier is 0 or 1.  Finally,
      the ASN.1 standard requires that an object identifier
      has always at least two sub-identifiers.  The pattern
      captures these restrictions.

      Although the number of sub-identifiers is not limited,
      module designers should realize that there may be
      implementations that stick with the SMIv2 limit of 128
      sub-identifiers.

      This type is a superset of the SMIv2 OBJECT IDENTIFIER type
      since it is not restricted to 128 sub-identifiers.  Hence,
      this type SHOULD NOT be used to represent the SMIv2 OBJECT
      IDENTIFIER type; the object-identifier-128 type SHOULD be
      used instead.";
    reference
     "ISO9834-1: Information technology -- Open Systems
      Interconnection -- Procedures for the operation of OSI
      Registration Authorities: General procedures and top
      arcs of the ASN.1 Object Identifier tree";
  }

  typedef object-identifier-128 {
    type object-identifier {
      pattern ''\d*(\.\d*){1,127}'';
    }
    description
     "This type represents object-identifiers restricted to 128
      sub-identifiers.

      In the value set and its semantics, this type is equivalent
      to the OBJECT IDENTIFIER type of the SMIv2.";
    reference
     "RFC 2578: Structure of Management Information Version 2
                (SMIv2)";
  }

  typedef yang-identifier {
    type string {
      length "1..max";
      pattern ''[a-zA-Z_][a-zA-Z0-9\-_.]*'';
      pattern ''.|..|[^xX].*|.[^mM].*|..[^lL].*'';
    }
    description
      "A YANG identifier string as defined by the ''identifier''
       rule in Section 12 of RFC 6020.  An identifier must
       start with an alphabetic character or an underscore
       followed by an arbitrary sequence of alphabetic or
       numeric characters, underscores, hyphens, or dots.

       A YANG identifier MUST NOT start with any possible
       combination of the lowercase or uppercase character
       sequence ''xml''.";
    reference
      "RFC 6020: YANG - A Data Modeling Language for the Network
                 Configuration Protocol (NETCONF)";
  }

  /*** collection of types related to date and time***/

  typedef date-and-time {
    type string {
      pattern ''\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?''
            + ''(Z|[\+\-]\d{2}:\d{2})'';
    }
    description
     "The date-and-time type is a profile of the ISO 8601
      standard for representation of dates and times using the
      Gregorian calendar.  The profile is defined by the
      date-time production in Section 5.6 of RFC 3339.

      The date-and-time type is compatible with the dateTime XML
      schema type with the following notable exceptions:

      (a) The date-and-time type does not allow negative years.

      (b) The date-and-time time-offset -00:00 indicates an unknown
          time zone (see RFC 3339) while -00:00 and +00:00 and Z
          all represent the same time zone in dateTime.

      (c) The canonical format (see below) of data-and-time values
          differs from the canonical format used by the dateTime XML
          schema type, which requires all times to be in UTC using
          the time-offset ''Z''.

      This type is not equivalent to the DateAndTime textual
      convention of the SMIv2 since RFC 3339 uses a different
      separator between full-date and full-time and provides
      higher resolution of time-secfrac.

      The canonical format for date-and-time values with a known time
      zone uses a numeric time zone offset that is calculated using
      the device''s configured known offset to UTC time.  A change of
      the device''s offset to UTC time will cause date-and-time values
      to change accordingly.  Such changes might happen periodically
      in case a server follows automatically daylight saving time
      (DST) time zone offset changes.  The canonical format for
      date-and-time values with an unknown time zone (usually
      referring to the notion of local time) uses the time-offset
      -00:00.";
    reference
     "RFC 3339: Date and Time on the Internet: Timestamps
      RFC 2579: Textual Conventions for SMIv2
      XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
  }

  typedef timeticks {
    type uint32;
    description
     "The timeticks type represents a non-negative integer that
      represents the time, modulo 2^32 (4294967296 decimal), in
      hundredths of a second between two epochs.  When a schema
      node is defined that uses this type, the description of
      the schema node identifies both of the reference epochs.

      In the value set and its semantics, this type is equivalent
      to the TimeTicks type of the SMIv2.";
    reference
     "RFC 2578: Structure of Management Information Version 2
                (SMIv2)";
  }

  typedef timestamp {
    type yang:timeticks;
    description
     "The timestamp type represents the value of an associated
      timeticks schema node at which a specific occurrence
      happened.  The specific occurrence must be defined in the
      description of any schema node defined using this type.  When
      the specific occurrence occurred prior to the last time the
      associated timeticks attribute was zero, then the timestamp
      value is zero.  Note that this requires all timestamp values
      to be reset to zero when the value of the associated timeticks
      attribute reaches 497+ days and wraps around to zero.

      The associated timeticks schema node must be specified
      in the description of any schema node using this type.

      In the value set and its semantics, this type is equivalent
      to the TimeStamp textual convention of the SMIv2.";
    reference
     "RFC 2579: Textual Conventions for SMIv2";
  }

  /*** collection of generic address types ***/

  typedef phys-address {
    type string {
      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
    }




    description
     "Represents media- or physical-level addresses represented
      as a sequence octets, each octet represented by two hexadecimal
      numbers.  Octets are separated by colons.  The canonical
      representation uses lowercase characters.

      In the value set and its semantics, this type is equivalent
      to the PhysAddress textual convention of the SMIv2.";
    reference
     "RFC 2579: Textual Conventions for SMIv2";
  }

  typedef mac-address {
    type string {
      pattern ''[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'';
    }
    description
     "The mac-address type represents an IEEE 802 MAC address.
      The canonical representation uses lowercase characters.

      In the value set and its semantics, this type is equivalent
      to the MacAddress textual convention of the SMIv2.";
    reference
     "IEEE 802: IEEE Standard for Local and Metropolitan Area
                Networks: Overview and Architecture
      RFC 2579: Textual Conventions for SMIv2";
  }

  /*** collection of XML-specific types ***/

  typedef xpath1.0 {
    type string;
    description
     "This type represents an XPATH 1.0 expression.

      When a schema node is defined that uses this type, the
      description of the schema node MUST specify the XPath
      context in which the XPath expression is evaluated.";
    reference
     "XPATH: XML Path Language (XPath) Version 1.0";
  }

  /*** collection of string types ***/

  typedef hex-string {
    type string {
      pattern ''([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'';
    }
    description
     "A hexadecimal string with octets represented as hex digits
      separated by colons.  The canonical representation uses
      lowercase characters.";
  }

  typedef uuid {
    type string {
      pattern ''[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-''
            + ''[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'';
    }
    description
     "A Universally Unique IDentifier in the string representation
      defined in RFC 4122.  The canonical representation uses
      lowercase characters.

      The following is an example of a UUID in string representation:
      f81d4fae-7dec-11d0-a765-00a0c91e6bf6
      ";
    reference
     "RFC 4122: A Universally Unique IDentifier (UUID) URN
                Namespace";
  }

  typedef dotted-quad {
    type string {
      pattern
        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}''
      + ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'';
    }
    description
      "An unsigned 32-bit number expressed in the dotted-quad
       notation, i.e., four octets written as decimal numbers
       and separated with the ''.'' (full stop) character.";
  }
}
', '25516798613f862ad20831e59ba02b75ecdc9c6f5547ed5d90bda76143bf0112', 'ietf-yang-types', '2013-07-15');
INSERT INTO public.yang_resource VALUES (33, 'org-openroadm-network-media-channel-interfaces@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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-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-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;
  }
}
', '3c9807c0255aa0f15f8283513fabec896a245e3f66750aff8f022e8a3b2050de', 'org-openroadm-network-media-channel-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (13, 'org-openroadm-layerRate@2017-12-15.yang', '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, 
      AT&T Intellectual Property.  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 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;
    }
  }
}
', 'd0b5b8849cdc373b52cfd2d4badea805dc55223e3b5380c1497af282292fd227', 'org-openroadm-layerRate', '2017-12-15');
INSERT INTO public.yang_resource VALUES (14, 'org-openroadm-pm-types@2017-12-15.yang', '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, 
      AT&T Intellectual Property.  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 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
          "Severly 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
          "Minumun 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.";
      }
    }
  }

  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. Consisists 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";
    }
  }
}
', '5ea9ff85404e1044f8603238ef267758aced9735c992043cd992b0ada69f9d2a', 'org-openroadm-pm-types', '2017-12-15');
INSERT INTO public.yang_resource VALUES (15, 'org-openroadm-otn-odu-interfaces@2018-10-19.yang', 'module org-openroadm-otn-odu-interfaces {
  namespace "http://org/openroadm/otn-odu-interfaces";
  prefix org-openroadm-otn-odu-interfaces;

  import org-openroadm-device {
    prefix org-openroadm-device;
    revision-date 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-maintenance-testsignal {
    prefix org-openroadm-maint-testsignal;
    revision-date 2017-12-15;
  }
  import org-openroadm-otn-common {
    prefix org-openroadm-otn-common;
    revision-date 2017-06-26;
  }
  import org-openroadm-otn-common-types {
    prefix org-openroadm-otn-common-types;
    revision-date 2017-12-15;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 {
    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";
    }
    leaf trib-port-payload {
      type string;
      description
        "interface name being mapped to trib-port";
    }
  }

  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 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 parent-odu-allocation;
    uses org-openroadm-otn-common:trail-trace;
    uses org-openroadm-otn-common:deg-threshold;
    list tcm {
      key "layer tcm-direction";
      max-elements "6";
      description
        "Tandem Connection Management";
      uses tcm-attributes;
    }
    uses opu;
  }

  grouping parent-odu-allocation {
    container parent-odu-allocation {
      when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface[org-openroadm-device:name = current()/../../org-openroadm-device:supporting-interface]/org-openroadm-device:type = ''openROADM-if:otnOdu''";
      presence "Explicit assignment of parent ODU trib-slot and trib-port allocation. ";
      leaf trib-port-number {
        type uint16 {
          range "1 .. 80";
        }
        mandatory true;
        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 opu {
    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";
      }
      leaf payload-interface {
        type string;
        description
          "Expected Payload of OPU. It designates client interface name";
      }
      container msi {
        when "../payload-type = ''20'' or ../payload-type = ''21''";
        list tx-msi {
          key "trib-slot";
          description
            "Transmit MSI";
          uses msi-entry;
        }
        list rx-msi {
          key "trib-slot";
          description
            "Receive MSI";
          uses msi-entry;
        }
        list exp-msi {
          key "trib-slot";
          description
            "Expected MSI";
          uses 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 enumeration {
        enum "up-tcm" {
          description
            "TCM termination direction faces the switch fabric.";
        }
        enum "down-tcm" {
          description
            "TCM termination direction faces the facility";
        }
      }
      description
        "Direction of TCM.";
    }
    uses org-openroadm-otn-common:trail-trace;
    uses org-openroadm-otn-common:deg-threshold;
  }

  grouping odu-container {
    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 "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''";
    uses odu-container;
  }
}
', '0b3131e0b0ed56fb4ffe9edab9336816e1384ffbb1ce6c67500c4fbbc01d00e3', 'org-openroadm-otn-odu-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (16, 'org-openroadm-database@2018-10-19.yang', '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 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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;
  }
}
', 'c6bc2f016e044a0dc0fec18c8523c7ae7c65334e5d7b536a88bcb2a9dfce3c5a', 'org-openroadm-database', '2018-10-19');
INSERT INTO public.yang_resource VALUES (17, 'org-openroadm-alarm@2018-10-19.yang', '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-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-resource {
    prefix org-openroadm-resource;
    revision-date 2018-10-19;
  }
  import org-openroadm-probable-cause {
    prefix org-openroadm-probable-cause;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 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 org-openroadm-common-types: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;
    }
  }
}
', 'e76776cd6c9f809fc06e04cf0fbeff50c6a317c4aaba42b72faf52a8f96df0f4', 'org-openroadm-alarm', '2018-10-19');
INSERT INTO public.yang_resource VALUES (18, 'org-openroadm-interfaces@2017-06-26.yang', '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, 
     AT&T Intellectual Property.  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 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 openROADMOpticalMultiplex {
    base interface-type;
    description
      "Optical Transport Multiplex type for openROADM";
  }
}
', 'd24b02f2f87e8094048d2e4693b559144dd43597cb0bd911787f81faf7c4c4a4', 'org-openroadm-interfaces', '2017-06-26');
INSERT INTO public.yang_resource VALUES (19, 'org-openroadm-optical-channel-interfaces@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 rate {
      type identityref {
        base org-openroadm-common-types:och-rate-identity;
      }
      description
        "rate";
    }
    leaf frequency {
      type org-openroadm-common-types:frequency-THz;
      config true;
      description
        "Center Frequency in THz.";
    }
    leaf width {
      type org-openroadm-common-types:frequency-GHz;
      config false;
      description
        "Frequency width in GHz.";
    }
    leaf modulation-format {
      type org-openroadm-common-types:modulation-format;
    }
    leaf transmit-power {
      type org-openroadm-common-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";
    }
  }

  grouping och-container {
    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''";
    uses och-container;
  }
}
', 'f71b322615dbde945ee4a7aaf6a7a397ddbacacc67a076553abac17755979791', 'org-openroadm-optical-channel-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (20, 'org-openroadm-tca@2018-10-19.yang', '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-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-pm-types {
    prefix org-openroadm-pm-types;
    revision-date 2017-12-15;
  }
  import org-openroadm-resource {
    prefix org-openroadm-resource;
    revision-date 2018-10-19;
  }

  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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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";
  }

  grouping tca {
    leaf id {
      type string;
      mandatory true;
    }
    container resource {
      uses org-openroadm-resource:resource;
    }
    container pmParameterName {
      uses org-openroadm-pm-types:pm-names;
    }
    leaf granularity {
      type org-openroadm-pm-types:pm-granularity;
      mandatory true;
    }
    leaf location {
      type org-openroadm-common-types:location;
      mandatory true;
    }
    leaf direction {
      type org-openroadm-common-types:direction;
      mandatory true;
    }
  }

  grouping potential-tca {
    uses tca;
    leaf lowThresholdValue {
      type org-openroadm-pm-types:pm-data-type;
    }
    leaf highThresholdValue {
      type org-openroadm-pm-types:pm-data-type;
    }
  }

  notification tca-notification {
    uses tca;
    leaf thresholdValue {
      type org-openroadm-pm-types:pm-data-type;
      mandatory true;
    }
    leaf thresholdType {
      type enumeration {
        enum "high" {
          value 1;
        }
        enum "low" {
          value 2;
        }
      }
      mandatory true;
      description
        "Threshold Crossed";
    }
    leaf pmParameterValue {
      type org-openroadm-pm-types:pm-data-type;
      mandatory true;
    }
    leaf raiseTime {
      type yang:date-and-time;
      mandatory true;
    }
  }
  container potential-tca-list {
    description
      "This is the set of threshold crossing alerts monitored on the device. Alerts are
       enabled/disabled by adding/deleting the high/low threshold values from the list.";
    list tca {
      key "id";
      uses potential-tca;
    }
  }
}
', '1323e3cb495d3a4f0ef16d57e54e3dcfa950a86244d791112471de181d91694e', 'org-openroadm-tca', '2018-10-19');
INSERT INTO public.yang_resource VALUES (21, 'org-openroadm-maintenance-testsignal@2017-12-15.yang', 'module org-openroadm-maintenance-testsignal {
  namespace "http://org/openroadm/maintenance-testsignal";
  prefix org-openroadm-maint-testsignal;

  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, 
     AT&T Intellectual Property.  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 2017-12-15 {
    description
      "Version 2.2";
  }
  revision 2016-10-14 {
    description
      "Version 1.2";
  }

  grouping maint-testsignal {
    container maint-testsignal {
      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-31at 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";
          }
        }
        description
          "Set test signal pattern";
      }
      leaf type {
        when "../enabled = ''true''";
        type enumeration {
          enum "fac" {
            value 0;
            description
              "test signal in the facility direction";
          }
          enum "term" {
            value 1;
            description
              "test signal in the terminal direction";
          }
        }
        default "fac";
        description
          "Set test signal type (or direction).";
      }
      leaf bitErrors {
        when "../enabled = ''true'' and ../type = ''fac''";
        type uint32 {
          range "0..4294967295";
        }
        config false;
        description
          "bit errors for test signal in facility direction.";
      }
      leaf bitErrorsTerminal {
        when "../enabled = ''true'' and ../type = ''term''";
        type uint32 {
          range "0..4294967295";
        }
        config false;
        description
          "bit errors for test signal in terminal direction.";
      }
      leaf syncSeconds {
        when "../enabled = ''true'' and ../type = ''fac''";
        type string;
        config false;
        description
          "number of seconds the received facility test signal is in sync.";
      }
      leaf syncSecondsTerminal {
        when "../enabled = ''true'' and ../type = ''term''";
        type string;
        config false;
        description
          "number of seconds the received terminal test signal is in sync.";
      }
    }
  }
}
', 'e774c57baac6242f10e8a9682687fad0157b02ef64a8df1c7bbf678e0f87c924', 'org-openroadm-maintenance-testsignal', '2017-12-15');
INSERT INTO public.yang_resource VALUES (22, 'org-openroadm-otn-common-types@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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 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 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
      "Identity for an ODUflex-cbr";
  }

  identity ODUflex-gfp {
    base odu-rate-identity;
    description
      "Identity for an ODUflex-gfp";
  }

  identity odtu-type-identity {
    description
      "A unique identification for the MSI odtu type.";
  }

  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 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";
  }
}
', '88d1353de84529851eb62303f856b28a5ef21bbee5deb7901bb701c4395d4cff', 'org-openroadm-otn-common-types', '2017-12-15');
INSERT INTO public.yang_resource VALUES (23, 'openroadm-devices-inventory@2018-01-18.yang', 'module openroadm-devices-inventory-v2 {
    yang-version 1;
    namespace "http://com/fujitsu/openroadm/devices/v2";
    prefix "owbiv2";

    import yang-ext {
      prefix ext;
      revision-date "2013-07-09";
    }

    import ietf-yang-types {prefix yangtypes;}

    import openroadm-devices-inventory-common {
      prefix owbi-common;
      revision-date  2016-10-14;
    }

    import org-openroadm-device {
      prefix org-openroadm-device;
      revision-date 2018-10-19;
    }
    import org-openroadm-interfaces {
      prefix openROADM-if;
      revision-date 2017-06-26;
    }
    import org-openroadm-ethernet-interfaces {
      prefix org-openroadm-eth-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-optical-channel-interfaces {
      prefix org-openroadm-optical-channel-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-optical-transport-interfaces {
      prefix org-openroadm-optical-transport-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-otn-odu-interfaces {
      prefix org-openroadm-otn-odu-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-otn-otu-interfaces {
      prefix org-openroadm-otn-otu-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-network-media-channel-interfaces {
      prefix org-openroadm-network-media-channel-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-media-channel-interfaces {
      prefix org-openroadm-media-channel-interfaces;
      revision-date 2018-10-19;
    }
    import org-openroadm-lldp {
      prefix org-openroadm-lldp;
      revision-date 2018-10-19;
    }
    import org-openroadm-rstp {
      prefix org-openroadm-rstp;
      revision-date 2018-10-19;
    }
    import org-openroadm-port-capability {
      prefix org-openroadm-port-capability;
      revision-date 2018-10-19;
    }
    import org-openroadm-pluggable-optics-holder-capability {
      prefix org-openroadm-pluggable-optics-holder-capability;
      revision-date 2018-10-19;
    }
    import common-types {
      prefix common-types;
    }

    organization "Fujitsu Network Communications";
    contact "SDN Development";

    revision 2018-01-18 {
        description "Initial revision of OWB device version 2.2 inventory model";
    }


    container openroadm-devices {
          list openroadm-device {
              description  "An openroadm device";
              key "device-id";
              uses owbi-common:openroadm-device-common;
              uses owbi-common:openroadm-device-ext-header-info;

              uses org-openroadm-device:org-openroadm-device-container {
                refine org-openroadm-device/info/node-type {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/info/vendor {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/info/openroadm-version {
                  config true;
                }
                refine org-openroadm-device/shelves/vendor {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/vendor {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/info/model {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/info/serial-id {
                  mandatory false;
                }
                refine org-openroadm-device/shelves/model {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/shelves/serial-id {
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/model {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/serial-id {
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/is-pluggable-optics {
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/circuit-pack-category/type {
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/ports/port-direction {
                  config true;
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/ports/operational-state {
                  mandatory false;
                }
                refine org-openroadm-device/circuit-packs/ports/label {
                  config true;
                }
                refine org-openroadm-device/degree/max-wavelengths {
                  mandatory false;
                }
                refine org-openroadm-device/shared-risk-group/current-provisioned-add-drop-ports {
                  mandatory false;
                }
                refine org-openroadm-device/shared-risk-group/max-add-drop-ports {
                  mandatory false;
                }
                refine org-openroadm-device/shared-risk-group/wavelength-duplication {
                  mandatory false;
                }
                 augment "org-openroadm-device/interface" {
                   when "type = ''openROADM-if:ethernetCsmacd''";
                   ext:augment-identifier "interface-ethernet";
                   uses org-openroadm-eth-interfaces:ethernet-container;
                 }
                 augment "org-openroadm-device/interface" {
                   when "type = ''openROADM-if:opticalChannel''";
                   ext:augment-identifier "interface-och";
                   uses org-openroadm-optical-channel-interfaces:och-container;
                 }
                 augment "org-openroadm-device/interface" {
                   when "type = ''openROADM-if:opticalTransport''";
                   ext:augment-identifier "interface-ots";
                   uses org-openroadm-optical-transport-interfaces:ots-container;
                 }
                 augment "org-openroadm-device/interface" {
                   when "type = ''openROADM-if:otnOdu''";
                   ext:augment-identifier "interface-odu";
                   uses org-openroadm-otn-odu-interfaces:odu-container;
                 }
                 augment "org-openroadm-device/interface" {
                   when "type = ''openROADM-if:otnOtu''";
                   ext:augment-identifier "interface-otu";
                   uses org-openroadm-otn-otu-interfaces:otu-container;
                 }
                 augment "org-openroadm-device/interface" {
		    when "type = ''openROADM-if:networkMediaChannelConnectionTerminationPoint''";
		    ext:augment-identifier "interface-nmcctp";
		    uses org-openroadm-network-media-channel-interfaces:nmc-ctp-container;
		  }
                  augment "org-openroadm-device/interface" {
                    when "type = ''openROADM-if:mediaChannelTrailTerminationPoint''";
                    ext:augment-identifier "interface-mcttp";
                    uses org-openroadm-media-channel-interfaces:mc-ttp-container;
                 }
                 augment "org-openroadm-device/circuit-packs/ports" {
                   ext:augment-identifier "ports-capability-grp";
                   uses org-openroadm-port-capability:port-capability-grp;
                 }
                 augment "org-openroadm-device/circuit-packs/cp-slots" {
                   ext:augment-identifier "poh-capability";
                   uses org-openroadm-pluggable-optics-holder-capability:pluggable-optics-holder-capability;
                 }
                 augment "org-openroadm-device/protocols" {
                   when "org-openroadm-device/info/node-type=''rdm'' or org-openroadm-device/info/node-type=''ila''";
                   ext:augment-identifier "protocol-rstp";
                   uses org-openroadm-rstp:rstp-container;
                 }
                 augment "org-openroadm-device/protocols" {
                   when "org-openroadm-device/info/node-type=''rdm'' or org-openroadm-device/info/node-type=''ila''";
                   ext:augment-identifier "protocol-lldp";
                   uses org-openroadm-lldp:lldp-container;
                 }
                 augment "org-openroadm-device/info" {
                   ext:augment-identifier "info-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/shelves" {
                   ext:augment-identifier "shelves-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/circuit-packs" {
                   ext:augment-identifier "cp-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/circuit-packs" {
                   ext:augment-identifier "cp-fw-managed-state";
                   leaf fw-managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/degree" {
                   ext:augment-identifier "degree-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/shared-risk-group" {
                   ext:augment-identifier "srg-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/interface" {
                   ext:augment-identifier "intf-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/physical-link" {
                   ext:augment-identifier "phy-link-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/protocols" {
                   when "org-openroadm-device/info/node-type=''rdm'' or org-openroadm-device/info/node-type=''ila''";
                   ext:augment-identifier "protocol-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device/xponder" {
                   when "org-openroadm-device/info/node-type=''xpdr''";
                   ext:augment-identifier "xpdr-managed-state";
                   leaf managed-state {
                     type common-types:managed-states;
                   }
                 }
                 augment "org-openroadm-device" {
                   ext:augment-identifier "pg-restriction-grp";
                   uses org-openroadm-port-capability:port-group-restriction-grp;
                 }
              }
            }
    }
}
', '2e26fa88c0345e88df0d06b7c483739575ce3792e2e13746eb20992ebf9d05d0', 'openroadm-devices-inventory-v2', '2018-01-18');
INSERT INTO public.yang_resource VALUES (24, 'org-openroadm-de-operations@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 equivalment if the restart was triggered another way.";
    uses org-openroadm-resource:resource;
  }
}
', '0b0e3e3273f02581aa5d30666902d26bb18035f0a0fc2b2f24c8654cae8cb9d2', 'org-openroadm-de-operations', '2018-10-19');
INSERT INTO public.yang_resource VALUES (25, 'org-openroadm-switching-pool-types@2017-12-15.yang', '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, 
      AT&T Intellectual Property.  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 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";
      }
    }
  }
}
', '7fe47a014b605a04bf844dd59abc0a2dfa74673ab1f88b6bfe0cb15f7f7e0192', 'org-openroadm-switching-pool-types', '2017-12-15');
INSERT INTO public.yang_resource VALUES (26, 'org-openroadm-pluggable-optics-holder-capability@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-port-capability {
    prefix org-openroadm-port-capability;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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;
      list supported-circuit-pack-types {
        key "supported-circuit-pack-type";
        leaf supported-circuit-pack-type {
          type string;
          mandatory true;
          description
            "Type of pluggable circuit-pack supported";
        }
        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;
  }
}
', '1fee39c9e41ad8052505d5b8f829c11aa327924ab1cdbb6029e2801a48ab2b12', 'org-openroadm-pluggable-optics-holder-capability', '2018-10-19');
INSERT INTO public.yang_resource VALUES (27, 'org-openroadm-wavelength-map@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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 ";
      }
    }
  }
}
', '149b63429a2759d41b63cbba261a930cacb38e259e7c4324ea0d1f91ba1c0462', 'org-openroadm-wavelength-map', '2017-12-15');
INSERT INTO public.yang_resource VALUES (28, 'org-openroadm-lldp@2018-10-19.yang', '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 2018-10-19;
  }
  import iana-afn-safi {
    prefix ianaaf;
    revision-date 2013-07-04;
  }
  import org-openroadm-resource-types {
    prefix org-openroadm-resource-types;
    revision-date 2018-10-19;
  }
  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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;
  }
}
', '970e43cf0379f97e9be1a78856467487319de1ebc0e1c4f326cc1e234075a77a', 'org-openroadm-lldp', '2018-10-19');
INSERT INTO public.yang_resource VALUES (34, 'org-openroadm-maintenance@2018-10-19.yang', 'module org-openroadm-maintenance {
  namespace "http://org/openroadm/maintenance";
  prefix org-openroadm-mainteance;

  import org-openroadm-resource {
    prefix org-openroadm-resource;
    revision-date 2018-10-19;
  }

  organization
    "Open ROADM MSA";
  contact
    "OpenROADM.org";
  description
    "YANG definitions of maintenace operations.
       
      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 maintenance-operation {
    type enumeration {
      enum "terminalLoopback" {
        value 1;
      }
      enum "facilityLoopback" {
        value 2;
      }
      enum "testSignal" {
        value 3;
      }
    }
    description
      "Maintenance Operation.";
  }

  grouping maintenance {
    leaf id {
      type string;
      mandatory true;
      description
        "Uniquely identify maintenance activity";
    }
    container resource {
      description
        "Resource under maintenance";
      uses org-openroadm-resource:resource;
    }
    leaf operation {
      type maintenance-operation;
    }
  }

  container maintenance-list {
    description
      "A list of active maintenance operations. Adding an entry to this list creates an active maintenance operation.  Removing an entry from this terminates a maintenance activity";
    list maintenance {
      key "id";
      uses maintenance;
    }
  }
}
', 'e194a83b5a5b704036cf1b44b47bd98c486448d9ae50e89d5fd684f31867b776', 'org-openroadm-maintenance', '2018-10-19');
INSERT INTO public.yang_resource VALUES (35, 'org-openroadm-resource-types@2018-10-19.yang', 'module org-openroadm-resource-types {
  namespace "http://org/openroadm/resource/types";
  prefix org-openroadm-resource-types;

  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 exhisting 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 highlyvolatile. ";
      }
      enum "resourceDeletion" {
        value 3;
        description
          "An exhisting 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-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";
    }
  }
}
', 'c99a32ac484fdfa5f07a238e99e558ea0cd712fd15b76d09338b990b6b691e22', 'org-openroadm-resource-types', '2018-10-19');
INSERT INTO public.yang_resource VALUES (36, 'org-openroadm-rstp@2018-10-19.yang', 'module org-openroadm-rstp {
  namespace "http://org/openroadm/rstp";
  prefix org-openroadm-rstp;

  import org-openroadm-device {
    prefix org-openroadm-device;
    revision-date 2018-10-19;
  }
  import org-openroadm-resource-types {
    prefix org-openroadm-resource-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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";
      list rstp-bridge-instance {
        key "bridge-name";
        max-elements "1";
        description
          "rstp bridge instance, max instance = 1";
        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;
  }
}
', '481cc645ee19ca384280fd989a2f40b2616342d0999ef193508fd88db41b7e92', 'org-openroadm-rstp', '2018-10-19');
INSERT INTO public.yang_resource VALUES (37, 'org-openroadm-common-types@2018-10-19.yang', '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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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";
  }

  identity och-rate-identity {
    description
      "A unique och rate identification";
  }

  identity R200G {
    base och-rate-identity;
    description
      "Identity for 200G Rate";
  }

  identity R100G {
    base och-rate-identity;
    description
      "Identity for 100G Rate";
  }

  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 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 plugable";
  }

  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 identifer for a device.";
  }

  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 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 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 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) ";
  }

  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";
  }

  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 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.
           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 rollBackTimer expires;
             2) when the user issues cancel-rollback-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 "2.2.1" {
        value 8;
        description
          "value for 2.2";
      }
    }
    description
      "OpenROADM version enum type";
  }

  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;
      }
    }
    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 fullfill its role - carry traffic, etc.";
  }

  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;
      }
    }
  }

  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.";
  }

  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;
      }
    }
  }

  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 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;
      }
    }
  }

  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";
  }

  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;
    }
  }

  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 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 vendorExtension";
    }
  }
}
', '0cd1e7ae0561d3aa6e46a1b5c1a58efe6fbe24745daa04643e1abde1c8d88ed4', 'org-openroadm-common-types', '2018-10-19');
INSERT INTO public.yang_resource VALUES (38, 'common-types.yang', 'module common-types {
  yang-version 1;
  namespace "urn:fujitsu:params:xml:ns:yang:common-types";
  prefix "common-types";

  organization "Fujitsu Network Communications";
  contact "SDN Development";
   
  revision "2016-12-13" {
    description "Initial revision";
  }
   
  typedef managed-states {
    description
      "managed-states: planned, deploying, deployed, deployed-augmented, deployed-updating";
    type enumeration {
      enum planned;
      enum deploying;
      enum deployed;
      enum deployed-augmented;
      enum deployed-updating;
    }
  }
}
', '3f5ea5e33c3552af19c424ac677e70d4547e6e8c7da8f3430181db17d6dabaf2', 'common-types', '2016-12-13');
INSERT INTO public.yang_resource VALUES (39, 'openroadm-devices-inventory-common.yang', 'module openroadm-devices-inventory-common {
    yang-version 1;
    namespace "http://com/fujitsu/openroadm/devices/common";
    prefix "owbi-common";
    
    import yang-ext {
      prefix ext; 
      revision-date "2013-07-09";
    }

    import ietf-yang-types {prefix yangtypes;}

    import common-types {
      prefix common-types;
    }

    organization "Fujitsu Network Communications";
    contact "SDN Development";

    revision 2016-10-14 {
      description "Initial revision of the base owb roadm device inventory model";        
    }   
    
      
    grouping ne-status {
      leaf status{
        description "NE discovery status.";
        type enumeration {
             enum success;
             enum fail;
        }
      }

      leaf reason {

        description "Reason for failure.";
        type string;
      }
    }

    grouping openroadm-device-common {
      leaf device-id {
        type string;  
      }
      leaf ne-state {
        description "State of the NE";
        type enumeration {
          enum temporary;
          enum jeopardy;
          enum inservice;
          enum unmanaged;
        }
      }
      uses ne-status;
      leaf commission-date-time {
        type yangtypes:date-and-time;
        description
          "Indicates the date and time at which this Network Element commissioned successfully.";
      }
    }

    grouping openroadm-device-ext-header-info {
      leaf temp-ip
      {
        description "DHCP server assigned temporary ip address for the temporary node.";
        type string;
	config true;
      }
      leaf correlation-id
      {
        description "Identifier used to correlate resource create/delete/modify request with one or more responses.";
        type string;
        config true;
      }
      leaf notification-url
      {
	description "Callback url used by VNC to notify external clients.";
	type string;
	config true;
      }
      leaf system-id
      {
        description "System identification of external server for notification from VNC.";
        type string;
	config true;
      }
      leaf api-version
      {
        type string;
        config true;
        description
          "Indicates the url corresponding to the MSA model used by PED to push the planned data.";
      }
      leaf old-openroadm-version
      {
        type string;
        config true;
        description
          "Indicates the previous openroadm-version used to determine whether to run certain tasks as part of ZTP/SWDL proceses.";
      }
      leaf managed-state
      {
        type common-types:managed-states;
        config true;
        description
          "Indicates the current state of the device in the ZTP process.";
      }
      leaf swdl-managed-state
      {
        type common-types:managed-states;
        config true;
        description
          "Indicates the current state of the device with respect to the SWDL process.";
      }
      leaf prov-managed-state
      {
        type common-types:managed-states;
        config true;
        description
          "Indicates the current provisioning state of the device in the ZTP process.";
      }
      leaf swdl-software-version {
        type string;
        config true;
        description "Indicates the software-version used for SWDL of replacement blades.";
      }
    }

    notification owb-device-change {
      description "OWB Resource change notification";

      leaf device-id {
        type string;
      }

      leaf owb-model-version {
        type string;
        description "The major version number of the OWB model";
      }

      leaf action {
        type enumeration {
          enum create;
          enum delete;
          enum update;
        }
      }

      leaf entity-xpath {
        type string;
        description "The xpath location in MDSAL of the affected entity";
      }

      leaf parent-entity-xpath {
        type string;
        description "The xpath location of the parent entity (if applicable) in MDSAL for the affected entity";
      }

      leaf aid {
        type string;
        description "The AID of the resource that has been affected";
      }

      leaf entity-type {
        type string;
        description "The type of the entity that got affected";
      }

      leaf entity-keyname {
        type string;
        description "The key name to query the entity";
      }

      leaf parent-aid {
        type string;
        description "The parent AID of the resource that has been affected if applicable";
      }

      leaf parent-entity-type {
        type string;
        description "The parent entity type for the affected entity if applicable";
      }

      leaf parent-entity-keyname {
        type string;
        description "The parent key name to query the parent entity if applicable";
      }

      leaf source-tag {
        type string;
        description "Indicates the source (application) of the conntroller which triggers the notification.
                     Empty source tag indicates the noticiation is triggered outside of the controller";
      }
    }
}
', '7f0cdc01d6754ea0c93c9c3c8e2576d3c8f3f3a7c7ce6225ebdfbe037da99fe4', 'openroadm-devices-inventory-common', '2016-10-14');
INSERT INTO public.yang_resource VALUES (40, 'iana-afn-safi@2013-07-04.yang', 'module iana-afn-safi {
  namespace "urn:ietf:params:xml:ns:yang:iana-afn-safi";
  prefix "ianaaf";

  organization
    "IANA";
  contact
    "        Internet Assigned Numbers Authority

     Postal: ICANN
             4676 Admiralty Way, Suite 330
             Marina del Rey, CA 90292

     Tel:    +1 310 823 9358
     E-Mail: iana&iana.org";
  description
    "This YANG module provides two typedefs containing YANG
     definitions for the following IANA-registered enumerations:

     - Address Family Numbers (AFN)

     - Subsequent Address Family Identifiers (SAFI)

     The latest revision of this YANG module can be obtained from the
     IANA web site.

     Copyright (c) 2012 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).

     This version of this YANG module is part of RFC XXXX; see the
     RFC itself for full legal notices.";
  // RFC Ed.: replace XXXX with actual RFC number and remove this
  // note.

  // RFC Ed.: update the date below with the date of RFC publication
  // and remove this note.
  revision 2013-07-04 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: IANA Address Family Numbers and
                 Subsequent Address Family Identifiers YANG Module";
  }

  typedef address-family {
    type enumeration {
      // value 0 is reserved by IANA
      enum ipV4 {
        value "1";
        description
          "IP version 4";
      }
      enum ipV6 {
        value "2";
        description
          "IP version 6";
      }
      enum nsap {
        value "3";
        description
          "NSAP";
      }
      enum hdlc {
        value "4";
        description
          "HDLC (8-bit multidrop)";
      }
      enum bbn1822 {
        value "5";
        description
          "BBN 1822";
      }
      enum all802 {
        value "6";
        description
          "802 (includes all 802 media plus Ethernet ''canonical
           format'')";
      }
      enum e163 {
        value "7";
        description
          "E.163";
      }
      enum e164 {
        value "8";
        description
          "E.164 (SMDS, FrameRelay, ATM)";
      }
      enum f69 {
        value "9";
        description
          "F.69 (Telex)";
      }
      enum x121 {
        value "10";
        description
          "X.121 (X.25, Frame Relay)";
      }
      enum ipx {
        value "11";
        description
          "IPX (Internetwork Packet Exchange)";
      }
      enum appletalk {
        value "12";
        description
          "Appletalk";
      }
      enum decnetIV {
        value "13";
        description
          "DECnet IV";
      }
      enum banyanVines {
        value "14";
        description
          "Banyan Vines";
      }
      enum e164withNsap {
        value "15";
        description
          "E.164 with NSAP format subaddress";
        reference
          "ATM Forum UNI 3.1";
      }
      enum dns {
        value "16";
        description
          "DNS (Domain Name System)";
      }
      enum distinguishedName {
        value "17";
        description
          "Distinguished Name (per X.500)";
      }
      enum asNumber {
        value "18";
        description
          "Autonomous System Number";
      }
      enum xtpOverIpv4 {
        value "19";
        description
          "XTP over IP version 4";
      }
      enum xtpOverIpv6 {
        value "20";
        description
          "XTP over IP version 6";
      }
      enum xtpNativeModeXTP {
        value "21";
        description
          "XTP native mode XTP";
      }
      enum fibreChannelWWPN {
        value "22";
        description
          "Fibre Channel World-Wide Port Name";
      }
      enum fibreChannelWWNN {
        value "23";
        description
          "Fibre Channel World-Wide Node Name";
      }
      enum gwid {
        value "24";
        description
          "Gateway Identifier";
      }
      // FIXME: This one is actually called "afi" in the MIB, but
      // that must be a mistake.
      enum l2vpn {
        value "25";
        description
          "AFI for L2VPN information";
        reference
          "RFC 4761: Virtual Private LAN Service (VPLS): Using BGP
           for Auto-Discovery and Signaling

           RFC 6074: Provisioning, Auto-Discovery, and Signaling in
           Layer 2 Virtual Private Networks (L2VPNs)";
      }
      enum mplsTpSectionEndpointIdentifier {
        value "26";
        description
          "MPLS-TP Section Endpoint Identifier";
        reference
          "draft-ietf-mpls-gach-adv";
      }
      enum mplsTpLspEndpointIdentifier {
        value "27";
        description
          "MPLS-TP LSP Endpoint Identifier";
        reference
          "draft-ietf-mpls-gach-adv";
      }
      enum mplsTpPseudowireEndpointIdentifier {
        value "28";
        description
          "MPLS-TP Pseudowire Endpoint Identifier";
        reference
          "draft-ietf-mpls-gach-adv";
      }
      enum eigrpCommonServiceFamily {
        value "16384";
        description
          "EIGRP Common Service Family";
      }
      enum eigrpIpv4ServiceFamily {
        value "16385";
        description
          "EIGRP IPv4 Service Family";
      }
      enum eigrpIpv6ServiceFamily {
        value "16386";
        description
          "EIGRP IPv6 Service Family";
      }
      enum lispCanonicalAddressFormat {
        value "16387";
        description
          "LISP Canonical Address Format (LCAF)";
      }
      enum bgpLs {
        value "16388";
        description
          "BGP-LS";
        reference
          "draft-ietf-idr-ls-distribution";
      }
      enum 48BitMac {
        value "16389";
        description
          "48-bit MAC";
        reference
          "draft-eastlake-rfc5342bis";
      }
      enum 64BitMac {
        value "16390";
        description
          "64-bit MAC";
        reference
          "draft-eastlake-rfc5342bis";
      }
      // value 65535 is reserved by IANA
    }
    description
      "This typedef is a YANG enumeration of IANA-registered address
       family numbers (AFN).";
    reference
      "IANA Address Family Numbers registry.
       <http://www.iana.org/assignments/address-family-numbers>";
  }

  typedef subsequent-address-family {
    type enumeration {
      // value 0 is reserved by IANA
      enum nlriUnicast {
        value "1";
        description
          "Network Layer Reachability Information used for unicast
           forwarding";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum nlriMulticast {
        value "2";
        description
          "Network Layer Reachability Information used for multicast
           forwarding";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      // value 3 is reserved by IANA
      enum nlriMpls {
        value "4";
        description
          "Network Layer Reachability Information (NLRI) with MPLS
           Labels";
        reference
          "RFC 3107: Carrying Label Information in BGP-4";
      }
      enum mcastVpn {
        value "5";
        description
          "MCAST-VPN";
        reference
          "RFC 6514: BGP Encodings and Procedures for Multicast in
           MPLS/BGP IP VPNs";
      }
      enum nlriDynamicMsPw {
        value "6";
        status "obsolete";
        description
          "Network Layer Reachability Information used for Dynamic
           Placement of Multi-Segment Pseudowires (TEMPORARY -
           Expires 2008-08-23)";
        reference
          "draft-ietf-pwe3-dynamic-ms-pw: Dynamic Placement of Multi
           Segment Pseudowires";
      }
      enum encapsulation {
        value "7";
        description
          "Encapsulation SAFI";
        reference
          "RFC 5512: The BGP Encapsulation Subsequent Address Family
           Identifier (SAFI) and the BGP Tunnel Encapsulation
           Attribute";
      }
      enum tunnel {
        value "64";
        status "obsolete";
        description
          "Tunnel SAFI";
        reference
          "draft-nalawade-kapoor-tunnel-safi: BGP Tunnel SAFI";
      }
      enum vpls {
        value "65";
        description
          "Virtual Private LAN Service (VPLS)";
        reference
          "RFC 4761: Virtual Private LAN Service (VPLS): Using BGP
           for Auto-Discovery and Signaling

           RFC 6074: Provisioning, Auto-Discovery, and Signaling in
           Layer 2 Virtual Private Networks (L2VPNs)";
      }
      enum bgpMdt {
        value "66";
        description
          "BGP MDT SAFI";
        reference
          "RFC 6037: Cisco Systems'' Solution for Multicast in
           BGP/MPLS IP VPNs";
      }
      enum bgp4over6 {
        value "67";
        description
          "BGP 4over6 SAFI";
        reference
          "RFC 5747: 4over6 Transit Solution Using IP Encapsulation
           and MP-BGP Extensions";
      }
      enum bgp6over4 {
        value "68";
        description
          "BGP 6over4 SAFI";
      }
      enum l1VpnAutoDiscovery {
        value "69";
        description
          "Layer-1 VPN auto-discovery information";
        reference
          "RFC 5195: BGP-Based Auto-Discovery for Layer-1 VPNs";
      }
      enum mplsVpn {
        value "128";
        description
          "MPLS-labeled VPN address";
        reference
          "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)";
      }
      enum multicastBgpMplsVpn {
        value "129";
        description
          "Multicast for BGP/MPLS IP Virtual Private Networks
           (VPNs)";
        reference
          "RFC 6513: Multicast in MPLS/BGP IP VPNs

           RFC 6514: BGP Encodings and Procedures for Multicast in
           MPLS/BGP IP VPNs";
      }
      // values 130-131 are reserved by IANA
      enum routeTargetConstraints {
        value "132";
        description
          "Route Target constraints";
        reference
          "RFC 4684: Constrained Route Distribution for Border
           Gateway Protocol/MultiProtocol Label Switching (BGP/MPLS)
           Internet Protocol (IP) Virtual Private Networks (VPNs)";
      }
      enum ipv4DissFlow {
        value "133";
        description
          "IPv4 dissemination of flow specification rules";
        reference
          "RFC 5575: Dissemination of Flow Specification Rules";
      }
      enum vpnv4DissFlow {
        value "134";
        description
          "VPNv4 dissemination of flow specification rules";
        reference
          "RFC 5575: Dissemination of Flow Specification Rules";
      }
      // values 135-139 are reserved by IANA
      enum vpnAutoDiscovery {
        value "140";
        status "obsolete";
        description
          "VPN auto-discovery";
        reference
          "draft-ietf-l3vpn-bgpvpn-auto: Using BGP as an
           Auto-Discovery Mechanism for VR-based Layer-3 VPNs";
      }
      // values 141-240 are reserved by IANA
      enum private241 {
        value "241";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private242 {
        value "242";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private243 {
        value "243";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private244 {
        value "244";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private245 {
        value "245";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private246 {
        value "246";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private247 {
        value "247";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private248 {
        value "248";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private249 {
        value "249";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private250 {
        value "250";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private251 {
        value "251";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private252 {
        value "252";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private253 {
        value "253";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      enum private254 {
        value "254";
        description
          "Reserved for Private Use";
        reference
          "RFC 4760: Multiprotocol Extensions for BGP-4";
      }
      // value 255 is reserved by IANA
    }
    description
      "This typedef is a YANG enumeration of IANA-registered
       subsequent address family identifiers (SAFI).";
    reference
      "IANA SAFI Values registry.
       <http://www.iana.org/assignments/safi-namespace>";
  }
}
', 'db3a2afc8c4d88e29f2cbfe9e855a3d783057d5baa1f2473cc1688f3c4e3e26f', 'iana-afn-safi', '2013-07-04');
INSERT INTO public.yang_resource VALUES (41, 'org-openroadm-otn-otu-interfaces@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-maintenance-loopback {
    prefix org-openroadm-maint-loopback;
    revision-date 2017-12-15;
  }
  import org-openroadm-otn-common {
    prefix org-openroadm-otn-common;
    revision-date 2017-06-26;
  }
  import org-openroadm-otn-common-types {
    prefix org-openroadm-otn-common-types;
    revision-date 2017-12-15;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 fec {
      type enumeration {
        enum "off" {
          value 0;
          description
            "fec off";
        }
        enum "rsfec" {
          value 1;
          description
            "rsfec";
        }
        enum "sdfeca1" {
          value 2;
          description
            "Clariphy SDFEC";
        }
        enum "efec" {
          value 3;
          description
            "G.975.1 I.4";
        }
        enum "ufec" {
          value 4;
          description
            "G.975.1 I.7";
        }
        enum "sdfec" {
          value 5;
          description
            "Soft decision FEC";
        }
        enum "sdfecb1" {
          value 6;
          description
            "SDFEC with SCFEC";
        }
        enum "scfec" {
          value 7;
          description
            "Stair case FEC";
        }
      }
      description
        "Forward Error Correction";
    }
    uses org-openroadm-otn-common:trail-trace;
    uses org-openroadm-otn-common: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;
  }
}
', 'bad998115979bb7098d5b877cb3935f4e2be4ada49bf13d56bf84e3205e493ce', 'org-openroadm-otn-otu-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (42, 'org-openroadm-user-mgmt@2017-12-15.yang', '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, 
      AT&T Intellectual Property.  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 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";
      }
    }
  }
}
', '4b1ae430ae86334534c821f271a05645ae207e9e1e60658664ce09350a15a149', 'org-openroadm-user-mgmt', '2017-12-15');
INSERT INTO public.yang_resource VALUES (43, 'org-openroadm-media-channel-interfaces@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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-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-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-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-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;
  }
}
', 'f4993a073534e10d4571fccf0c6bb64540be3a636c7e9c289f14c72a7effa347', 'org-openroadm-media-channel-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (44, 'ietf-inet-types@2013-07-15.yang', 'module ietf-inet-types {

  namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
  prefix "inet";

  organization
   "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

  contact
   "WG Web:   <http://tools.ietf.org/wg/netmod/>
    WG List:  <mailto:netmod@ietf.org>

    WG Chair: David Kessens
              <mailto:david.kessens@nsn.com>

    WG Chair: Juergen Schoenwaelder
              <mailto:j.schoenwaelder@jacobs-university.de>

    Editor:   Juergen Schoenwaelder
              <mailto:j.schoenwaelder@jacobs-university.de>";

  description
   "This module contains a collection of generally useful derived
    YANG data types for Internet addresses and related things.

    Copyright (c) 2013 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).

    This version of this YANG module is part of RFC 6991; see
    the RFC itself for full legal notices.";

  revision 2013-07-15 {
    description
     "This revision adds the following new data types:
      - ip-address-no-zone
      - ipv4-address-no-zone
      - ipv6-address-no-zone";
    reference
     "RFC 6991: Common YANG Data Types";
  }

  revision 2010-09-24 {
    description
     "Initial revision.";
    reference
     "RFC 6021: Common YANG Data Types";
  }

  /*** collection of types related to protocol fields ***/

  typedef ip-version {
    type enumeration {
      enum unknown {
        value "0";
        description
         "An unknown or unspecified version of the Internet
          protocol.";
      }
      enum ipv4 {
        value "1";
        description
         "The IPv4 protocol as defined in RFC 791.";
      }
      enum ipv6 {
        value "2";
        description
         "The IPv6 protocol as defined in RFC 2460.";
      }
    }
    description
     "This value represents the version of the IP protocol.

      In the value set and its semantics, this type is equivalent
      to the InetVersion textual convention of the SMIv2.";
    reference
     "RFC  791: Internet Protocol
      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
      RFC 4001: Textual Conventions for Internet Network Addresses";
  }

  typedef dscp {
    type uint8 {
      range "0..63";
    }
    description
     "The dscp type represents a Differentiated Services Code Point
      that may be used for marking packets in a traffic stream.
      In the value set and its semantics, this type is equivalent
      to the Dscp textual convention of the SMIv2.";
    reference
     "RFC 3289: Management Information Base for the Differentiated
                Services Architecture
      RFC 2474: Definition of the Differentiated Services Field
                (DS Field) in the IPv4 and IPv6 Headers
      RFC 2780: IANA Allocation Guidelines For Values In
                the Internet Protocol and Related Headers";
  }

  typedef ipv6-flow-label {
    type uint32 {
      range "0..1048575";
    }
    description
     "The ipv6-flow-label type represents the flow identifier or Flow
      Label in an IPv6 packet header that may be used to
      discriminate traffic flows.

      In the value set and its semantics, this type is equivalent
      to the IPv6FlowLabel textual convention of the SMIv2.";
    reference
     "RFC 3595: Textual Conventions for IPv6 Flow Label
      RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
  }

  typedef port-number {
    type uint16 {
      range "0..65535";
    }
    description
     "The port-number type represents a 16-bit port number of an
      Internet transport-layer protocol such as UDP, TCP, DCCP, or
      SCTP.  Port numbers are assigned by IANA.  A current list of
      all assignments is available from <http://www.iana.org/>.

      Note that the port number value zero is reserved by IANA.  In
      situations where the value zero does not make sense, it can
      be excluded by subtyping the port-number type.
      In the value set and its semantics, this type is equivalent
      to the InetPortNumber textual convention of the SMIv2.";
    reference
     "RFC  768: User Datagram Protocol
      RFC  793: Transmission Control Protocol
      RFC 4960: Stream Control Transmission Protocol
      RFC 4340: Datagram Congestion Control Protocol (DCCP)
      RFC 4001: Textual Conventions for Internet Network Addresses";
  }

  /*** collection of types related to autonomous systems ***/

  typedef as-number {
    type uint32;
    description
     "The as-number type represents autonomous system numbers
      which identify an Autonomous System (AS).  An AS is a set
      of routers under a single technical administration, using
      an interior gateway protocol and common metrics to route
      packets within the AS, and using an exterior gateway
      protocol to route packets to other ASes.  IANA maintains
      the AS number space and has delegated large parts to the
      regional registries.

      Autonomous system numbers were originally limited to 16
      bits.  BGP extensions have enlarged the autonomous system
      number space to 32 bits.  This type therefore uses an uint32
      base type without a range restriction in order to support
      a larger autonomous system number space.

      In the value set and its semantics, this type is equivalent
      to the InetAutonomousSystemNumber textual convention of
      the SMIv2.";
    reference
     "RFC 1930: Guidelines for creation, selection, and registration
                of an Autonomous System (AS)
      RFC 4271: A Border Gateway Protocol 4 (BGP-4)
      RFC 4001: Textual Conventions for Internet Network Addresses
      RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
                Number Space";
  }

  /*** collection of types related to IP addresses and hostnames ***/

  typedef ip-address {
    type union {
      type inet:ipv4-address;
      type inet:ipv6-address;
    }
    description
     "The ip-address type represents an IP address and is IP
      version neutral.  The format of the textual representation
      implies the IP version.  This type supports scoped addresses
      by allowing zone identifiers in the address format.";
    reference
     "RFC 4007: IPv6 Scoped Address Architecture";
  }

  typedef ipv4-address {
    type string {
      pattern
        ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}''
      +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
      + ''(%[\p{N}\p{L}]+)?'';
    }
    description
      "The ipv4-address type represents an IPv4 address in
       dotted-quad notation.  The IPv4 address may include a zone
       index, separated by a % sign.

       The zone index is used to disambiguate identical address
       values.  For link-local addresses, the zone index will
       typically be the interface index number or the name of an
       interface.  If the zone index is not present, the default
       zone of the device will be used.

       The canonical format for the zone index is the numerical
       format";
  }

  typedef ipv6-address {
    type string {
      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}''
            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
            + ''(%[\p{N}\p{L}]+)?'';
      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|''
            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
            + ''(%.+)?'';
    }
    description
     "The ipv6-address type represents an IPv6 address in full,
      mixed, shortened, and shortened-mixed notation.  The IPv6
      address may include a zone index, separated by a % sign.

      The zone index is used to disambiguate identical address
      values.  For link-local addresses, the zone index will
      typically be the interface index number or the name of an
      interface.  If the zone index is not present, the default
      zone of the device will be used.

      The canonical format of IPv6 addresses uses the textual
      representation defined in Section 4 of RFC 5952.  The
      canonical format for the zone index is the numerical
      format as described in Section 11.2 of RFC 4007.";
    reference
     "RFC 4291: IP Version 6 Addressing Architecture
      RFC 4007: IPv6 Scoped Address Architecture
      RFC 5952: A Recommendation for IPv6 Address Text
                Representation";
  }

  typedef ip-address-no-zone {
    type union {
      type inet:ipv4-address-no-zone;
      type inet:ipv6-address-no-zone;
    }
    description
     "The ip-address-no-zone type represents an IP address and is
      IP version neutral.  The format of the textual representation
      implies the IP version.  This type does not support scoped
      addresses since it does not allow zone identifiers in the
      address format.";
    reference
     "RFC 4007: IPv6 Scoped Address Architecture";
  }

  typedef ipv4-address-no-zone {
    type inet:ipv4-address {
      pattern ''[0-9\.]*'';
    }
    description
      "An IPv4 address without a zone index.  This type, derived from
       ipv4-address, may be used in situations where the zone is
       known from the context and hence no zone index is needed.";
  }

  typedef ipv6-address-no-zone {
    type inet:ipv6-address {
      pattern ''[0-9a-fA-F:\.]*'';
    }
    description
      "An IPv6 address without a zone index.  This type, derived from
       ipv6-address, may be used in situations where the zone is
       known from the context and hence no zone index is needed.";
    reference
     "RFC 4291: IP Version 6 Addressing Architecture
      RFC 4007: IPv6 Scoped Address Architecture
      RFC 5952: A Recommendation for IPv6 Address Text
                Representation";
  }

  typedef ip-prefix {
    type union {
      type inet:ipv4-prefix;
      type inet:ipv6-prefix;
    }
    description
     "The ip-prefix type represents an IP prefix and is IP
      version neutral.  The format of the textual representations
      implies the IP version.";
  }

  typedef ipv4-prefix {
    type string {
      pattern
         ''(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}''
       +  ''([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])''
       + ''/(([0-9])|([1-2][0-9])|(3[0-2]))'';
    }
    description
     "The ipv4-prefix type represents an IPv4 address prefix.
      The prefix length is given by the number following the
      slash character and must be less than or equal to 32.

      A prefix length value of n corresponds to an IP address
      mask that has n contiguous 1-bits from the most
      significant bit (MSB) and all other bits set to 0.

      The canonical format of an IPv4 prefix has all bits of
      the IPv4 address set to zero that are not part of the
      IPv4 prefix.";
  }

  typedef ipv6-prefix {
    type string {
      pattern ''((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}''
            + ''((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|''
            + ''(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}''
            + ''(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))''
            + ''(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'';
      pattern ''(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|''
            + ''((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)''
            + ''(/.+)'';
    }
    description
     "The ipv6-prefix type represents an IPv6 address prefix.
      The prefix length is given by the number following the
      slash character and must be less than or equal to 128.

      A prefix length value of n corresponds to an IP address
      mask that has n contiguous 1-bits from the most
      significant bit (MSB) and all other bits set to 0.

      The IPv6 address should have all bits that do not belong
      to the prefix set to zero.

      The canonical format of an IPv6 prefix has all bits of
      the IPv6 address set to zero that are not part of the
      IPv6 prefix.  Furthermore, the IPv6 address is represented
      as defined in Section 4 of RFC 5952.";
    reference
     "RFC 5952: A Recommendation for IPv6 Address Text
                Representation";
  }

  /*** collection of domain name and URI types ***/

  typedef domain-name {
    type string {
      pattern
        ''((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*''
      + ''([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)''
      + ''|\.'';
      length "1..253";
    }
    description
     "The domain-name type represents a DNS domain name.  The
      name SHOULD be fully qualified whenever possible.

      Internet domain names are only loosely specified.  Section
      3.5 of RFC 1034 recommends a syntax (modified in Section
      2.1 of RFC 1123).  The pattern above is intended to allow
      for current practice in domain name use, and some possible
      future expansion.  It is designed to hold various types of
      domain names, including names used for A or AAAA records
      (host names) and other records, such as SRV records.  Note
      that Internet host names have a stricter syntax (described
      in RFC 952) than the DNS recommendations in RFCs 1034 and
      1123, and that systems that want to store host names in
      schema nodes using the domain-name type are recommended to
      adhere to this stricter standard to ensure interoperability.

      The encoding of DNS names in the DNS protocol is limited
      to 255 characters.  Since the encoding consists of labels
      prefixed by a length bytes and there is a trailing NULL
      byte, only 253 characters can appear in the textual dotted
      notation.

      The description clause of schema nodes using the domain-name
      type MUST describe when and how these names are resolved to
      IP addresses.  Note that the resolution of a domain-name value
      may require to query multiple DNS records (e.g., A for IPv4
      and AAAA for IPv6).  The order of the resolution process and
      which DNS record takes precedence can either be defined
      explicitly or may depend on the configuration of the
      resolver.

      Domain-name values use the US-ASCII encoding.  Their canonical
      format uses lowercase US-ASCII characters.  Internationalized
      domain names MUST be A-labels as per RFC 5890.";
    reference
     "RFC  952: DoD Internet Host Table Specification
      RFC 1034: Domain Names - Concepts and Facilities
      RFC 1123: Requirements for Internet Hosts -- Application
                and Support
      RFC 2782: A DNS RR for specifying the location of services
                (DNS SRV)
      RFC 5890: Internationalized Domain Names in Applications
                (IDNA): Definitions and Document Framework";
  }

  typedef host {
    type union {
      type inet:ip-address;
      type inet:domain-name;
    }
    description
     "The host type represents either an IP address or a DNS
      domain name.";
  }

  typedef uri {
    type string;
    description
     "The uri type represents a Uniform Resource Identifier
      (URI) as defined by STD 66.

      Objects using the uri type MUST be in US-ASCII encoding,
      and MUST be normalized as described by RFC 3986 Sections
      6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
      percent-encoding is removed, and all case-insensitive
      characters are set to lowercase except for hexadecimal
      digits, which are normalized to uppercase as described in
      Section 6.2.2.1.

      The purpose of this normalization is to help provide
      unique URIs.  Note that this normalization is not
      sufficient to provide uniqueness.  Two URIs that are
      textually distinct after this normalization may still be
      equivalent.

      Objects using the uri type may restrict the schemes that
      they permit.  For example, ''data:'' and ''urn:'' schemes
      might not be appropriate.

      A zero-length URI is not a valid URI.  This can be used to
      express ''URI absent'' where required.

      In the value set and its semantics, this type is equivalent
      to the Uri SMIv2 textual convention defined in RFC 5017.";
    reference
     "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
      RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
                Group: Uniform Resource Identifiers (URIs), URLs,
                and Uniform Resource Names (URNs): Clarifications
                and Recommendations
      RFC 5017: MIB Textual Conventions for Uniform Resource
                Identifiers (URIs)";
  }

}
', 'bbeb14124851e2bdc6e288b352c64419b3253ab63c6f4a6d0519695068ae0e40', 'ietf-inet-types', '2013-07-15');
INSERT INTO public.yang_resource VALUES (45, 'org-openroadm-swdl@2018-10-19.yang', '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 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 {
    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";
    }
  }

  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;
  }
}
', 'a7a3a86153ac4beb05ded9a697f53ac3bd037436181a96c9180e3872a0fbfd45', 'org-openroadm-swdl', '2018-10-19');
INSERT INTO public.yang_resource VALUES (46, 'org-openroadm-pm@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-resource {
    prefix org-openroadm-resource;
    revision-date 2018-10-19;
  }
  import org-openroadm-resource-types {
    prefix org-openroadm-resource-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-pm-types {
    prefix org-openroadm-pm-types;
    revision-date 2017-12-15;
  }

  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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 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 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-types:location;
    }
    leaf direction {
      type org-openroadm-common-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-types:location;
    }
    leaf direction {
      type org-openroadm-common-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";
      }
      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 minitues PM";
      }
    }
    output {
      uses collect-history-pm-group;
    }
  }
  notification historical-pm-collect-result {
    description
      "This Notification is sent when the pm collection is succesful 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";
      uses current-pm-group;
    }
  }
  container historical-pm-list {
    config false;
    description
      "List of historical PM";
    list historical-pm-entry {
      key "pm-resource-type pm-resource-type-extension pm-resource-instance";
      uses historical-pm-group;
    }
  }
}
', '66f8551410261a4a48fcccc308d2952e6963a689a25c0b27dc3fa57ab816920c', 'org-openroadm-pm', '2018-10-19');
INSERT INTO public.yang_resource VALUES (47, 'org-openroadm-fwdl@2018-10-19.yang', '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 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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";
      }
    }
    output {
      uses org-openroadm-common-types:rpc-response-status;
    }
  }
}
', '1b3323f61ec786f1a38fb564efd51ce4a8c40243566b8d5bfec7564c566bc815', 'org-openroadm-fwdl', '2018-10-19');
INSERT INTO public.yang_resource VALUES (48, 'org-openroadm-manifest-file@2017-12-15.yang', '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, 
     AT&T Intellectual Property.  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 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 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";
  }

  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 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 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 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;
        }
      }
    }
  }
  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;
      }
    }
  }
}
', 'af7e141a44e5086dd1151d3048fff508abb5221dd123d00fd1843d58253ec981', 'org-openroadm-manifest-file', '2017-12-15');
INSERT INTO public.yang_resource VALUES (49, 'org-openroadm-device@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-resource-types {
    prefix org-openroadm-resource-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-physical-types {
    prefix org-openroadm-physical-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-user-mgmt {
    prefix org-openroadm-user-mgmt;
    revision-date 2017-12-15;
  }
  import org-openroadm-port-types {
    prefix org-openroadm-port-types;
    revision-date 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix org-openroadm-interfaces;
    revision-date 2017-06-26;
  }
  import org-openroadm-swdl {
    prefix org-openroadm-swdl;
    revision-date 2018-10-19;
  }
  import org-openroadm-equipment-states-types {
    prefix org-openroadm-equipment-states-types;
    revision-date 2017-12-15;
  }
  import org-openroadm-switching-pool-types {
    prefix org-openroadm-switching-pool-types;
    revision-date 2017-12-15;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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";
  }

  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-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-common-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 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+ ";
    }
    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;
          description
            "Slot is empty and expected type is provisioned";
        }
        enum "empty-prov-mismatch" {
          value 3;
          description
            "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";
        }
      }
    }
  }

  grouping shelves {
    list shelves {
      key "shelf-name";
      uses shelf;
    }
  }

  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 administrative-state {
      type org-openroadm-equipment-states-types:admin-states;
      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 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 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 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 administrative-state {
      type org-openroadm-equipment-states-types:admin-states;
      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-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 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-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-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-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 degree {
    leaf degree-number {
      type uint16;
      must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" {
        error-message "Degree not supported by device ";
        description
          "Validating if the degree is supported by device";
      }
    }
    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-g;
  }

  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-types:amplifier-types;
      config false;
      mandatory true;
      description
        "Amplifier type";
    }
    leaf control-mode {
      type org-openroadm-common-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-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-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-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-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-types:ratio-dB;
      config false;
      description
        "Used to provide the value output VOA attenuation, optional";
    }
    leaf partner-amp {
      type leafref {
        path "../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.";
    }
  }

  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;
    }
    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 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;
      must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" {
        error-message "invalid SRG";
        description
          "Validating if the srg is supported by add/drop group";
      }
    }
    leaf wavelength-duplication {
      type org-openroadm-common-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-g;
  }

  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-common-types:xpdr-node-types;
      mandatory true;
      description
        "Identifier for xponder-type e.g Transponder, Muxponder";
    }
    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:org-openroadm-device/org-openroadm-device:degree/org-openroadm-device: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: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.";
    }
  }

  grouping port-name {
    uses circuit-pack-name;
    leaf port-name {
      type leafref {
        path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:circuit-packs[circuit-pack-name=current()/../org-openroadm-device:circuit-pack-name]/org-openroadm-device:ports/org-openroadm-device: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:org-openroadm-device/org-openroadm-device:circuit-packs/org-openroadm-device: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 interface-name {
    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 administrative-state {
        type org-openroadm-equipment-states-types:admin-states;
      }
      leaf operational-state {
        type org-openroadm-common-types:state;
        config false;
      }
      leaf circuit-id {
        type string {
          length "0..45";
        }
        description
          "circuit identifier/user label,
           can be used in alarm correlation and/or connection management ";
      }
      leaf supporting-interface {
        type leafref {
          path "/org-openroadm-device/interface/name";
        }
      }
      uses supporting-port-name;
    }
  }

  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";
    }
    leaf port-type {
      type string;
      description
        "Type of the pluggable or fixed port.";
    }
    leaf port-qual {
      type org-openroadm-common-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-types:direction;
      config false;
      mandatory true;
      description
        "Whether port is uni (tx/rx) or bi-directional and";
    }
    leaf label {
      type string;
      config false;
      description
        "Faceplate label";
    }
    leaf circuit-id {
      type string {
        length "0..45";
      }
      description
        "circuit identifier/user label,
         can be used in alarm correlation and/or connection management ";
    }
    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-types:state;
      config false;
      mandatory true;
      description
        "Operational state of a port";
    }
    leaf-list supported-interface-capability {
      type identityref {
        base org-openroadm-port-types:supported-if-capability;
      }
      config false;
      description
        "Interface types supported on this 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";
      uses interface-name;
    }
  }

  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;
        uses org-openroadm-swdl:sw-bank;
      }
      uses shelves;
      uses circuit-packs;
      uses interfaces-grp;
      uses protection-groups;
      container protocols {
        description
          "Contains the supported protocols";
      }
      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-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-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;
        }
        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";
            }
          }
        }
      }
    }
  }

  grouping mc-capabilities-g {
    container mc-capabilities {
      config false;
      description
        "Capabilities of the media channel on a degree or SRG.  This is used to validate mc-ttp provisioning on degrees and SRGs.";
      leaf slot-width-granularity {
        type org-openroadm-common-types:frequency-GHz;
        default "50";
        config false;
        description
          "Width of a slot measured in GHz.";
      }
      leaf center-freq-granularity {
        type org-openroadm-common-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-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";
      }
    }
  }

  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-common-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-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 {
    leaf status {
      type enumeration {
        enum "Completed" {
          value 1;
        }
        enum "Failed" {
          value 2;
        }
      }
      mandatory true;
      description
        "Completed or Failed for the scan''s final 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;
}
', 'c7ac6e9d43c9913563621859043076d60acb54a6d3e4891f5d40bd08558c4920', 'org-openroadm-device', '2018-10-19');
INSERT INTO public.yang_resource VALUES (50, 'org-openroadm-optical-transport-interfaces@2018-10-19.yang', '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 2018-10-19;
  }
  import org-openroadm-interfaces {
    prefix openROADM-if;
    revision-date 2017-06-26;
  }
  import org-openroadm-common-types {
    prefix org-openroadm-common-types;
    revision-date 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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-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-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-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-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;
  }
}
', '5c2f0ed8b43d19c3eb40ba598d4c0bed4476069ed7e39c3627e581647180d847', 'org-openroadm-optical-transport-interfaces', '2018-10-19');
INSERT INTO public.yang_resource VALUES (51, 'org-openroadm-resource@2018-10-19.yang', 'module org-openroadm-resource {
  namespace "http://org/openroadm/resource";
  prefix org-openroadm-resource;

  import org-openroadm-resource-types {
    prefix org-openroadm-resource-types;
    revision-date 2018-10-19;
  }

  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, 
      AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 resource {
    description
      "This resource identifier is intended to provide a generic identifer
       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;
    }
  }
}
', '88b81ae04f1e215946188d33b3788305c1e0302c91a24b4ed917e3ea44d7a3f0', 'org-openroadm-resource', '2018-10-19');
INSERT INTO public.yang_resource VALUES (52, 'yang-ext.yang', 'module yang-ext {
    yang-version 1;
    namespace "urn:opendaylight:yang:extension:yang-ext";
    prefix "ext";
    
    contact "Anton Tkacik <ttkacik@cisco.com>";

    description 
            "Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.

            This program and the accompanying materials are made available under the
            terms of the Eclipse Public License v1.0 which accompanies this distribution,
            and is available at http://www.eclipse.org/legal/epl-v10.html";

    revision "2013-07-09" {
        description "";
    }

    // Augmentation name

    extension "augment-identifier" {
        description 
           "YANG language extension which assigns an identifier to 
            augmentation. Augment identifier is used to identify
            specific augment statement by name. 

            The identifier syntax is defined formally defined by the rule
            ''identifier'' in Section 12 of RFC 6020.

            All augment identifiers defined in a namespace MUST be unique.
            The namespace of augment identifiers is shared by module and
            its submodules.";

            /*
                Discussion:
                This extension allows for ease of development / debug
                of YANG modules and it is suitable for code generation,
                where each augment statement is nicely identified by
                unique name instead of combination of augment target
                and when condition. 
            */
        argument "identifier";
    }


    // Context-aware RPCs

    grouping rpc-context-ref {
        description 
           "A reference to RPC context.";
        leaf context-instance {
            type instance-identifier;
            description "Pointer to the context. ";
        }
    }

    extension "rpc-context-instance" {
        description
           "YANG language extension which defines enclosing (parent) 
            schema node as referencable context for RPCs.

            The argument is identity which is used to identify RPC context
            type.";

        argument "context-type";
    }

    extension "context-reference" {
        argument "context-type";
    }

    extension "context-instance" {
        argument "context-type";
    }
    
    extension "instance-target" {
    	argument "path";
    }
}
', 'f0f1428305bb940162e1711044bc4bd5fca6501be48c7cc7a951b99a9f33c014', 'yang-ext', '2013-07-09');
INSERT INTO public.yang_resource VALUES (53, 'org-openroadm-file-transfer@2018-10-19.yang', '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 2018-10-19;
  }

  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, 
     AT&T Intellectual Property.  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 2018-10-19 {
    description
      "Version 2.2.1";
  }
  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 enumeration {
          enum "Successful" {
            value 1;
          }
          enum "Failed" {
            value 2;
          }
        }
        mandatory true;
        description
          "Successful or Failed";
      }
      leaf-list status-message {
        type string;
        description
          "Gives a more detailed reason for success / failure";
      }
    }
  }
  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.";
      }
    }
  }
}
', '0eb00d6d492bf2de68fa5a7db30531ce5c8d2159f9328c1b8f1118ee89213d7a', 'org-openroadm-file-transfer', '2018-10-19');



INSERT INTO public.schema_set_yang_resources VALUES (1, 1);
INSERT INTO public.schema_set_yang_resources VALUES (2, 2);
INSERT INTO public.schema_set_yang_resources VALUES (3, 3);
INSERT INTO public.schema_set_yang_resources VALUES (3, 4);
INSERT INTO public.schema_set_yang_resources VALUES (4, 3);
INSERT INTO public.schema_set_yang_resources VALUES (4, 4);
INSERT INTO public.schema_set_yang_resources VALUES (5, 5);
INSERT INTO public.schema_set_yang_resources VALUES (5, 6);
INSERT INTO public.schema_set_yang_resources VALUES (5, 7);
INSERT INTO public.schema_set_yang_resources VALUES (5, 8);
INSERT INTO public.schema_set_yang_resources VALUES (5, 9);
INSERT INTO public.schema_set_yang_resources VALUES (5, 10);
INSERT INTO public.schema_set_yang_resources VALUES (5, 11);
INSERT INTO public.schema_set_yang_resources VALUES (5, 12);
INSERT INTO public.schema_set_yang_resources VALUES (5, 13);
INSERT INTO public.schema_set_yang_resources VALUES (5, 14);
INSERT INTO public.schema_set_yang_resources VALUES (5, 15);
INSERT INTO public.schema_set_yang_resources VALUES (5, 16);
INSERT INTO public.schema_set_yang_resources VALUES (5, 17);
INSERT INTO public.schema_set_yang_resources VALUES (5, 18);
INSERT INTO public.schema_set_yang_resources VALUES (5, 19);
INSERT INTO public.schema_set_yang_resources VALUES (5, 20);
INSERT INTO public.schema_set_yang_resources VALUES (5, 21);
INSERT INTO public.schema_set_yang_resources VALUES (5, 22);
INSERT INTO public.schema_set_yang_resources VALUES (5, 23);
INSERT INTO public.schema_set_yang_resources VALUES (5, 24);
INSERT INTO public.schema_set_yang_resources VALUES (5, 25);
INSERT INTO public.schema_set_yang_resources VALUES (5, 26);
INSERT INTO public.schema_set_yang_resources VALUES (5, 27);
INSERT INTO public.schema_set_yang_resources VALUES (5, 28);
INSERT INTO public.schema_set_yang_resources VALUES (5, 29);
INSERT INTO public.schema_set_yang_resources VALUES (5, 30);
INSERT INTO public.schema_set_yang_resources VALUES (5, 31);
INSERT INTO public.schema_set_yang_resources VALUES (5, 32);
INSERT INTO public.schema_set_yang_resources VALUES (5, 33);
INSERT INTO public.schema_set_yang_resources VALUES (5, 34);
INSERT INTO public.schema_set_yang_resources VALUES (5, 35);
INSERT INTO public.schema_set_yang_resources VALUES (5, 36);
INSERT INTO public.schema_set_yang_resources VALUES (5, 37);
INSERT INTO public.schema_set_yang_resources VALUES (5, 38);
INSERT INTO public.schema_set_yang_resources VALUES (5, 39);
INSERT INTO public.schema_set_yang_resources VALUES (5, 40);
INSERT INTO public.schema_set_yang_resources VALUES (5, 41);
INSERT INTO public.schema_set_yang_resources VALUES (5, 42);
INSERT INTO public.schema_set_yang_resources VALUES (5, 43);
INSERT INTO public.schema_set_yang_resources VALUES (5, 44);
INSERT INTO public.schema_set_yang_resources VALUES (5, 45);
INSERT INTO public.schema_set_yang_resources VALUES (5, 46);
INSERT INTO public.schema_set_yang_resources VALUES (5, 47);
INSERT INTO public.schema_set_yang_resources VALUES (5, 48);
INSERT INTO public.schema_set_yang_resources VALUES (5, 49);
INSERT INTO public.schema_set_yang_resources VALUES (5, 50);
INSERT INTO public.schema_set_yang_resources VALUES (5, 51);
INSERT INTO public.schema_set_yang_resources VALUES (5, 52);
INSERT INTO public.schema_set_yang_resources VALUES (5, 53);


SELECT pg_catalog.setval('public.anchor_id_seq', 6, true);



SELECT pg_catalog.setval('public.dataspace_id_seq', 5, true);



SELECT pg_catalog.setval('public.relation_type_id_seq', 1, false);



SELECT pg_catalog.setval('public.schema_node_id_seq', 1, false);



SELECT pg_catalog.setval('public.schema_set_id_seq', 5, true);



SELECT pg_catalog.setval('public.yang_resource_id_seq', 53, true);