Blame tests/data/files/ietf-interface-protection@2018-10-03.yang

Packit 8fb591
module ietf-interface-protection {
Packit 8fb591
  yang-version 1.1;
Packit 8fb591
  namespace "urn:ietf:params:xml:ns:yang:ietf-interface-protection";
Packit 8fb591
  prefix ifprot;
Packit 8fb591
Packit 8fb591
  import ietf-interfaces {
Packit 8fb591
    prefix if;
Packit 8fb591
    reference "RFC8343";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  organization
Packit 8fb591
    "Internet Engineering Task Force (IETF) CCAMP WG";
Packit 8fb591
  contact
Packit 8fb591
    "WG List: <mailto:ccamp@ietf.org>
Packit 8fb591
Packit 8fb591
    ID-draft editors:
Packit 8fb591
      Jonas Ahlberg (jonas.ahlberg@ericsson.com);
Packit 8fb591
      Min Ye (amy.yemin@huawei.com);
Packit 8fb591
      Xi Li (Xi.Li@neclab.eu);
Packit 8fb591
      Daniela Spreafico (daniela.spreafico@nokia.com)
Packit 8fb591
      Marko Vaupotic (Marko.Vaupotic@aviatnet.com)";
Packit 8fb591
Packit 8fb591
  description
Packit 8fb591
    "This is a module for the entities in
Packit 8fb591
    a generic interface protection mechanism.
Packit 8fb591
Packit 8fb591
    Copyright (c) 2018 IETF Trust and the persons identified as
Packit 8fb591
    authors of the code.  All rights reserved.
Packit 8fb591
Packit 8fb591
    Redistribution and use in source and binary forms, with or
Packit 8fb591
    without modification, is permitted pursuant to, and subject
Packit 8fb591
    to the license terms contained in, the Simplified BSD License
Packit 8fb591
    set forth in Section 4.c of the IETF Trust's Legal Provisions
Packit 8fb591
    Relating to IETF Documents
Packit 8fb591
    (http://trustee.ietf.org/license-info).
Packit 8fb591
Packit 8fb591
    This version of this YANG module is part of RFC XXXX; see
Packit 8fb591
    the RFC itself for full legal notices.
Packit 8fb591
Packit 8fb591
    Copyright (c) 2018 IETF Trust and the persons identified as
Packit 8fb591
    authors of the code.  All rights reserved.";
Packit 8fb591
Packit 8fb591
  revision 2018-10-03 {
Packit 8fb591
    description "Initial revision.";
Packit 8fb591
    reference "RFC XXXX: A YANG Data Model for Microwave Radio Link";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  /*
Packit 8fb591
   * Protection architecture type identities
Packit 8fb591
   */
Packit 8fb591
Packit 8fb591
  identity protection-architecture-type {
Packit 8fb591
    description
Packit 8fb591
      "protection architecture type";
Packit 8fb591
    reference "ITU-T G.808.1";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  identity one-plus-one-type {
Packit 8fb591
    base protection-architecture-type;
Packit 8fb591
    description
Packit 8fb591
      "1+1, One interface protects
Packit 8fb591
      another one interface.";
Packit 8fb591
    reference "ITU-T G.808.1";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  identity one-to-n-type {
Packit 8fb591
    base protection-architecture-type;
Packit 8fb591
    description
Packit 8fb591
      "1:N, One interface protects
Packit 8fb591
      n other interfaces.";
Packit 8fb591
    reference "ITU-T G.808.1";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  /*
Packit 8fb591
   * Protection states identities
Packit 8fb591
   */
Packit 8fb591
Packit 8fb591
  identity protection-states {
Packit 8fb591
    description
Packit 8fb591
     "Identities describing the status of the protection,
Packit 8fb591
     in a group of interfaces configured in
Packit 8fb591
     a protection mode.";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  identity unprotected {
Packit 8fb591
    base protection-states;
Packit 8fb591
    description "Not protected";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  identity protected {
Packit 8fb591
    base protection-states;
Packit 8fb591
    description "Protected";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  identity unable-to-protect {
Packit 8fb591
    base protection-states;
Packit 8fb591
    description "Unable to protect";
Packit 8fb591
  }
Packit 8fb591
Packit 8fb591
  /*
Packit 8fb591
   * Protection Groups
Packit 8fb591
   */
Packit 8fb591
Packit 8fb591
  grouping protection-groups {
Packit 8fb591
    description
Packit 8fb591
      "Configuration of protected groups (1+1) of interfaces
Packit 8fb591
      providing protection for each other. More than one protected
Packit 8fb591
      group per higher-layer-interface is allowed.";
Packit 8fb591
Packit 8fb591
    list protection-group {
Packit 8fb591
      key "name";
Packit 8fb591
      description
Packit 8fb591
      "List of protected groups of interfaces
Packit 8fb591
      in a higher-layer-interface.";
Packit 8fb591
Packit 8fb591
      leaf name {
Packit 8fb591
        type string;
Packit 8fb591
        description
Packit 8fb591
          "Name used for identification of the protection group";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf protection-architecture-type {
Packit 8fb591
        type identityref {
Packit 8fb591
          base protection-architecture-type;
Packit 8fb591
        }
Packit 8fb591
        default "ifprot:one-plus-one-type";
Packit 8fb591
        description
Packit 8fb591
          "The type of protection architecture used, e.g. one
Packit 8fb591
          interface protecting one or several other interfaces.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf-list members {
Packit 8fb591
        type if:interface-ref;
Packit 8fb591
        min-elements 2;
Packit 8fb591
        description
Packit 8fb591
          "Association to a group of interfaces configured for
Packit 8fb591
          protection and used by a higher-layer-interface.";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf operation-type {
Packit 8fb591
        type enumeration {
Packit 8fb591
          enum "non-revertive" {
Packit 8fb591
            description
Packit 8fb591
              "In non revertive operation, the traffic does not
Packit 8fb591
               return to the working interface if the switch requests
Packit 8fb591
               are terminated.";
Packit 8fb591
            reference "ITU-T G.808.1";
Packit 8fb591
          }
Packit 8fb591
          enum "revertive" {
Packit 8fb591
            description
Packit 8fb591
              "In revertive operation, the traffic always
Packit 8fb591
               returns to (or remains on) the working interface
Packit 8fb591
               if the switch requests are terminated.";
Packit 8fb591
            reference "ITU-T G.808.1";
Packit 8fb591
          }
Packit 8fb591
        }
Packit 8fb591
        default "non-revertive";
Packit 8fb591
        description
Packit 8fb591
          "The type of protection operation, i.e. revertive
Packit 8fb591
           or non-revertive operation.";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf-list working-entity {
Packit 8fb591
        when "../operation-type = 'revertive'";
Packit 8fb591
        type if:interface-ref;
Packit 8fb591
        min-elements 1;
Packit 8fb591
        description
Packit 8fb591
          "The interfaces over which the traffic normally should
Packit 8fb591
          be transported over when there is no need to use the
Packit 8fb591
          protecting interface.";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf revertive-wait-to-restore {
Packit 8fb591
        when "../operation-type = 'revertive'";
Packit 8fb591
        type uint16;
Packit 8fb591
        units "seconds";
Packit 8fb591
        default "0";
Packit 8fb591
        description
Packit 8fb591
          "The time to wait before switching back to the working
Packit 8fb591
          interface if operation-type is revertive.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf hold-off-timer {
Packit 8fb591
        type uint16;
Packit 8fb591
        units "milliseconds";
Packit 8fb591
        default "0";
Packit 8fb591
        description
Packit 8fb591
          "Time interval after the detection of a fault and its
Packit 8fb591
          confirmation as a condition requiring the protection
Packit 8fb591
          switching procedure.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      leaf status {
Packit 8fb591
        type identityref {
Packit 8fb591
          base protection-states;
Packit 8fb591
        }
Packit 8fb591
        config false;
Packit 8fb591
        description
Packit 8fb591
          "Status of the protection, in a group of interfaces
Packit 8fb591
           configured in a protection mode.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action manual-switch-working {
Packit 8fb591
        description
Packit 8fb591
          "A switch action initiated by an operator command.
Packit 8fb591
           It switches normal traffic signal to the working
Packit 8fb591
           transport entity.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action manual-switch-protection {
Packit 8fb591
        description
Packit 8fb591
          "A switch action initiated by an operator command.
Packit 8fb591
           It switches normal traffic signal to the protection
Packit 8fb591
           transport entity.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action forced-switch {
Packit 8fb591
        description
Packit 8fb591
          "A switch action initiated by an operator command.
Packit 8fb591
           It switches normal traffic signal to the protection
Packit 8fb591
           transport entity and forces it to remain on that
Packit 8fb591
           entity even when criteria for switching back to
Packit 8fb591
           the original entity are fulfilled.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action lockout-of-protection {
Packit 8fb591
        description
Packit 8fb591
          "A switch action temporarily disables access to the
Packit 8fb591
           protection transport entity for all signals.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action freeze {
Packit 8fb591
        description
Packit 8fb591
          "A switch action temporarily prevents any switch action
Packit 8fb591
           to be taken and, as such, freezes the current state.
Packit 8fb591
           Until the freeze is cleared, additional near-end external
Packit 8fb591
           commands are rejected and fault condition changes and
Packit 8fb591
           received APS messages are ignored..";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action exercise {
Packit 8fb591
        description
Packit 8fb591
          "A switch action to test if the APS communication is
Packit 8fb591
           operating correctly. It is lower priority than any 'real'
Packit 8fb591
           switch request..";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
Packit 8fb591
      action clear {
Packit 8fb591
        description
Packit 8fb591
          "An action clears all switch commands.";
Packit 8fb591
        reference "ITU-T G.808.1";
Packit 8fb591
      }
Packit 8fb591
    }
Packit 8fb591
  }
Packit 8fb591
}