module Cisco-IOS-XR-ipv4-ospf-cfg {
  namespace "http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ospf-cfg";
  prefix ipv4-ospf-cfg;

  import ietf-inet-types {
    prefix inet;
  }
  import Cisco-IOS-XR-types {
    prefix xr;
  }
  import Cisco-IOS-XR-snmp-agent-cfg {
    prefix a1;
  }

  organization
    "Cisco Systems, Inc.";
  contact
    "Cisco Systems, Inc.
     Customer Service
     
     Postal: 170 West Tasman Drive
     San Jose, CA 95134
     
     Tel: +1 800 553-NETS
     
     E-mail: cs-yang@cisco.com";
  description
    "This module contains a collection of YANG definitions
     for Cisco IOS-XR ipv4-ospf package configuration.
     
     This module contains definitions
     for the following management objects:
       ospf: OSPF configuration data
     
     This YANG module augments the
       Cisco-IOS-XR-snmp-agent-cfg
     module with configuration data.
     
     Copyright (c) 2013-2018 by Cisco Systems, Inc.
     All rights reserved.";

  revision 2018-05-14 {
    description
      "Removed all start and running leaf nodes that are implicitly set with CLI";
  }
  revision 2018-01-31 {
    description
      "Fixed incorrect plural rendering.";
  }
  revision 2017-07-14 {
    description
      "Trace buffer size added in yang xml request repsonse.";
  }
  revision 2017-06-09 {
    description
      "Datatype modified to Range for area id, distribute tag and prefix tag.";
  }
  revision 2017-05-01 {
    description
      "Fixing backward compatibility error in module.";
  }
  revision 2017-01-02 {
    description
      "IOS XR 6.2.1 revision.";
  }
  revision 2015-11-09 {
    description
      "IOS XR 6.0 revision.";
  }

  typedef Ospf-proc-frr-rlfa-tunnel {
    type enumeration {
      enum "none" {
        value 0;
        description
          "Disabled";
      }
      enum "mpls-ldp" {
        value 1;
        description
          "MPLS LDP";
      }
    }
    description
      "Ospf proc frr rlfa tunnel";
  }

  typedef Ospf-sub-address-family {
    type enumeration {
      enum "unicast" {
        value 1;
        description
          "Unicast";
      }
    }
    description
      "Ospf sub address family";
  }

  typedef Ospf-network {
    type enumeration {
      enum "broadcast" {
        value 1;
        description
          "Broadcast";
      }
      enum "non-broadcast" {
        value 2;
        description
          "NonBroadcast";
      }
      enum "point-to-point" {
        value 3;
        description
          "Point to Point";
      }
      enum "point-to-multipoint" {
        value 4;
        description
          "Point to Multipoint";
      }
      enum "non-broadcast-point-to-multipoint" {
        value 5;
        description
          "NonBroadcast Point to Multipoint";
      }
    }
    description
      "Ospf network";
  }

  typedef Ospf-fast-reroute-tiebreakers-intf {
    type enumeration {
      enum "downstream" {
        value 0;
        description
          "Downstream";
      }
      enum "line-card-disjoint" {
        value 1;
        description
          "LC Disjoint";
      }
      enum "lowest-metric" {
        value 2;
        description
          "Lowest metric";
      }
      enum "node-protect" {
        value 3;
        description
          "Node protection";
      }
      enum "primary-path" {
        value 4;
        description
          "Primary path";
      }
      enum "secondary-path" {
        value 5;
        description
          "Secondar path";
      }
      enum "srlg-disjoint" {
        value 6;
        description
          "SRLG";
      }
      enum "interface-disjoint" {
        value 7;
        description
          "Intf Disjoint";
      }
    }
    description
      "Ospf fast reroute tiebreakers intf";
  }

  typedef Ospf-authentication {
    type enumeration {
      enum "none" {
        value 0;
        description
          "No Authentication";
      }
      enum "plain" {
        value 1;
        description
          "Plain Text Authentication";
      }
      enum "md5" {
        value 2;
        description
          "MD5 Message Digest";
      }
      enum "keychain" {
        value 3;
        description
          "Keychain Authentication";
      }
    }
    description
      "Ospf authentication";
  }

  typedef Ospf-eigrp-route {
    type enumeration {
      enum "internal" {
        value 0;
        description
          "EIGRP Internal Type";
      }
      enum "external" {
        value 1;
        description
          "EIGRP External Type";
      }
    }
    description
      "Ospf eigrp route";
  }

  typedef Ospf-sid {
    type enumeration {
      enum "index" {
        value 0;
        description
          "Index";
      }
      enum "absolute" {
        value 1;
        description
          "Absolute";
      }
    }
    description
      "Ospf sid";
  }

  typedef Ospf-link-state-metric {
    type enumeration {
      enum "type1" {
        value 1;
        description
          "Type 1 External";
      }
      enum "type2" {
        value 2;
        description
          "Type 2 External";
      }
    }
    description
      "Ospf link state metric";
  }

  typedef Ospf-keychain-auth {
    type enumeration {
      enum "none" {
        value 0;
        description
          "No Keychain Authentication";
      }
      enum "keychain" {
        value 3;
        description
          "Keychain Authentication";
      }
    }
    description
      "Ospf keychain auth";
  }

  typedef Ospf-fast-reroute-tiebreakers {
    type enumeration {
      enum "downstream" {
        value 0;
        description
          "Downstream";
      }
      enum "line-card-disjoint" {
        value 1;
        description
          "LC Disjoint";
      }
      enum "lowest-metric" {
        value 2;
        description
          "Lowest metric";
      }
      enum "node-protect" {
        value 3;
        description
          "Node protection";
      }
      enum "primary-path" {
        value 4;
        description
          "Primary path";
      }
      enum "secondary-path" {
        value 5;
        description
          "Secondar path";
      }
      enum "srlg-disjoint" {
        value 6;
        description
          "SRLG";
      }
      enum "interface-disjoint" {
        value 7;
        description
          "Intf Disjoint";
      }
    }
    description
      "Ospf fast reroute tiebreakers";
  }

  typedef Ospf-uloop-avoidance {
    type enumeration {
      enum "protected" {
        value 1;
        description
          "Protected prefixes only";
      }
      enum "all" {
        value 2;
        description
          "All prefixes";
      }
      enum "segment-routing" {
        value 3;
        description
          "Microloop avoidance using Segment Routing";
      }
    }
    description
      "Ospf uloop avoidance";
  }

  typedef Ospf-shutdown {
    type enumeration {
      enum "full" {
        value 1;
        description
          "Full graceful shutdown";
      }
      enum "hostmode" {
        value 2;
        description
          "Enter host only mode";
      }
      enum "onreload" {
        value 3;
        description
          "Full graceful shutdown post reload";
      }
    }
    description
      "Ospf shutdown";
  }

  typedef Ospf-domain-id {
    type enumeration {
      enum "type0005" {
        value 5;
        description
          "Type 0x0005";
      }
      enum "type0105" {
        value 261;
        description
          "Type 0x0105";
      }
      enum "type0205" {
        value 517;
        description
          "Type 0x0205";
      }
      enum "type8005" {
        value 32773;
        description
          "Type 0x8005";
      }
    }
    description
      "Ospf domain id";
  }

  typedef Ospf-frr-rlfa-tunnel {
    type enumeration {
      enum "none" {
        value 0;
        description
          "Disabled";
      }
      enum "mpls-ldp" {
        value 1;
        description
          "MPLS LDP";
      }
    }
    description
      "Ospf frr rlfa tunnel";
  }

  typedef Ospf-log-adj {
    type enumeration {
      enum "brief" {
        value 0;
        description
          "Limited output";
      }
      enum "detail" {
        value 1;
        description
          "Verbose output";
      }
      enum "suppress" {
        value 2;
        description
          "No output";
      }
    }
    description
      "Ospf log adj";
  }

  typedef Ospf-fast-reroute {
    type enumeration {
      enum "none" {
        value 0;
        description
          "None";
      }
      enum "per-link" {
        value 1;
        description
          "Per link";
      }
      enum "per-prefix" {
        value 2;
        description
          "Per prefix";
      }
    }
    description
      "Ospf fast reroute";
  }

  typedef Ospf-cisco-nsf {
    type enumeration {
      enum "always" {
        value 1;
        description
          "Do not require all neighbors to run NSF";
      }
      enum "require-nsf-neighbors" {
        value 2;
        description
          "Require all neighbors to run NSF";
      }
    }
    description
      "Ospf cisco nsf";
  }

  typedef Ospf-proc-fast-reroute {
    type enumeration {
      enum "none" {
        value 0;
        description
          "None";
      }
      enum "per-link" {
        value 1;
        description
          "Per link";
      }
      enum "per-prefix" {
        value 2;
        description
          "Per prefix";
      }
    }
    description
      "Ospf proc fast reroute";
  }

  typedef Ospf-redist-lsa {
    type enumeration {
      enum "summary" {
        value 3;
        description
          "Type 3 (summary) LSA";
      }
      enum "external" {
        value 5;
        description
          "Type 5 (external) LSA";
      }
    }
    description
      "Ospf redist lsa";
  }

  typedef Ospf-dist-list-protocol {
    type enumeration {
      enum "all" {
        value 0;
        description
          "Default";
      }
      enum "connected" {
        value 1;
        description
          "Connected Routes";
      }
      enum "static" {
        value 3;
        description
          "Static Routes";
      }
      enum "bgp" {
        value 4;
        description
          "BGP";
      }
      enum "ospf" {
        value 7;
        description
          "OSPF";
      }
      enum "dagr" {
        value 9;
        description
          "DAGR";
      }
    }
    description
      "Ospf dist list protocol";
  }

  typedef Bfd-enable-mode {
    type enumeration {
      enum "disable" {
        value 0;
        description
          "Disable Mode - Prevent inheritance";
      }
      enum "default" {
        value 1;
        description
          "Default Mode - Default BFD behavior";
      }
      enum "strict" {
        value 2;
        description
          "Strict Mode - Hold down adj until BFD sesion up";
      }
    }
    description
      "Bfd enable mode";
  }

  typedef Ospf-segment-routing-forwarding {
    type enumeration {
      enum "disable" {
        value 0;
        description
          "Disable";
      }
      enum "mpls" {
        value 1;
        description
          "Mpls";
      }
    }
    description
      "Ospf segment routing forwarding";
  }

  typedef Ospf-ietf-nsf {
    type enumeration {
      enum "all" {
        value 3;
        description
          "Use IETF NSF in planned and unplanned cases";
      }
    }
    description
      "Ospf ietf nsf";
  }

  typedef Nsr {
    type enumeration {
      enum "true" {
        value 1;
        description
          "Enable non-stop routing";
      }
      enum "false" {
        value 2;
        description
          "Disable non-stop routing";
      }
    }
    description
      "Nsr";
  }

  typedef Ospf-trace-buf-size {
    type enumeration {
      enum "size0" {
        value 0;
        description
          "Disable trace";
      }
      enum "size256" {
        value 256;
        description
          "Buffer size 256";
      }
      enum "size512" {
        value 512;
        description
          "Buffer size 512";
      }
      enum "size1024" {
        value 1024;
        description
          "Buffer size 1024";
      }
      enum "size2048" {
        value 2048;
        description
          "Buffer size 2048";
      }
      enum "size4096" {
        value 4096;
        description
          "Buffer size 4096";
      }
      enum "size8192" {
        value 8192;
        description
          "Buffer size 8192";
      }
      enum "size16384" {
        value 16384;
        description
          "Buffer size 16384";
      }
      enum "size32768" {
        value 32768;
        description
          "Buffer size 32768";
      }
      enum "size65536" {
        value 65536;
        description
          "Buffer size 65536";
      }
    }
    description
      "Ospf trace buf size";
  }

  typedef Ospf-redist-protocol {
    type enumeration {
      enum "all" {
        value 0;
        description
          "Default";
      }
      enum "connected" {
        value 1;
        description
          "Connected Routes";
      }
      enum "static" {
        value 3;
        description
          "Static Routes";
      }
      enum "bgp" {
        value 4;
        description
          "BGP";
      }
      enum "rip" {
        value 5;
        description
          "RIP";
      }
      enum "isis" {
        value 6;
        description
          "ISIS";
      }
      enum "ospf" {
        value 7;
        description
          "OSPF";
      }
      enum "eigrp" {
        value 8;
        description
          "EIGRP";
      }
      enum "dagr" {
        value 9;
        description
          "DAGR";
      }
      enum "subscriber" {
        value 10;
        description
          "Subscriber Routes";
      }
      enum "application" {
        value 11;
        description
          "Application Routes";
      }
      enum "mobile" {
        value 12;
        description
          "Mobile Routes";
      }
    }
    description
      "Ospf redist protocol";
  }

  typedef Ospf-route-level {
    type enumeration {
      enum "type1" {
        value 1;
        description
          "Type 1 only";
      }
      enum "type2" {
        value 2;
        description
          "Type 2 only";
      }
      enum "type1-and2" {
        value 3;
        description
          "Both Type 1 and Type 2";
      }
    }
    description
      "Ospf route level";
  }

  typedef Ospf-ietf-nsf-support {
    type enumeration {
      enum "never" {
        value 0;
        description
          "Do not perform IETF NSF helper role";
      }
    }
    description
      "Ospf ietf nsf support";
  }

  typedef Ospf-segment-routing {
    type enumeration {
      enum "disable" {
        value 0;
        description
          "Disable";
      }
      enum "mpls" {
        value 1;
        description
          "Mpls";
      }
    }
    description
      "Ospf segment routing";
  }

  typedef Ospf-address-family {
    type enumeration {
      enum "ipv4" {
        value 1;
        description
          "IPv4";
      }
    }
    description
      "Ospf address family";
  }

  typedef Ospf-fast-reroute-priority {
    type enumeration {
      enum "critical" {
        value 0;
        description
          "Critical";
      }
      enum "high" {
        value 2;
        description
          "High";
      }
      enum "medium" {
        value 4;
        description
          "Medium";
      }
      enum "low" {
        value 6;
        description
          "low";
      }
    }
    description
      "Ospf fast reroute priority";
  }

  grouping DISTANCE {
    description
      "Common node of default-vrf, vrf";
    container distance {
      description
        "Administrative distance configuration";
      container ospf-distance {
        description
          "OSPF distance configuration";
        leaf intra-area {
          type uint32 {
            range "1..255";
          }
          default "110";
          description
            "Distance for intra-area routes";
        }
        leaf inter-area {
          type uint32 {
            range "1..255";
          }
          default "110";
          description
            "Distance for inter-area routes";
        }
        leaf external-routes {
          type uint32 {
            range "1..255";
          }
          default "110";
          description
            "Distance for external type 5 and type 7 routes";
        }
      }
      container ip-distances {
        description
          "IP specific administrative distance
           configuration";
        list ip-distance {
          key "address wildcard";
          description
            "Administrative distance configuration for a
             particular IP address";
          leaf address {
            type inet:ipv4-address-no-zone;
            description
              "IP source address";
          }
          leaf wildcard {
            type inet:ipv4-address-no-zone;
            description
              "IP wild card bits -- inverted mask";
          }
          leaf distance {
            type uint32 {
              range "1..255";
            }
            default "110";
            description
              "Administrative distance";
          }
          leaf access-list-name {
            type string;
            description
              "Access Control List name";
          }
        }
      }
      leaf admin-distance {
        type uint32 {
          range "1..255";
        }
        default "110";
        description
          "Define an administrative distance";
      }
    }
  }

  grouping MAX-METRIC {
    description
      "Common node of default-vrf, vrf";
    container max-metric {
      description
        "Set maximum metric configuration";
      container max-metric-on-proc-restart {
        description
          "Set maximum metric on-proc-restart
           configuration";
        leaf wait-for-bgp {
          type boolean;
          default "false";
          description
            "Let BGP decide when to originate router-LSA
             with normal metric";
        }
        leaf startup-max {
          type uint32 {
            range "5..86400";
          }
          units "second";
          description
            "Time in seconds to originate router-LSA with
             max-metric";
        }
        leaf include-stub {
          type boolean;
          description
            "Set maximum metric for stub links in
             router-LSAs";
        }
        leaf summary-lsa {
          type boolean;
          description
            "Override summary-lsa metric with max-metric
             value";
        }
        leaf summary-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in summary-LSAs (default
             16711680)";
        }
        leaf external-lsa {
          type boolean;
          description
            "Override external-lsa metric with max-metric
             value";
        }
        leaf external-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in external-LSAs (default
             16711680)";
        }
      }
      container max-metric-on-startup {
        description
          "Set maximum metric on-startup configuration";
        leaf wait-for-bgp {
          type boolean;
          default "false";
          description
            "Let BGP decide when to originate router-LSA
             with normal metric";
        }
        leaf startup-max {
          type uint32 {
            range "5..86400";
          }
          units "second";
          description
            "Time in seconds to originate router-LSA with
             max-metric";
        }
        leaf include-stub {
          type boolean;
          description
            "Set maximum metric for stub links in
             router-LSAs";
        }
        leaf summary-lsa {
          type boolean;
          description
            "Override summary-lsa metric with max-metric
             value";
        }
        leaf summary-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in summary-LSAs (default
             16711680)";
        }
        leaf external-lsa {
          type boolean;
          description
            "Override external-lsa metric with max-metric
             value";
        }
        leaf external-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in external-LSAs (default
             16711680)";
        }
      }
      container max-metric-on-proc-migration {
        description
          "Set maximum metric on-proc-migration
           configuration";
        leaf wait-for-bgp {
          type boolean;
          default "false";
          description
            "Let BGP decide when to originate router-LSA
             with normal metric";
        }
        leaf startup-max {
          type uint32 {
            range "5..86400";
          }
          units "second";
          description
            "Time in seconds to originate router-LSA with
             max-metric";
        }
        leaf include-stub {
          type boolean;
          description
            "Set maximum metric for stub links in
             router-LSAs";
        }
        leaf summary-lsa {
          type boolean;
          description
            "Override summary-lsa metric with max-metric
             value";
        }
        leaf summary-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in summary-LSAs (default
             16711680)";
        }
        leaf external-lsa {
          type boolean;
          description
            "Override external-lsa metric with max-metric
             value";
        }
        leaf external-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in external-LSAs (default
             16711680)";
        }
      }
      container max-metric-always {
        description
          "Set maximum metric always configuration";
        leaf include-stub {
          type boolean;
          default "false";
          description
            "Set maximum metric for stub links in
             router-LSAs";
        }
        leaf summary-lsa {
          type boolean;
          description
            "Override summary-lsa metric with max-metric
             value";
        }
        leaf summary-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in summary-LSAs (default
             16711680)";
        }
        leaf external-lsa {
          type boolean;
          description
            "Override external-lsa metric with max-metric
             value";
        }
        leaf external-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in external-LSAs (default
             16711680)";
        }
      }
      container max-metric-on-switchover {
        description
          "Set maximum metric on-switchover configuration";
        leaf wait-for-bgp {
          type boolean;
          default "false";
          description
            "Let BGP decide when to originate router-LSA
             with normal metric";
        }
        leaf startup-max {
          type uint32 {
            range "5..86400";
          }
          units "second";
          description
            "Time in seconds to originate router-LSA with
             max-metric";
        }
        leaf include-stub {
          type boolean;
          description
            "Set maximum metric for stub links in
             router-LSAs";
        }
        leaf summary-lsa {
          type boolean;
          description
            "Override summary-lsa metric with max-metric
             value";
        }
        leaf summary-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in summary-LSAs (default
             16711680)";
        }
        leaf external-lsa {
          type boolean;
          description
            "Override external-lsa metric with max-metric
             value";
        }
        leaf external-lsa-maximum-metric {
          type uint32 {
            range "1..16777215";
          }
          description
            "Overriding metric in external-LSAs (default
             16711680)";
        }
      }
      leaf max-metric-no-abr-off {
        type empty;
        description
          "Block ABR-disable mode entry while in
           max-metric mode";
      }
    }
  }

  grouping DEMAND-CIRCUIT {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf demand-circuit {
      type boolean;
      default "false";
      description
        "Enable/Disable OSPF demand circuit";
    }
  }

  grouping MAXIMUM-INTERFACES {
    description
      "Common node of default-vrf, vrf";
    leaf maximum-interfaces {
      type uint32 {
        range "1..4294967295";
      }
      default "1024";
      description
        "Max number of interfaces allowed to be
         configured";
    }
  }

  grouping EXCLUDE-INTERFACE-TABLE {
    description
      "Common node of per-link, per-prefix, ucmp";
    container exclude-interfaces {
      description
        "Fast-reroute per-link/per-prefix or UCMP exclude
         interface configuration";
      list exclude-interface {
        key "interface-name";
        description
          "Exclude an interface from becoming a backup or
           UCMP";
        leaf interface-name {
          type xr:Interface-name;
          description
            "Interface";
        }
      }
    }
  }

  grouping IPV4-OSPF-FRR-CFG-EXCLUDE-INTERFACE-TABLE {
    description
      "Common node of per-link, per-prefix, ucmpCommon
       node of per-link, per-prefix";
    container exclude-interfaces {
      description
        "Fast-reroute per-link/per-prefix or UCMP exclude
         interface configuration";
      list exclude-interface {
        key "interface-name";
        description
          "Exclude an interface from becoming a backup or
           UCMP";
        leaf interface-name {
          type xr:Interface-name;
          description
            "Interface";
        }
      }
    }
  }

  grouping TRANSMIT-DELAY {
    description
      "Common node of process-scope, area-scope,
       name-scope, virtual-link-scope, sham-link-scope,
       multi-area-interface-scope";
    leaf transmit-delay {
      type uint32 {
        range "1..65535";
      }
      units "second";
      default "1";
      description
        "Number of seconds to delay transmission of LSAs";
    }
  }

  grouping NO-OPAQUE {
    description
      "Common node of default-vrf, vrf";
    leaf no-opaque {
      type empty;
      description
        "Disable opaque LSAs";
    }
  }

  grouping COST-FALLBACK {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope";
    container cost-fallback {
      description
        "Interface fallback cost";
      leaf cost {
        type uint32 {
          range "1..65535";
        }
        description
          "Fallback cost of link";
      }
      leaf threshold {
        type uint32 {
          range "1..4294967";
        }
        description
          "Bandwidth threshold";
      }
    }
  }

  grouping SEGMENT-ROUTING {
    description
      "Common node of process-scope, area";
    leaf segment-routing {
      type Ospf-segment-routing;
      description
        "segment-routing configuration Applicable only in
         Default VRF";
    }
  }

  grouping SUMMARY-IN {
    description
      "Common node of process-scope, area";
    leaf summary-in {
      type boolean;
      description
        "Enable/Disable an OSPF area to advertise
         external prefixes into this area as summary";
    }
  }

  grouping LDP-AUTO-CONFIG {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf ldp-auto-config {
      type empty;
      description
        "Enable MPLS LDP Auto Config";
    }
  }

  grouping PASSIVE {
    description
      "Common node of process-scope, area-scope,
       name-scopeCommon node of process-scope,
       area-scope, name-scope,
       multi-area-interface-scope";
    leaf passive {
      type boolean;
      default "false";
      description
        "When enabled, prevent sending HELLO packets over
         link";
    }
  }

  grouping AREA-TABLE {
    description
      "Common node of default-vrf, vrf";
    container area-addresses {
      description
        "Area configuration";

      grouping AREA-CONTENT {
        description
          "AREA CONTENT";
        container virtual-link-scopes {
          description
            "Virtual Link scope configurations";
          list virtual-link-scope {
            key "address";
            description
              "Virtual Link configuration";
            leaf address {
              type inet:ipv4-address-no-zone;
              description
                "Router ID of virtual link neighbor";
            }
            uses AUTHENTICATION;
            uses HELLO-INTERVAL;
            uses TRANSMIT-DELAY;
            uses DEAD-INTERVAL-MINIMAL;
            uses RETRANSMIT-INTERVAL;
          }
        }
        container sham-link-scopes {
          description
            "Sham Link scope configurations";
          list sham-link-scope {
            key "source-address destination-address";
            description
              "Sham Link configuration";
            leaf source {
              type inet:ipv4-address-no-zone;
              description
                "Address of the local sham-link endpoint.
                 Enter an IP Address";
            }
            leaf source-address {
              type inet:ipv4-address-no-zone;
              description
                "Address of the local sham-link endpoint";
            }
            leaf destination-address {
              type inet:ipv4-address-no-zone;
              description
                "Address of the remote sham-link endpoint";
            }
            uses COST;
            uses AUTHENTICATION;
            uses HELLO-INTERVAL;
            uses TRANSMIT-DELAY;
            uses DEAD-INTERVAL-MINIMAL;
            uses RETRANSMIT-INTERVAL;
          }
        }
        container area-scope {
          description
            "Area scope configuration";
          uses DISTRIBUTE-LIST;
          uses COST;
          uses BFD;
          uses WEIGHT;
          uses PREFIX-SUPPRESSION-PRIMARY;
          uses MTU-IGNORE;
          uses AUTHENTICATION;
          uses LDP-SYNC-IGP-SHORTCUTS;
          uses LDP-AUTO-CONFIG;
          uses SECURITY;
          uses NETWORK-TYPE;
          uses HELLO-INTERVAL;
          uses LOOPBACK-STUB-NETWORK;
          uses PREFIX-SUPPRESSION-SECONDARY;
          uses DEMAND-CIRCUIT;
          uses PASSIVE;
          uses TRANSMIT-DELAY;
          uses PACKET-SIZE;
          uses LDP-SYNC;
          uses DATABASE-FILTER;
          uses DEAD-INTERVAL-MINIMAL;
          uses IPV4-OSPF-FRR-CFG-FAST-REROUTE;
          uses LINK-DOWN-FAST-DETECT;
          uses SEGMENT-ROUTING-FORWARDING;
          uses RETRANSMIT-INTERVAL;
          uses IPV4-OSPF-CFG-PRIORITY;
          uses FLOOD-REDUCTION;
          uses COST-FALLBACK;
        }
        container name-scopes {
          description
            "Name scope configurations";
          list name-scope {
            key "interface-name";
            description
              "Name scope configuration";
            container adjacency-sids {
              description
                "Configured Adjacency SID information";
              list adjacency-sid {
                key "sid-type sid-value";
                description
                  "Configured Adjacency SID";
                leaf sid-type {
                  type Ospf-sid;
                  description
                    "OSPF Adj SID Type";
                }
                leaf sid-value {
                  type uint32 {
                    range "0..1048575";
                  }
                  description
                    "SID Value";
                }
                leaf protected {
                  type boolean;
                  default "false";
                  description
                    "Adj SID eligible for protection";
                }
                leaf neighbor-address {
                  type inet:ipv4-address-no-zone;
                  default "0.0.0.0";
                  description
                    "Neighbor IP address";
                }
              }
            }
            container prefix-sid {
              presence "Indicates a prefix-sid node is configured.";
              description
                "Prefix SID";
              leaf sid-value {
                type uint32 {
                  range "0..1048575";
                }
                mandatory true;
                description
                  "SID value";
              }
              leaf explicit-null {
                type boolean;
                default "false";
                description
                  "Force Penultimate Hop To Send Explicit-Null
                   Label";
              }
              leaf type {
                type Ospf-sid;
                mandatory true;
                description
                  "OSPF SID Type";
              }
              leaf n-flag-clear {
                type boolean;
                default "false";
                description
                  "Not a node SID";
              }
            }
            container prefix-sid-strict {
              presence "Indicates a prefix-sid-strict node is configured.";
              description
                "Strict Prefix SID";
              leaf sid-value {
                type uint32 {
                  range "0..1048575";
                }
                mandatory true;
                description
                  "SID value";
              }
              leaf explicit-null {
                type boolean;
                default "false";
                description
                  "Force Penultimate Hop To Send Explicit-Null
                   Label";
              }
              leaf type {
                type Ospf-sid;
                mandatory true;
                description
                  "OSPF SID Type";
              }
              leaf n-flag-clear {
                type boolean;
                default "false";
                description
                  "Not a node SID";
              }
            }
            leaf interface-name {
              type xr:Interface-name;
              description
                "Name of Interface to configure";
            }
            uses DISTRIBUTE-LIST;
            uses COST;
            uses BFD;
            uses WEIGHT;
            uses PREFIX-SUPPRESSION-PRIMARY;
            uses MTU-IGNORE;
            uses AUTHENTICATION;
            uses LDP-SYNC-IGP-SHORTCUTS;
            uses LDP-AUTO-CONFIG;
            uses SECURITY;
            uses NEIGHBOR-TABLE;
            uses NETWORK-TYPE;
            uses HELLO-INTERVAL;
            uses LOOPBACK-STUB-NETWORK;
            uses PREFIX-SUPPRESSION-SECONDARY;
            uses DEMAND-CIRCUIT;
            uses PASSIVE;
            uses TRANSMIT-DELAY;
            uses PACKET-SIZE;
            uses LDP-SYNC;
            uses DATABASE-FILTER;
            uses DEAD-INTERVAL-MINIMAL;
            uses IPV4-OSPF-FRR-CFG-FAST-REROUTE;
            uses LINK-DOWN-FAST-DETECT;
            uses SEGMENT-ROUTING-FORWARDING;
            uses RETRANSMIT-INTERVAL;
            uses IPV4-OSPF-CFG-PRIORITY;
            uses FLOOD-REDUCTION;
            uses COST-FALLBACK;
          }
        }
        container multi-area-interface-scopes {
          description
            "Multi Area Interface scope configurations";
          list multi-area-interface-scope {
            key "interface-name";
            description
              "Multi Area Interface configuration";
            leaf interface-name {
              type xr:Interface-name;
              description
                "Name of Multi Area Interface to configure";
            }
            uses DISTRIBUTE-LIST;
            uses COST;
            uses MTU-IGNORE;
            uses AUTHENTICATION;
            uses NEIGHBOR-TABLE;
            uses HELLO-INTERVAL;
            uses PASSIVE;
            uses TRANSMIT-DELAY;
            uses PACKET-SIZE;
            uses DATABASE-FILTER;
            uses DEAD-INTERVAL-MINIMAL;
            uses IPV4-OSPF-FRR-CFG-FAST-REROUTE;
            uses RETRANSMIT-INTERVAL;
            uses COST-FALLBACK;
          }
        }
        container area-ranges {
          description
            "Summarize routes matching address/mask (border
             routers only)";
          list area-range {
            key "address netmask";
            description
              "Ordering index";
            leaf not-advertise {
              type boolean;
              description
                "Do not advertise this range";
            }
            leaf address {
              type inet:ipv4-address-no-zone;
              description
                "IP address to match";
            }
            leaf netmask {
              type inet:ipv4-address-no-zone;
              description
                "IP netmask for address";
            }
          }
        }
        container nssa {
          description
            "Specify area as a NSSA area";
          leaf no-redistribution {
            type boolean;
            default "false";
            description
              "No redistribution into this NSSA area";
          }
          leaf default-info-originate {
            type boolean;
            default "false";
            description
              "Originate Type 7 default into NSSA area";
          }
          leaf no-summary {
            type boolean;
            default "false";
            description
              "Do not send summary LSA into NSSA";
          }
          leaf nssa-def-metric {
            type uint32 {
              range "1..16777214";
            }
            description
              "OSPF default metric";
          }
          leaf metric-type {
            type Ospf-link-state-metric;
            default "type2";
            description
              "OSPF External metric type";
          }
        }
        leaf route-policy-in {
          type string;
          description
            "Configure a route policy for inbound type-3
             lsa filtering";
        }
        leaf default-cost {
          type uint32 {
            range "1..16777215";
          }
          default "1";
          description
            "Set the summary default-cost of a NSSA/stub
             area";
        }
        leaf route-policy-out {
          type string;
          description
            "Configure a route policy for outbound type-3
             lsa filtering";
        }
        leaf stub {
          type boolean;
          description
            "Specify the area as a stub area (send summary
             LSA stub area)";
        }
        leaf type7-translate-always {
          type boolean;
          description
            "Translate Type 7 to Type 5, even if not
             elected NSSA translator";
        }
        leaf mpls-traffic-eng {
          type empty;
          description
            "Configure an OSPF area to run MPLS Traffic
             Engineering";
        }
        uses EXTERNAL-OUT;
        uses SUMMARY-IN;
        uses SEGMENT-ROUTING;
      }
      list area-address {
        key "address";
        description
          "Configuration for a particular area";
        leaf address {
          type inet:ipv4-address-no-zone;
          description
            "Area ID if in IP address format";
        }
        uses AREA-CONTENT;
      }
      list area-area-id {
        key "area-id";
        description
          "Configuration for a particular area";
        leaf area-id {
          type uint32 {
            range "0..4294967295";
          }
          description
            "Area ID if in integer format";
        }
        uses AREA-CONTENT;
      }
    }
  }

  grouping AUTO-COST {
    description
      "Common node of default-vrf, vrf";
    container auto-cost {
      description
        "Controls automatic cost based on bandwidth";
      leaf disable {
        type boolean;
        default "false";
        description
          "Disabling auto costing";
      }
      leaf bandwidth {
        type uint32 {
          range "1..4294967";
        }
        units "Mbit/s";
        default "100";
        description
          "The reference bandwidth in terms of Mbits per
           second";
      }
    }
  }

  grouping TIMERS {
    description
      "Common node of default-vrf, vrf";
    container timers {
      description
        "Adjust routing timers";
      container spf-timer {
        description
          "OSPF SPF timers (in milliseconds)";
        leaf initial-delay {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "5000";
          description
            "Number of milliseconds before first SPF run";
        }
        leaf backoff-increment {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "10000";
          description
            "Number of milliseconds delay between
             successive SPF runs";
        }
        leaf max-delay {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "10000";
          description
            "Max number of milliseconds between consecutive
             SPF calculations";
        }
      }
      container lsa-generation-timer {
        description
          "OSPF LSA timers (in milliseconds)";
        leaf initial-delay {
          type uint32 {
            range "0..600000";
          }
          units "millisecond";
          default "50";
          description
            "Number of milliseconds before generating first
             LSA";
        }
        leaf backoff-increment {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "200";
          description
            "Number of milliseconds delay between
             successive LSA builds";
        }
        leaf max-delay {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "200";
          description
            "Max number of milliseconds between consecutive
             LSA builds ";
        }
      }
      leaf lsa-pacing-flood {
        type uint32 {
          range "5..100";
        }
        units "second";
        description
          "Seconds between group of LSAs being refreshed
           or maxaged";
      }
      leaf fast-reroute-timer {
        type uint32 {
          range "50..600000";
        }
        units "millisecond";
        default "500";
        description
          "Number of ms between end of SPF and start of
           IPFRR computation";
      }
      leaf lsa-refresh {
        type uint32 {
          range "1800..2700";
        }
        units "second";
        default "1800";
        description
          "How often self-originated LSAs should be
           refreshed";
      }
      leaf lsa-group-pacing {
        type uint32 {
          range "10..1800";
        }
        units "second";
        default "240";
        description
          "LSA group pacing timer (Seconds between group
           of LSAs being refreshed or maxaged)";
      }
      leaf lsa-min-arrival {
        type uint32 {
          range "0..600000";
        }
        units "millisecond";
        default "100";
        description
          "MinLSArrival timer (minimum interval in
           milliseconds between accepting the same LSA)";
      }
    }
  }

  grouping NETWORK-TYPE {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf network-type {
      type Ospf-network;
      description
        "Type of attached network";
    }
  }

  grouping WEIGHT {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf weight {
      type uint32 {
        range "1..16777214";
      }
      description
        "Interface weight";
    }
  }

  grouping REDISTRIBUTION {
    description
      "Common node of default-vrf, vrf";
    container redistribution {
      description
        "Redistribute configurations";
      container redistributes {
        description
          "Redistribute information from another routing
           protocol";
        list redistribute {
          must "connected-or-static-or-dagr-or-subscriber-or-mobile-or-rip or application-or-isis-or-ospf or bgp or eigrp" {
            description
              "Connected-or-Static-or-DAGR-or-Subscriber-or-Mobile-or-RIP or Application-or-ISIS-or-OSPF or BGP or EIGRP must be present.";
          }
          key "protocol-name";
          description
            "Redistribute information from another routing
             protocol";

          grouping REDISTRIBUTE-CONTENT {
            description
              "REDISTRIBUTE CONTENT";
            leaf classful {
              type boolean;
              default "false";
              description
                "Disallow subnetting";
            }
            leaf default-redistributed-route-metric {
              type uint32 {
                range "1..16777214";
              }
              description
                "Default metric for routes being
                 redistributed into OSPF";
            }
            leaf tag {
              type uint32 {
                range "0..4294967295";
              }
              description
                "Set tag for routes redistributed into OSPF";
            }
            leaf metric-type {
              type Ospf-link-state-metric;
              description
                "Set OSPF External metric type";
            }
            leaf eigrp-route-type {
              type Ospf-eigrp-route;
              description
                "EIGRP route type";
            }
            leaf isis-levels {
              type Ospf-route-level;
              description
                "Levels of ISIS routes";
            }
            leaf ospf-internal {
              type boolean;
              description
                "OSPF_Internal route type";
            }
            leaf ospf-external {
              type Ospf-route-level;
              description
                "OSPF external route types";
            }
            leaf ospf-nssa-level {
              type Ospf-route-level;
              description
                "OSPF NSSA external route types";
            }
            leaf route-policy-name {
              type string;
              description
                "Routing policy name";
            }
            leaf bgp-preserve-med {
              type boolean;
              description
                "Preserve MED of BGP routes";
            }
            leaf bgp-preserve-default-info {
              type boolean;
              description
                "Preserve Metric and Metric Type of BGP
                 Default Route";
            }
            leaf ospf-redist-lsa-type {
              type Ospf-redist-lsa;
              default "external";
              description
                "LSA type for redistributed routes";
            }
            leaf ospfnssa-only {
              type boolean;
              description
                "Only redistribute to NSSA areas";
            }
            leaf ospf-use-rib-metric {
              type boolean;
              description
                "Use metric from RIB for redistributed routes";
            }
          }
          container connected-or-static-or-dagr-or-subscriber-or-mobile-or-rip {
            when "../protocol-name = 'connected' or ../protocol-name = 'static' or ../protocol-name = 'dagr' or ../protocol-name = 'subscriber' or ../protocol-name = 'mobile' or ../protocol-name = 'rip'" {
              description
                "../ProtocolName = Connected or .
                 ./ProtocolName = Static or ../ProtocolName
                 = DAGR or ../ProtocolName = Subscriber or .
                 ./ProtocolName = Mobile or ../ProtocolName
                 = RIP";
            }
            presence "Indicates that this node is configured.";
            description
              "connected or static or dagr or subscriber or
               mobile or rip";
            uses REDISTRIBUTE-CONTENT;
          }
          leaf protocol-name {
            type Ospf-redist-protocol;
            description
              "Distribute list protocol type";
          }
          list application-or-isis-or-ospf {
            when "../protocol-name = 'application' or ../protocol-name = 'isis' or ../protocol-name = 'ospf'" {
              description
                "../ProtocolName = Application or .
                 ./ProtocolName = ISIS or ../ProtocolName =
                 OSPF";
            }
            key "instance-name";
            description
              "application or isis or ospf";
            leaf instance-name {
              type xr:Cisco-ios-xr-string;
              description
                "OSPF or ISIS process name or protocol name:
                 bgp, eigrp, connected";
            }
            uses REDISTRIBUTE-CONTENT;
          }
          list bgp {
            when "../protocol-name = 'bgp'" {
              description
                "../ProtocolName = BGP";
            }
            key "instance-name as-xx as-yy";
            description
              "bgp";
            leaf instance-name {
              type xr:Cisco-ios-xr-string;
              description
                "OSPF or ISIS process name or protocol name:
                 bgp, eigrp, connected";
            }
            leaf as-xx {
              type uint32 {
                range "0..65535";
              }
              description
                "First half of BGP AS number in XX.YY format.
                 Mandatory if Protocol is BGP and must not be
                 specified otherwise. Must be a non-zero
                 value if second half is zero.";
            }
            leaf as-yy {
              type uint32 {
                range "0..4294967295";
              }
              description
                "Second half of BGP AS number in XX.YY format
                 . Mandatory if Protocol is BGP or EIGRP and
                 must not be specified otherwise. Must be a
                 non-zero value if first half is zero.";
            }
            uses REDISTRIBUTE-CONTENT;
          }
          list eigrp {
            when "../protocol-name = 'eigrp'" {
              description
                "../ProtocolName = EIGRP";
            }
            key "instance-name as-xx";
            description
              "eigrp";
            leaf instance-name {
              type xr:Cisco-ios-xr-string;
              description
                "OSPF or ISIS process name or protocol name:
                 bgp, eigrp, connected";
            }
            leaf as-xx {
              type uint32 {
                range "0..65535";
              }
              description
                "First half of BGP AS number in XX.YY format.
                 Mandatory if Protocol is BGP and must not be
                 specified otherwise. Must be a non-zero
                 value if second half is zero.";
            }
            uses REDISTRIBUTE-CONTENT;
          }
        }
      }
    }
  }

  grouping EXTERNAL-OUT {
    description
      "Common node of process-scope, area";
    leaf external-out {
      type boolean;
      description
        "Enable/Disable an OSPF area to advertise
         intra-area prefixes out of this area as external";
    }
  }

  grouping AF {
    description
      "Common node of default-vrf, vrf";
    container af {
      presence "Indicates a af node is configured.";
      description
        "OSPF address family";
      leaf af-name {
        type Ospf-address-family;
        mandatory true;
        description
          "Address family";
      }
      leaf saf-name {
        type Ospf-sub-address-family;
        description
          "Sub-Address family";
      }
    }
  }

  grouping DEFAULT-INFORMATION {
    description
      "Common node of default-vrf, vrf";
    container default-information {
      description
        "Control distribution of default information";
      leaf always-advertise {
        type boolean;
        default "false";
        description
          "Always advertise default route";
      }
      leaf metric {
        type uint32 {
          range "1..16777214";
        }
        default "1";
        description
          "OSPF metric";
      }
      leaf metric-type {
        type Ospf-link-state-metric;
        default "type2";
        description
          "OSPF External metric type";
      }
      leaf route-policy-name {
        type string;
        description
          "Routing policy name";
      }
    }
  }

  grouping PREFIX-SUPPRESSION-SECONDARY {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf prefix-suppression-secondary {
      type boolean;
      default "false";
      description
        "Enable/Disable prefix suppression for secondary
         addresses";
    }
  }

  grouping MAXIMUM-PATHS {
    description
      "Common node of default-vrf, vrf";
    leaf maximum-paths {
      type uint32 {
        range "1..64";
      }
      description
        "Forward packets over multiple paths (number of
         paths)";
    }
  }

  grouping DATABASE-FILTER {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope";
    leaf database-filter {
      type boolean;
      default "false";
      description
        "Filter OSPF LSA during synchronization and
         flooding";
    }
  }

  grouping LINK-DOWN-FAST-DETECT {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf link-down-fast-detect {
      type boolean;
      default "false";
      description
        "Enable/Disable registration for early interface
         down notifications";
    }
  }

  grouping LDP-SYNC-IGP-SHORTCUTS {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf ldp-sync-igp-shortcuts {
      type boolean;
      description
        "Enable/Disable MPLS LDP sync for igp-shortcuts";
    }
  }

  grouping MICROLOOP {
    description
      "Common node of default-vrf, vrf";
    container microloop {
      description
        "Microloop configuration";
      container avoidance {
        description
          "Microloop avoidance configuration";
        leaf enable {
          type Ospf-uloop-avoidance;
          default "all";
          description
            "MicroLoop avoidance feature enable
             configuration";
        }
        leaf rib-update-delay {
          type uint32 {
            range "1..600000";
          }
          units "millisecond";
          default "5000";
          description
            "Delay to introduce between SPF and RIB update
             in msecs";
        }
      }
    }
  }

  grouping DEAD-INTERVAL-MINIMAL {
    description
      "Common node of process-scope, area-scope,
       name-scope, virtual-link-scope, sham-link-scope,
       multi-area-interface-scope";
    container dead-interval-minimal {
      description
        "Interval after which a neighbor is declared dead";
      leaf interval {
        type uint32 {
          range "1..65535";
        }
        units "second";
        description
          "Interval size in seconds after which a neighbor
           is declared dead";
      }
      leaf multiplier {
        type uint32 {
          range "3..20";
        }
        description
          "Number of Hellos in one second";
      }
    }
  }

  grouping CANDIDATE-INTERFACE-TABLE {
    description
      "Common node of per-link, per-prefix";
    container candidate-interfaces {
      description
        "Fast-reroute per-link/per-prefix candidate
         interface configuration";
      list candidate-interface {
        key "interface-name";
        description
          "Candidate backup interface";
        leaf interface-name {
          type xr:Interface-name;
          description
            "Interface";
        }
      }
    }
  }

  grouping IPV4-OSPF-FRR-CFG-CANDIDATE-INTERFACE-TABLE {
    description
      "Common node of per-link, per-prefixCommon node of
       per-link, per-prefix";
    container candidate-interfaces {
      description
        "Fast-reroute per-link/per-prefix candidate
         interface configuration";
      list candidate-interface {
        key "interface-name";
        description
          "Candidate backup interface";
        leaf interface-name {
          type xr:Interface-name;
          description
            "Interface";
        }
      }
    }
  }

  grouping QUEUE {
    description
      "Common node of default-vrf, vrf";
    container queue {
      description
        "Adjust OSPF input queue sizes and processing
         quantums";
      leaf dispatch-rate-limited-flush {
        type uint32 {
          range "30..3000";
        }
        default "150";
        description
          "Maximum number of continuous rate-limited LSAs
           processed for FLUSH";
      }
      leaf limit-high {
        type uint32 {
          range "1000..30000";
        }
        default "9500";
        description
          "Hello events are dropped when incoming event
           queue exceeds this";
      }
      leaf dispatch-spf-lsa-limit {
        type uint32 {
          range "30..3000";
        }
        default "150";
        description
          "Maximum number of continuous summary or
           external LSAs processed";
      }
      leaf limit-low {
        type uint32 {
          range "1000..30000";
        }
        default "8000";
        description
          "DBDs/Updates are dropped when incoming event
           queue exceeds this";
      }
      leaf dispatch-rate-limited {
        type uint32 {
          range "30..3000";
        }
        default "150";
        description
          "Maximum number of continuous rate-limited LSAs
           processed";
      }
      leaf limit-medium {
        type uint32 {
          range "1000..30000";
        }
        default "9000";
        description
          "LSA ACKs are dropped when incoming event queue
           exceeds this";
      }
      leaf dispatch-incoming {
        type uint32 {
          range "30..3000";
        }
        default "300";
        description
          "Maximum number of continuous incoming
           packet-related events processed";
      }
    }
  }

  grouping AUTHENTICATION {
    description
      "Common node of process-scope, area-scope,
       name-scope, virtual-link-scope, sham-link-scope,
       multi-area-interface-scope";
    container authentication {
      description
        "Authentication";
      container type {
        description
          "Authentication type";
        leaf authen-type {
          type Ospf-authentication;
          description
            "Authentication type code ";
        }
        leaf keychain-authen-type {
          type Ospf-keychain-auth;
          description
            "Keychain authentication type";
        }
        leaf keychain-name {
          type string;
          description
            "Keychain name";
        }
      }
      container message-digest-keys {
        description
          "Message digest authentication password (key)
           configurations, first 16 chars used";
        list message-digest-key {
          key "key-id";
          description
            "Message digest authentication password (key)
             configuration";
          leaf key-id {
            type uint32 {
              range "1..255";
            }
            description
              "Key ID";
          }
          leaf password {
            type xr:Proprietary-password;
            mandatory true;
            description
              "Password";
          }
        }
      }
      leaf key {
        type xr:Proprietary-password;
        description
          "Authentication key configuration";
      }
    }
  }

  grouping MAXIMUM-REDISTRIBUTE-PREFIX {
    description
      "Common node of default-vrf, vrf";
    container maximum-redistribute-prefix {
      description
        "Maximum number of prefixes redistributed into
         OSPF";
      leaf number-of-prefixes {
        type uint32 {
          range "1..4294967295";
        }
        description
          "Maximum number of prefixes redistributed";
      }
      leaf threshold {
        type uint32 {
          range "1..100";
        }
        description
          "Threshold value (%) at which to generate a
           warning msg";
      }
      leaf warning-only {
        type boolean;
        description
          "Only give warning messsage when limit is
           exceeded";
      }
    }
  }

  grouping SEGMENT-ROUTING-FORWARDING {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf segment-routing-forwarding {
      type Ospf-segment-routing-forwarding;
      description
        "segment-routing forwarding configuration
         Applicableonly in Default VRF";
    }
  }

  grouping DISTRIBUTE-LIST {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope";
    container distribute-list {
      presence "enable distribute-list";
      description
        "Filter networks intalled to RIB (disable as ACL
         name means filtering is disabled)";
      leaf access-list-name {
        type string;
        must "not(../route-policy-name)";
        description
          "Access Control List name";
      }
      leaf route-policy-name {
        type string;
        must "not(../access-list-name)";
        description
          "Route Policy name";
      }
    }
  }

  grouping COST {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope,
       sham-link-scope";
    leaf cost {
      type uint32 {
        range "1..65535";
      }
      description
        "Interface cost";
    }
  }

  grouping PACKET-SIZE {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope";
    leaf packet-size {
      type uint32 {
        range "576..10000";
      }
      description
        "Customize size of OSPF packets upto MTU";
    }
  }

  grouping FAST-REROUTE {
    description
      "Common node of default-vrf, vrf";
    container fast-reroute {
      description
        "Fast-reroute instance scoped parameters";
      container per-link {
        description
          "Fast-reroute per-link global configuration";
        uses PRIORITY;
      }
      container per-prefix {
        description
          "Fast-reroute per-prefix global configuration";
        container tiebreakers {
          description
            "Fast-reroute tiebreakers configurations";
          list tiebreaker {
            key "tiebreaker-type";
            description
              "Fast-reroute tiebreakers configuration";
            leaf tiebreaker-type {
              type Ospf-fast-reroute-tiebreakers;
              description
                "Tiebreaker type";
            }
            leaf tiebreaker-index {
              type uint32 {
                range "0..255";
              }
              mandatory true;
              description
                "Index value for a tiebreaker, 0 to disable";
            }
          }
        }
        leaf load-sharing-disable {
          type empty;
          description
            "Disable load sharing between multiple backups";
        }
        uses PRIORITY;
      }
    }
  }

  grouping IPV4-OSPF-FRR-CFG-FAST-REROUTE {
    description
      "Common node of default-vrf, vrfCommon node of
       area-scope, name-scope,
       multi-area-interface-scope";
    container fast-reroute {
      description
        "Fast-reroute configuration";
      container per-link {
        description
          "Fast-reroute per-link configuration";
        uses FAST-REROUTE-USE-CANDIDATE-ONLY;
        uses IPV4-OSPF-FRR-CFG-CANDIDATE-INTERFACE-TABLE;
        uses IPV4-OSPF-FRR-CFG-EXCLUDE-INTERFACE-TABLE;
      }
      container per-prefix {
        description
          "Fast-reroute per-prefix global configuration";
        container remote-lfa {
          description
            "Remote LFA configuration";
          leaf tunnel {
            type Ospf-frr-rlfa-tunnel;
            description
              "Enable/Disable remote LFA computation";
          }
          leaf maximum-cost {
            type uint32 {
              range "1..4294967295";
            }
            description
              "Maximum path cost to remote LFA";
          }
        }
        container tiebreakers {
          description
            "Fast-reroute tiebreakers configurations";
          list tiebreaker {
            key "tiebreaker-type";
            description
              "Fast-reroute tiebreakers configuration";
            leaf tiebreaker-type {
              type Ospf-fast-reroute-tiebreakers-intf;
              description
                "Tiebreaker type";
            }
            leaf tiebreaker-index {
              type uint32 {
                range "0..255";
              }
              mandatory true;
              description
                "Index value for a tiebreaker, 0 to disable";
            }
          }
        }
        leaf topology-independent-lfa {
          type boolean;
          description
            "Topology Independet LFA configuration";
        }
        uses FAST-REROUTE-USE-CANDIDATE-ONLY;
        uses IPV4-OSPF-FRR-CFG-CANDIDATE-INTERFACE-TABLE;
        uses IPV4-OSPF-FRR-CFG-EXCLUDE-INTERFACE-TABLE;
      }
      leaf fast-reroute-enable {
        type Ospf-fast-reroute;
        description
          "Enable/Disable Fast-reroute per-link or
           per-prefix";
      }
    }
  }

  grouping SUMMARY-PREFIX-TABLE {
    description
      "Common node of default-vrf, vrf";
    container summary-prefixes {
      description
        "Configure IP prefix summary";

      grouping SUMMARY-PREFIX-CONTENT {
        description
          "Content grouping.";
        leaf not-advertise {
          type boolean;
          default "false";
          description
            "Do not advertise when translating OSPF type-7
             LSA";
        }
        leaf tag {
          type uint32 {
            range "0..4294967295";
          }
          description
            "32-bit tag value";
        }
      }
      container summary-prefix-data {
        description
          "Data container.";
        uses SUMMARY-PREFIX-CONTENT;
      }
      list prefix-and-netmask {
        key "prefix netmask";
        description
          "keys: prefix, netmask";
        leaf prefix {
          type inet:ipv4-address-no-zone;
          description
            "IP summary prefix";
        }
        leaf netmask {
          type inet:ipv4-address-no-zone;
          description
            "Summary netmask";
        }
        uses SUMMARY-PREFIX-CONTENT;
      }
      list prefix {
        key "prefix";
        description
          "keys: prefix";
        leaf prefix {
          type inet:ipv4-address-no-zone;
          description
            "IP summary prefix";
        }
        uses SUMMARY-PREFIX-CONTENT;
      }
      list netmask {
        key "netmask";
        description
          "keys: netmask";
        leaf netmask {
          type inet:ipv4-address-no-zone;
          description
            "Summary netmask";
        }
        uses SUMMARY-PREFIX-CONTENT;
      }
    }
  }

  grouping SECURITY {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    container security {
      description
        "Container class for security related
         configuration parameters";
      container ttl {
        description
          "Enabling turns on TTL security";
        leaf enable {
          type boolean;
          description
            "Enable TTL security";
        }
        leaf hop-count {
          type uint32 {
            range "1..254";
          }
          description
            "Hop count";
        }
      }
    }
  }

  grouping HELLO-INTERVAL {
    description
      "Common node of process-scope, area-scope,
       name-scope, virtual-link-scope, sham-link-scope,
       multi-area-interface-scope";
    leaf hello-interval {
      type uint32 {
        range "1..65535";
      }
      units "second";
      description
        "Interval between HELLO packets in seconds";
    }
  }

  grouping ADJACENCY-CHANGES {
    description
      "Common node of default-vrf, vrf";
    leaf adjacency-changes {
      type Ospf-log-adj;
      description
        "Log changes in adjacency state";
    }
  }

  grouping PROCESS-SCOPE {
    description
      "Common node of default-vrf, vrf";
    container process-scope {
      description
        "Process scope configuration";
      container srgb {
        presence "Indicates a srgb node is configured.";
        description
          "Segment Routing Global Block configuration";
        leaf lower-bound {
          type uint32 {
            range "16000..1048575";
          }
          mandatory true;
          description
            "The lower bound of the SRGB";
        }
        leaf upper-bound {
          type uint32 {
            range "16000..1048575";
          }
          mandatory true;
          description
            "The upper bound of the SRGB";
        }
      }
      container fast-reroute {
        description
          "Fast-reroute configuration";
        container per-link {
          description
            "Fast-reroute per-link configuration";
          uses CANDIDATE-INTERFACE-TABLE;
          uses IPV4-OSPF-CFG-FAST-REROUTE-USE-CANDIDATE-ONLY;
          uses EXCLUDE-INTERFACE-TABLE;
        }
        container per-prefix {
          description
            "Fast-reroute per-prefix configuration";
          container remote-lfa {
            description
              "Remote LFA configuration";
            leaf tunnel {
              type Ospf-proc-frr-rlfa-tunnel;
              description
                "Enable/Disable remote LFA computation";
            }
            leaf maximum-cost {
              type uint32 {
                range "1..4294967295";
              }
              description
                "Maximum path cost to remote LFA";
            }
          }
          leaf topology-independent-lfa {
            type boolean;
            description
              "Topology Independet LFA configuration";
          }
          uses CANDIDATE-INTERFACE-TABLE;
          uses IPV4-OSPF-CFG-FAST-REROUTE-USE-CANDIDATE-ONLY;
          uses EXCLUDE-INTERFACE-TABLE;
        }
        leaf fast-reroute-enable {
          type Ospf-proc-fast-reroute;
          description
            "Enable/Disable Fast-reroute per-link or
             per-prefix";
        }
      }
      uses DISTRIBUTE-LIST;
      uses COST;
      uses BFD;
      uses WEIGHT;
      uses EXTERNAL-OUT;
      uses PREFIX-SUPPRESSION-PRIMARY;
      uses MTU-IGNORE;
      uses AUTHENTICATION;
      uses LDP-SYNC-IGP-SHORTCUTS;
      uses LDP-AUTO-CONFIG;
      uses SECURITY;
      uses SUMMARY-IN;
      uses NETWORK-TYPE;
      uses HELLO-INTERVAL;
      uses LOOPBACK-STUB-NETWORK;
      uses PREFIX-SUPPRESSION-SECONDARY;
      uses DEMAND-CIRCUIT;
      uses SEGMENT-ROUTING;
      uses PASSIVE;
      uses TRANSMIT-DELAY;
      uses PACKET-SIZE;
      uses LDP-SYNC;
      uses DATABASE-FILTER;
      uses DEAD-INTERVAL-MINIMAL;
      uses LINK-DOWN-FAST-DETECT;
      uses SEGMENT-ROUTING-FORWARDING;
      uses RETRANSMIT-INTERVAL;
      uses IPV4-OSPF-CFG-PRIORITY;
      uses FLOOD-REDUCTION;
      uses COST-FALLBACK;
    }
  }

  grouping UCMP {
    description
      "Common node of default-vrf, vrf";
    container ucmp {
      description
        "Unequal Cost Multi-ptah configuration";
      container enable {
        description
          "UCMP feature enable configuration";
        leaf variance {
          type uint32 {
            range "101..10000";
          }
          default "200";
          description
            "Value of variance";
        }
        leaf prefix-list-name {
          type string;
          description
            "Name of the Prefix List";
        }
      }
      leaf delay-interval {
        type uint32 {
          range "1..5000";
        }
        units "millisecond";
        default "100";
        description
          "Delay in msecs between primary SPF and UCMP
           computation";
      }
      uses EXCLUDE-INTERFACE-TABLE;
    }
  }

  grouping NSF {
    description
      "Common node of default-vrf, vrf";
    container nsf {
      description
        "Non Stop Forwarding configuration";
      leaf lifetime {
        type uint32 {
          range "90..1800";
        }
        units "second";
        default "90";
        description
          "Maximum route lifetime following restart in
           seconds";
      }
      leaf ietf {
        type Ospf-ietf-nsf;
        description
          "Enable IETF Non Stop Forwarding";
      }
      leaf ietf-support-role {
        type Ospf-ietf-nsf-support;
        description
          "Disable helper support role for IETF Non Stop
           Forwarding";
      }
      leaf cisco {
        type Ospf-cisco-nsf;
        description
          "Enable Cisco Non Stop Forwarding";
      }
      leaf interval {
        type uint32 {
          range "90..3600";
        }
        units "second";
        default "90";
        description
          "Minimum interval between Non Stop Forwarding
           restarts in seconds";
      }
      leaf flush-delay-time {
        type uint32 {
          range "1..3600";
        }
        units "second";
        default "60";
        description
          "Maximum time allowed for external route
           learning (seconds)";
      }
      leaf ietf-strict-lsa-checking {
        type empty;
        description
          "Enable Strict LSA checking of IETF NSF";
      }
    }
  }

  grouping MTU-IGNORE {
    description
      "Common node of process-scope, area-scope,
       name-scope, multi-area-interface-scope";
    leaf mtu-ignore {
      type boolean;
      default "false";
      description
        "Enable/Disable ignoring of MTU in DBD packets";
    }
  }

  grouping APPLY-WEIGHT {
    description
      "Common node of default-vrf, vrf";
    container apply-weight {
      presence "Indicates a apply-weight node is configured.";
      description
        "Apply weights feature enable configuration";
      leaf bandwidth {
        type boolean;
        mandatory true;
        description
          "Use interface bandwidth when calculating
           weights";
      }
      leaf reference-bandwidth {
        type uint32 {
          range "1..4294967";
        }
        units "Mbit/s";
        default "100";
        description
          "Reference bandwidth to use for calculation
           (Mbits/sec)";
      }
      leaf default-weight {
        type uint32 {
          range "1..16777214";
        }
        default "1";
        description
          "Default weight to use when weight not
           configured under interface";
      }
    }
  }

  grouping FAST-REROUTE-USE-CANDIDATE-ONLY {
    description
      "Common node of per-link, per-prefix";
    leaf fast-reroute-use-candidate-only {
      type boolean;
      default "false";
      description
        "Use only interfaces on the candidate list as a
         backup path";
    }
  }

  grouping IPV4-OSPF-CFG-FAST-REROUTE-USE-CANDIDATE-ONLY {
    description
      "Common node of per-link, per-prefixCommon node of
       per-link, per-prefix";
    leaf fast-reroute-use-candidate-only {
      type boolean;
      default "false";
      description
        "Use only interfaces on the candidate list as a
         backup path";
    }
  }

  grouping BFD {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    container bfd {
      description
        "BFD configuration";
      leaf interval {
        type uint32 {
          range "3..30000";
        }
        units "millisecond";
        description
          "Hello interval for BFD sessions created by OSPF";
      }
      leaf detection-multiplier {
        type uint32 {
          range "2..50";
        }
        description
          "Detection multiplier for BFD sessions created
           by OSPF";
      }
      leaf fast-detect-mode {
        type Bfd-enable-mode;
        description
          " use of Bidirectional Forwarding Detection";
      }
    }
  }

  grouping LOOPBACK-STUB-NETWORK {
    description
      "Common node of process-scope, area-scope,
       name-scopeCommon node of process-scope,
       area-scope, name-scope";
    leaf loopback-stub-network {
      type boolean;
      default "false";
      description
        "Enable/Disable advertising loopback as a stub
         network";
    }
  }

  grouping PREFIX-SUPPRESSION-PRIMARY {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf prefix-suppression-primary {
      type boolean;
      default "false";
      description
        "Enable/Disable prefix suppression for primary
         addresses";
    }
  }

  grouping FLOOD-REDUCTION {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf flood-reduction {
      type boolean;
      default "false";
      description
        "Enable/Disable OSPF flood reduction";
    }
  }

  grouping MAX-LSA {
    description
      "Common node of default-vrf, vrf";
    container max-lsa {
      presence "Indicates a max-lsa node is configured.";
      description
        "Set max-lsa configuration";
      leaf max-lsa-limit {
        type uint32 {
          range "1..4294967294";
        }
        mandatory true;
        description
          "Set maximum number of non self-generated LSAs";
      }
      leaf max-lsa-threshold {
        type uint32 {
          range "1..100";
        }
        description
          "Set max-lsa threshold for generating a warning
           message";
      }
      leaf max-lsa-warning-only {
        type boolean;
        description
          "Only give warning message when limit is
           exceeded";
      }
      leaf max-lsa-ignore-time {
        type uint32 {
          range "1..35791394";
        }
        description
          "Set time during which all adjacencies are
           suppressed";
      }
      leaf max-lsa-ignore-count {
        type uint32 {
          range "1..4294967294";
        }
        description
          "Set count on how many times adjacencies can be
           suppressed";
      }
      leaf max-lsa-reset-time {
        type uint32 {
          range "2..71582788";
        }
        units "minute";
        description
          "Set number of minutes after which ignore-count
           is reset to zero";
      }
    }
  }

  grouping OUTGOING-ROUTE-UPDATE-TABLE {
    description
      "Common node of default-vrf, vrf";
    container outgoing-route-updates {
      description
        "Filter outgoing routing updates";
      list outgoing-route-update {
        key "protocol-name";
        description
          "Filter outgoing routing updates for a
           particular protocol";
        leaf protocol-name {
          type Ospf-dist-list-protocol;
          description
            "Distribute list protocol type";
        }
        leaf access-list-name {
          type string;
          description
            "Access Control List name";
        }
        leaf as-xx {
          type uint32 {
            range "0..65535";
          }
          description
            "First half of BGP AS number in XX.YY format.
             Mandatory if Protocol is BGP and must not be
             specified otherwise. Must be a non-zero value
             if second half is zero.";
        }
        leaf as-yy {
          type uint32 {
            range "0..4294967295";
          }
          description
            "Second half of BGP AS number in XX.YY format.
             Mandatory if Protocol is BGP and must not be
             specified otherwise. Must be a non-zero value
             if first half is zero.";
        }
        leaf ospf-process-name {
          type string;
          description
            "OSPF process name";
        }
      }
    }
  }

  grouping LDP-SYNC {
    description
      "Common node of process-scope, area-scope,
       name-scope";
    leaf ldp-sync {
      type boolean;
      description
        "Enable/Disable MPLS LDP sync";
    }
  }

  grouping IGNORE-MOSPF {
    description
      "Common node of default-vrf, vrf";
    leaf ignore-mospf {
      type empty;
      description
        "Ignore MOSPF (Type 6) LSAs";
    }
  }

  grouping NEIGHBOR-TABLE {
    description
      "Common node of name-scope,
       multi-area-interface-scope";
    container neighbors {
      description
        "Neighbor router configuration information";
      list neighbor {
        key "neighbor-address";
        description
          "Router configuration information for a
           particular neighbor";
        leaf neighbor-address {
          type inet:ipv4-address-no-zone;
          description
            "Neighbor IP address";
        }
        leaf priority {
          type uint32 {
            range "0..255";
          }
          default "0";
          description
            "OSPF priority of non-broadcast neighbor";
        }
        leaf poll-interval {
          type uint32 {
            range "0..65535";
          }
          units "second";
          default "40";
          description
            "OSPF dead router poll-interval in seconds";
        }
        leaf cost {
          type uint32 {
            range "1..65535";
          }
          default "1";
          description
            "OSPF cost for point-to-multipoint neighbor";
        }
        leaf database-filter {
          type boolean;
          default "false";
          description
            "Database filter: Filter OSPF LSA during
             synchronization and flooding for
             point-to-multipoint";
        }
      }
    }
  }

  grouping TYPE7 {
    description
      "Common node of default-vrf, vrf";
    leaf type7 {
      type empty;
      description
        "Prefer type7 externals over type5";
    }
  }

  grouping SPF-PREFIX-PRIORITY {
    description
      "Common node of default-vrf, vrf";
    leaf spf-prefix-priority {
      type string;
      description
        "Configure a route-policy for prioritizing RIB
         route install.";
    }
  }

  grouping SNMP-CONTEXT {
    description
      "Common node of default-vrf, vrf";
    leaf snmp-context {
      type string;
      description
        "OSPF SNMP context configuration";
    }
  }

  grouping ROUTER-ID {
    description
      "Common node of default-vrf, vrf";
    leaf router-id {
      type inet:ipv4-address-no-zone;
      description
        "Router ID for this OSPF process. Enter an IP
         Address.";
    }
  }

  grouping ADJACENCY-STAGGER {
    description
      "Common node of default-vrf, vrfCommon node of
       default-vrf, vrf";
    container adjacency-stagger {
      description
        "Staggering OSPF adjacency bring up";
      leaf disable {
        type empty;
        description
          "Disable OSPF adjacency stagger";
      }
      leaf initial-nbr {
        type uint32 {
          range "1..65535";
        }
        default "2";
        description
          "Adjacency Stagger: Initial number of neighbors
           to bring up per area";
      }
      leaf max-nbr {
        type uint32 {
          range "1..65535";
        }
        default "64";
        description
          "Adjacency Stagger: Subsequent simultaneous
           number of neighbors to bring up";
      }
    }
  }

  grouping DEFAULT-METRIC {
    description
      "Common node of default-vrf, vrf";
    leaf default-metric {
      type uint32 {
        range "1..16777214";
      }
      default "1";
      description
        "Set default metric of redistributed routes";
    }
  }

  grouping RETRANSMIT-INTERVAL {
    description
      "Common node of process-scope, area-scope,
       name-scope, virtual-link-scope, sham-link-scope,
       multi-area-interface-scope";
    leaf retransmit-interval {
      type uint32 {
        range "1..65535";
      }
      units "second";
      default "5";
      description
        "Time in seconds between retransmitting lost link
         state advertisements";
    }
  }

  grouping PRIORITY {
    description
      "Common node of per-link, per-prefix";
    leaf priority {
      type Ospf-fast-reroute-priority;
      description
        "Fast-reroute per-link/per-prefix priority-limit
         command";
    }
  }

  grouping IPV4-OSPF-CFG-PRIORITY {
    description
      "Common node of per-link, per-prefixCommon node of
       process-scope, area-scope, name-scope";
    leaf priority {
      type uint32 {
        range "0..255";
      }
      default "1";
      description
        "Router priority for DR and BDR election";
    }
  }

  augment "/a1:snmp/a1:notification" {
    description
      "This augment extends the configuration data of
       'Cisco-IOS-XR-snmp-agent-cfg'";
    container ospf {
      description
        "OSPF-MIB notification configuration";
      container lsa {
        description
          "SNMP notifications related to LSAs";
        leaf max-age-lsa {
          type empty;
          description
            "Enable ospfMaxAgeLsa notification";
        }
        leaf originate-lsa {
          type empty;
          description
            "Enable ospfOriginateLsa notification";
        }
      }
      container state-change {
        description
          "SNMP notifications for OSPF state change";
        leaf interface {
          type empty;
          description
            "Enable ospfIfStateChange notification";
        }
        leaf virtual-interface {
          type empty;
          description
            "Enable ospfVirtIfStateChange notification";
        }
        leaf virtual-neighbor {
          type empty;
          description
            "Enable ospfVirtNbrStateChange notification";
        }
        leaf neighbor {
          type empty;
          description
            "Enable ospfNbrStateChange notification";
        }
      }
      container retransmit {
        description
          "SNMP notifications for packet retransmissions";
        leaf virtual-packet {
          type empty;
          description
            "Enable ospfVirtIfTxRetransmit notification";
        }
        leaf packet {
          type empty;
          description
            "Enable ospfTxRetransmit notification";
        }
      }
      container error {
        description
          "SNMP notifications for OSPF errors";
        leaf config-error {
          type empty;
          description
            "Enable ospfIfConfigError notification";
        }
        leaf authentication-failure {
          type empty;
          description
            "Enable ospfIfAuthFailure notification";
        }
        leaf virtual-config-error {
          type empty;
          description
            "Enable ospfVirtIfConfigError notification";
        }
        leaf virtual-authentication-failure {
          type empty;
          description
            "Enable ospfVirtIfAuthFailure notification";
        }
        leaf bad-packet {
          type empty;
          description
            "Enable ospfIfRxBadPacket notification";
        }
        leaf virtual-bad-packet {
          type empty;
          description
            "Enable ospfVirtIfRxBadPacket notification";
        }
      }
    }
  }
  container ospf {
    description
      "OSPF configuration data";
    container processes {
      description
        "Process related configuration";
      list process {
        key "process-name";
        description
          "Configuration for a particular OSPF process and
           associated default VRF";
        container snmp {
          description
            "OSPF SNMP configuration";
          container trap-rate-limit {
            presence "Indicates a trap-rate-limit node is configured.";
            description
              "Per OSPF process SNMP trap rate-limit";
            leaf window-size {
              type uint32 {
                range "2..60";
              }
              mandatory true;
              description
                "Trap rate limit sliding window size";
            }
            leaf max-window-traps {
              type uint32 {
                range "0..300";
              }
              mandatory true;
              description
                "Max number of traps to send in window time";
            }
          }
        }
        container distribute {
          presence "enable distribute";
          description
            "Enable distribution of link-state database
             services";
          leaf throttle {
            type uint32 {
              range "1..3600";
            }
            units "second";
            description
              "Seconds";
          }
          leaf instance-id {
            type uint32 {
              range "0..4294967295";
            }
            description
              "Instance ID";
          }
        }
        container vrfs {
          description
            "VRF related configuration";
          list vrf {
            key "vrf-name";
            description
              "Configuration for a particular OSPF vrf";
            container domain-id {
              description
                "OSPF Domain ID";
              container primary-domain-id {
                description
                  "OSPF Primary domain ID";
                leaf domain-id-type {
                  type Ospf-domain-id;
                  description
                    "Primary domain ID type";
                }
                leaf domain-id-name {
                  type string;
                  description
                    "Primary domain ID value";
                }
              }
              container secondary-domain-ids {
                description
                  "Secondary domain ID Table";
                list secondary-domain-id {
                  key "domain-id-type domain-id-name";
                  description
                    "OSPF Secondary domain ID";
                  leaf domain-id-type {
                    type Ospf-domain-id;
                    description
                      "Secondary domain ID type";
                  }
                  leaf domain-id-name {
                    type xr:Cisco-ios-xr-string;
                    description
                      "Secondary domain ID value";
                  }
                }
              }
            }
            leaf snmp-trap-enabled {
              type boolean;
              default "false";
              description
                "Enable/disable OSPF SNMP trap";
            }
            leaf domain-tag {
              type uint32 {
                range "1..4294967295";
              }
              description
                "32 bit Domain tag value";
            }
            leaf vrf-lite {
              type empty;
              description
                "VRF lite capability";
            }
            leaf disable-dn-bit-check {
              type empty;
              description
                "Disable DN bit check";
            }
            leaf vrf-name {
              type xr:Cisco-ios-xr-string;
              description
                "Name for this vrf";
            }
            uses MICROLOOP;
            uses IGNORE-MOSPF;
            uses MAXIMUM-REDISTRIBUTE-PREFIX;
            uses DEFAULT-INFORMATION;
            uses AF;
            uses QUEUE;
            uses ROUTER-ID;
            uses TYPE7;
            uses MAX-METRIC;
            uses SNMP-CONTEXT;
            uses MAXIMUM-INTERFACES;
            uses NO-OPAQUE;
            uses NSF;
            uses PROCESS-SCOPE;
            uses SPF-PREFIX-PRIORITY;
            uses REDISTRIBUTION;
            uses ADJACENCY-STAGGER;
            uses MAX-LSA;
            uses AUTO-COST;
            uses UCMP;
            uses APPLY-WEIGHT;
            uses MAXIMUM-PATHS;
            uses FAST-REROUTE;
            uses SUMMARY-PREFIX-TABLE;
            uses ADJACENCY-CHANGES;
            uses OUTGOING-ROUTE-UPDATE-TABLE;
            uses DISTANCE;
            uses AREA-TABLE;
            uses TIMERS;
            uses DEFAULT-METRIC;
          }
        }
        container trace-bufs {
          description
            "Configuration to change size of trace buffer";
          list trace-buf {
            key "trace-buf-name";
            description
              "Changes the size of the specified trace
               buffer";
            leaf trace-buf-name {
              type xr:Cisco-ios-xr-string;
              description
                "Name for this trace buffer";
            }
            leaf bufsize {
              type Ospf-trace-buf-size;
              mandatory true;
              description
                "Buffer size";
            }
          }
        }
        container graceful-shutdown-timers {
          description
            "Adjust routing timers";
          leaf graceful-shutdown-retain-routes {
            type uint32 {
              range "0..90";
            }
            units "second";
            default "5";
            description
              "Time to keep OSPF routes active after
               graceful shutdown(in seconds)";
          }
          leaf graceful-shutdown-initial-delay {
            type uint32 {
              range "0..90";
            }
            units "second";
            default "5";
            description
              "Number of seconds to delay before beginning
               graceful shutdown";
          }
        }
        container default-vrf {
          description
            "Default VRF related configuration";
          container monitor-convergence {
            description
              "Enable convergence monitoring";
            leaf enable {
              type empty;
              description
                "Enable convergence monitoring";
            }
            leaf prefix-list {
              type string;
              description
                "Enable the monitoring of individual prefixes
                 (prefix list name)";
            }
            leaf track-ip-frr {
              type empty;
              description
                "Enable the Tracking of IP-Frr Convergence";
            }
            leaf track-external-routes {
              type empty;
              description
                "Enable the monitoring of External routes";
            }
            leaf track-summary-routes {
              type empty;
              description
                "Enable the monitoring of Summary routes";
            }
          }
          container segment-routing {
            description
              "Segment Routing instance scoped parameters";
            container sr-prefer {
              description
                "Prefer segment routing labels over LDP
                 labels";
              leaf enable {
                type boolean;
                description
                  "Enable SR labels to be preferred over LDP
                   labels";
              }
              leaf prefix-list-name {
                type string;
                description
                  "Name of the Prefix List";
              }
            }
            leaf prefix-sid-map-receive-disable {
              type empty;
              description
                "Disable prefix-SID mapping client";
            }
            leaf prefix-sid-map-advertise-local {
              type empty;
              description
                "Enable advertisement of local SRMS entries";
            }
            leaf strict-spf-disable {
              type empty;
              description
                "Strict-SPF support and SID advertisement";
            }
          }
          container mpls {
            description
              "Configure MPLS routing protocol parameters";
            container mpls-router-id {
              description
                "MPLS-TE stable loopback address for this
                 OSPF process.Enter either as IP Address or
                 Interface name, but not both. Unused field
                 must be nil";
              leaf address {
                type inet:ipv4-address-no-zone;
                description
                  "MPLS-TE stable IP address for this OSPF
                   process";
              }
              leaf interface-name {
                type xr:Interface-name;
                description
                  "MPLS-TE stable loopback interface for this
                   OSPF process";
              }
            }
            leaf igp-intact {
              type empty;
              description
                "Enable igp-intact mode in OSPF";
            }
            leaf ldp-sync-update {
              type empty;
              description
                "Enable LDP sync induced metric propagation";
            }
            leaf multicast-intact {
              type empty;
              description
                "Enable multicast-intact mode in OSPF";
            }
            leaf autoroute-exclude {
              type string;
              description
                "Exclude IP destinations from using TE
                 tunnels";
            }
          }
          uses MICROLOOP;
          uses IGNORE-MOSPF;
          uses MAXIMUM-REDISTRIBUTE-PREFIX;
          uses DEFAULT-INFORMATION;
          uses AF;
          uses QUEUE;
          uses ROUTER-ID;
          uses TYPE7;
          uses MAX-METRIC;
          uses SNMP-CONTEXT;
          uses MAXIMUM-INTERFACES;
          uses NO-OPAQUE;
          uses NSF;
          uses PROCESS-SCOPE;
          uses SPF-PREFIX-PRIORITY;
          uses REDISTRIBUTION;
          uses ADJACENCY-STAGGER;
          uses MAX-LSA;
          uses AUTO-COST;
          uses UCMP;
          uses APPLY-WEIGHT;
          uses MAXIMUM-PATHS;
          uses FAST-REROUTE;
          uses SUMMARY-PREFIX-TABLE;
          uses ADJACENCY-CHANGES;
          uses OUTGOING-ROUTE-UPDATE-TABLE;
          uses DISTANCE;
          uses AREA-TABLE;
          uses TIMERS;
          uses DEFAULT-METRIC;
        }
        leaf nsr {
          type Nsr;
          default "true";
          description
            "Enable non-stop routing";
        }
        leaf protocol-shutdown {
          type Ospf-shutdown;
          description
            "Type of protocol shutdown";
        }
        leaf process-name {
          type xr:Cisco-ios-xr-string {
            length "1..32";
          }
          description
            "Name for this OSPF process";
        }
      }
    }
    container global {
      description
        "OSPF global configuration data";
      leaf dns-name-lookup {
        type empty;
        description
          "Display OSPF router ids as DNS names";
      }
    }
  }
}
