org-openroadm-ospf

This model defines the Yang model for ospf. This model reuses data items defined in the IETF YANG model for OSPF described by d...

  • Version: 2021-12-10

    org-openroadm-ospf@2021-12-10


    
      module org-openroadm-ospf {
    
        yang-version 1;
    
        namespace "http://org/openroadm/ospf";
    
        prefix org-openroadm-ospf;
    
        import ietf-inet-types {
          prefix inet;
          revision-date "2013-07-15";
        }
        import ietf-yang-types {
          prefix yang;
          revision-date "2013-07-15";
        }
        import org-openroadm-device {
          prefix org-openroadm-device;
          revision-date "2021-12-10";
        }
        import org-openroadm-routing {
          prefix org-openroadm-routing;
          revision-date "2021-12-10";
        }
        import org-openroadm-key-chain {
          prefix org-openroadm-key-chain;
          revision-date "2019-11-29";
        }
    
        organization "Open ROADM MSA";
    
        contact "OpenROADM.org";
    
        description
          "This model defines the Yang model for ospf.
    
         This model reuses data items defined in the IETF YANG model for
         OSPF described by draft-ietf-ospf-yang-00.
    
         Some attributes which are not required in Open ROADM MSA are removed.
         Yang file included are changed to fit into Open ROADM MSA yang structure.
    
         IETF code is subject to the following copyright and license:
         Copyright (c) IETF Trust and the persons identified as authors of
         the code.
         All rights reserved.
    
         Redistribution and use in source and binary forms, with or without
         modification, is permitted pursuant to, and subject to the license
         terms contained in, the Simplified BSD License set forth in
         Section 4.c of the IETF Trust's Legal Provisions Relating
         to IETF Documents (http://trustee.ietf.org/license-info).";
    
        revision "2021-12-10" {
          description "Version 10.1";
        }
    
        revision "2021-09-24" {
          description "Version 10.0";
        }
    
        revision "2021-05-28" {
          description "Version 9.1";
        }
    
        revision "2021-03-26" {
          description "Version 9.0";
        }
    
        revision "2020-12-11" {
          description "Version 8.1";
        }
    
        revision "2020-09-25" {
          description "Version 8.0";
        }
    
        revision "2020-05-29" {
          description "Version 7.1.0";
        }
    
        revision "2020-03-27" {
          description "Version 7.0.0";
        }
    
        revision "2019-11-29" {
          description "Version 6.1.0";
        }
    
        revision "2019-09-27" {
          description "Version 6.0.0";
        }
    
        revision "2019-05-31" {
          description "Version 5.1.0";
        }
    
        revision "2019-03-29" {
          description "Version 5.0.0";
        }
    
        revision "2018-03-30" {
          description "Initial revision.";
        }
    
    
        feature multi-topology {
          description "Support MTR.";
        }
    
        feature multi-area-adj {
          description
            "OSPF multi-area adjacency support as in RFC 5185.";
        }
    
        feature router-id {
          description
            "Set router ID per instance.";
        }
    
        feature demand-circuit {
          description
            "OSPF demand circuit support as in RFC 1793.";
        }
    
        feature mtu-ignore {
          description
            "Disable OSPF MTU mismatch detection on receiving
           DBD packets.";
        }
    
        feature lls {
          description
            "OSPF link-local signaling (LLS) as in RFC 5613.";
        }
    
        feature prefix-suppression {
          description
            "OSPF prefix suppression support as in RFC 6860.";
        }
    
        feature bfd {
          description "OSPF BFD support.";
        }
    
        feature ttl-security {
          description "OSPF ttl security check.";
        }
    
        feature nsr {
          description "Non-Stop-Routing (NSR).";
        }
    
        feature graceful-restart {
          description
            "Graceful OSPF Restart as defined in RFC3623 and RFC5187.";
        }
    
        feature protocol-shutdown {
          description "Shutdown the protocol.";
        }
    
        feature auto-cost {
          description
            "Calculate OSPF interface cost according to
           reference bandwidth.";
        }
    
        feature max-ecmp {
          description
            "Setting maximum number of ECMP paths.";
        }
    
        feature max-lsa {
          description
            "Setting maximum number of LSAs OSPF will receive.";
        }
    
        feature te-rid {
          description "TE router-id.";
        }
    
        feature ldp-igp-sync {
          description "LDP IGP synchronization.";
        }
    
        feature ldp-igp-autoconfig {
          description "LDP IGP auto-config.";
        }
    
        feature protocol-if-shutdown {
          description
            "Shutdown the protocol over an interface.";
        }
    
        feature ospfv3-authentication-ipsec {
          description
            "Use IPsec for OSPFv3 authentication.";
        }
    
        feature instance-inheritance {
          description
            "Support instance inheritance";
        }
    
        feature area-inheritance {
          description "Support area inheritance";
        }
    
        feature interface-inheritance {
          description
            "Support interface inheritance";
        }
    
        identity ospf {
          base org-openroadm-routing:routing-protocol;
          description "OSPF Protocol";
        }
    
        identity ospfv2 {
          base ospf;
          description "OSPFv2";
        }
    
        identity ospfv3 {
          base ospf;
          description "OSPFv3";
        }
    
        identity operation-mode {
          description "OSPF operation mode.";
        }
    
        identity ships-in-the-night {
          base operation-mode;
          description
            "Ships-in-the-night operation mode in which
           each OSPF instance carries only one address family";
        }
    
        identity area-type {
          description
            "Base identity for OSPF area type.";
        }
    
        identity normal {
          base area-type;
          description "OSPF normal area.";
        }
    
        identity stub {
          base area-type;
          description "OSPF stub area.";
        }
    
        identity nssa {
          base area-type;
          description "OSPF NSSA area.";
        }
    
        identity if-link-type {
          description
            "Base identity for OSPF interface link type.";
        }
    
        identity if-link-type-normal {
          base if-link-type;
          description
            "OSPF interface link type normal.";
        }
    
        identity if-link-type-virtual-link {
          base if-link-type;
          description
            "OSPF interface link type virtual link.";
        }
    
        identity if-link-type-sham-link {
          base if-link-type;
          description
            "OSPF interface link type sham link.";
        }
    
        typedef uint24 {
          type uint32 {
            range "0 .. 16777215";
          }
          description "24-bit unsigned integer.";
        }
    
        typedef area-id-type {
          type union {
            type uint32;
            type yang:dotted-quad;
          }
          description "Area ID type.";
        }
    
        typedef if-state-type {
          type enumeration {
            enum "Down" {
              value 1;
              description "Interface down state";
            }
            enum "Loopback" {
              value 2;
              description
                "Interface loopback state";
            }
            enum "Waiting" {
              value 3;
              description
                "Interface waiting state";
            }
            enum "Point-to-Point" {
              value 4;
              description
                "Interface point-to-point state";
            }
            enum "DR" {
              value 5;
              description
                "Interface Designated Router (DR) state";
            }
            enum "BDR" {
              value 6;
              description
                "Interface Backup Designated Router (BDR) state";
            }
            enum "DR-Other" {
              value 7;
              description
                "Interface Other Designated Router state";
            }
          }
          description
            "OSPF interface state type.";
        }
    
        typedef nbr-state-type {
          type enumeration {
            enum "Down" {
              value 1;
              description "Neighbor down state";
            }
            enum "Attempt" {
              value 2;
              description
                "Neighbor attempt state";
            }
            enum "Init" {
              value 3;
              description "Neighbor init state";
            }
            enum "2-Way" {
              value 4;
              description "Neighbor 2-Way state";
            }
            enum "ExStart" {
              value 5;
              description
                "Neighbor exchange start state";
            }
            enum "Exchange" {
              value 6;
              description
                "Neighbor exchange state";
            }
            enum "Loading" {
              value 7;
              description
                "Neighbor loading state";
            }
            enum "Full" {
              value 8;
              description "Neighbor full state";
            }
          }
          description
            "OSPF neighbor state type.";
        }
    
        typedef restart-helper-status-type {
          type enumeration {
            enum "Not-Helping" {
              value 1;
              description
                "Restart helper status not helping.";
            }
            enum "Helping" {
              value 2;
              description
                "Restart helper status helping.";
            }
          }
          description
            "Restart helper status type.";
        }
    
        typedef restart-exit-reason-type {
          type enumeration {
            enum "None" {
              value 1;
              description "Not attempted.";
            }
            enum "InProgress" {
              value 2;
              description "Restart in progress.";
            }
            enum "Completed" {
              value 3;
              description
                "Successfully completed.";
            }
            enum "TimedOut" {
              value 4;
              description "Timed out.";
            }
            enum "TopologyChanged" {
              value 5;
              description
                "Aborted due to topology change.";
            }
          }
          description
            "Describes the outcome of the last attempt at a
           graceful restart, either by itself or acting
           as a helper.";
        }
    
        typedef packet-type {
          type enumeration {
            enum "Hello" {
              value 1;
              description "OSPF hello packet.";
            }
            enum "Database-Descripton" {
              value 2;
              description
                "OSPF database description packet.";
            }
            enum "Link-State-Request" {
              value 3;
              description
                "OSPF link state request packet.";
            }
            enum "Link-State-Update" {
              value 4;
              description
                "OSPF link state update packet.";
            }
            enum "Link-State-Ack" {
              value 5;
              description
                "OSPF link state acknowlegement packet.";
            }
          }
          description "OSPF packet type.";
        }
    
        typedef nssa-translator-state-type {
          type enumeration {
            enum "Enabled" {
              value 1;
              description
                "NSSA translator enabled state.";
            }
            enum "Elected" {
              value 2;
              description
                "NSSA translator elected state.";
            }
            enum "Disabled" {
              value 3;
              description
                "NSSA translator disabled state.";
            }
          }
          description
            "OSPF NSSA translator state type.";
        }
    
        typedef restart-status-type {
          type enumeration {
            enum "Not-Restarting" {
              value 1;
              description
                "Router is not restarting.";
            }
            enum "Planned-Restart" {
              value 2;
              description
                "Router is going through planned restart.";
            }
            enum "Unplanned-Restart" {
              value 3;
              description
                "Router is going through unplanned restart.";
            }
          }
          description
            "OSPF graceful restart status type.";
        }
    
        notification if-state-change {
          description
            "This notification is sent when interface
           state change is detected.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type org-openroadm-device:interface-ref;
              description "Interface.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf state {
            type if-state-type;
            description "Interface state.";
          }
        }  // notification if-state-change
    
        notification if-config-error {
          description
            "This notification is sent when interface
           config error is detected.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type org-openroadm-device:interface-ref;
              description "Interface.";
            }
    
            leaf packet-source {
              type yang:dotted-quad;
              description "Source address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf packet-type {
            type packet-type;
            description "OSPF packet type.";
          }
    
          leaf error {
            type enumeration {
              enum "badVersion" {
                value 0;
                description "Bad version";
              }
              enum "areaMismatch" {
                value 1;
                description "Area mistmatch";
              }
              enum "unknownNbmaNbr" {
                value 2;
                description
                  "Unknown NBMA neighbor";
              }
              enum "unknownVirtualNbr" {
                value 3;
                description
                  "Unknown virtual link neighbor";
              }
              enum "authTypeMismatch" {
                value 4;
                description "Auth type mismatch";
              }
              enum "authFailure" {
                value 5;
                description "Auth failure";
              }
              enum "netMaskMismatch" {
                value 6;
                description
                  "Network mask mismatch";
              }
              enum "helloIntervalMismatch" {
                value 7;
                description
                  "Hello interval mismatch";
              }
              enum "deadIntervalMismatch" {
                value 8;
                description
                  "Dead interval mismatch";
              }
              enum "optionMismatch" {
                value 9;
                description "Option mismatch";
              }
              enum "mtuMismatch" {
                value 10;
                description "MTU mismatch";
              }
              enum "duplicateRouterId" {
                value 11;
                description
                  "Duplicate router ID";
              }
              enum "noError" {
                value 12;
                description "No error";
              }
            }
            description "Error code.";
          }
        }  // notification if-config-error
    
        notification nbr-state-change {
          description
            "This notification is sent when neighbor
           state change is detected.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type org-openroadm-device:interface-ref;
              description "Interface.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container sham-link
    
          leaf state {
            type nbr-state-type;
            description "Neighbor state.";
          }
        }  // notification nbr-state-change
    
        notification nbr-restart-helper-status-change {
          description
            "This notification is sent when neighbor restart
           helper status change is detected.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type org-openroadm-device:interface-ref;
              description "Interface.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          leaf status {
            type restart-helper-status-type;
            description "Restart helper status.";
          }
    
          leaf age {
            type uint32;
            units "seconds";
            description
              "Remaining time in current OSPF graceful restart
             interval, if the router is acting as a restart
             helper for the neighbor.";
          }
    
          leaf exit-reason {
            type restart-exit-reason-type;
            description
              "Restart helper exit reason.";
          }
        }  // notification nbr-restart-helper-status-change
    
        notification rx-bad-packet {
          description
            "This notification is sent when an OSPF packet
           has been received on a interface that cannot be parsed.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type org-openroadm-device:interface-ref;
              description "Interface.";
            }
    
            leaf packet-source {
              type yang:dotted-quad;
              description "Source address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf packet-type {
            type packet-type;
            description "OSPF packet type.";
          }
        }  // notification rx-bad-packet
    
        notification lsdb-approaching-overflow {
          description
            "This notification is sent when the number of LSAs
           in the router's link state database has exceeded
           ninety percent of the ext-lsdb-limit.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf ext-lsdb-limit {
            type uint32;
            description
              "The maximum number of non-default AS-external LSAs
             entries that can be stored in the link state database.";
          }
        }  // notification lsdb-approaching-overflow
    
        notification lsdb-overflow {
          description
            "This notification is sent when the number of LSAs
           in the router's link state database has exceeded
           ext-lsdb-limit.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf ext-lsdb-limit {
            type uint32;
            description
              "The maximum number of non-default AS-external LSAs
             entries that can be stored in the link state database.";
          }
        }  // notification lsdb-overflow
    
        notification nssa-translator-status-change {
          description
            "This notification is sent when there is a change
           in the router's ability to translate OSPF NSSA LSAs
           OSPF AS-External LSAs.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf area-id {
            type uint32;
            description "Area ID.";
          }
    
          leaf status {
            type nssa-translator-state-type;
            description
              "NSSA translator status.";
          }
        }  // notification nssa-translator-status-change
    
        notification restart-status-change {
          description
            "This notification is sent when the graceful restart
           state for the router has changed.";
          leaf routing-instance {
            type org-openroadm-routing:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base org-openroadm-routing:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
    
          leaf status {
            type restart-status-type;
            description "Restart status.";
          }
    
          leaf restart-interval {
            type uint16 {
              range "1..1800";
            }
            units "seconds";
            default "120";
            description "Restart interval.";
          }
    
          leaf exit-reason {
            type restart-exit-reason-type;
            description "Restart exit reason.";
          }
        }  // notification restart-status-change
      }  // module org-openroadm-ospf
    

© 2023 YumaWorks, Inc. All rights reserved.