module ietf-ospf-topology {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-topology";
prefix "ospf";
import ietf-inet-types {
prefix "inet";
}
import ietf-network {
prefix "nw";
}
import ietf-network-topology {
prefix "nt";
}
import ietf-l3-unicast-igp-topology {
prefix "l3t";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web:
WG List:
WG Chair: Susan Hares
WG Chair: Jeffrey Haas
Editor: Alexander Clemm
Editor: Jan Medved
Editor: Robert Varga
Editor: Tony Tkacik
Editor: Xufeng Liu
Editor: Igor Bryskin
Editor: Aihua Guo
Editor: Nitin Bahadur
Editor: Hariharan Ananthakrishnan
Editor: Vishnu Pavan Beeram
";
description
"This module defines a model for OSPF network topologies.
Copyright (c) 2015 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of
draft-ietf-i2rs-yang-network-topo-02;
see the RFC itself for full legal notices.
NOTE TO RFC EDITOR: Please replace above reference to
draft-ietf-i2rs-yang-network-topo-02 with RFC
number when published (i.e. RFC xxxx).";
revision "2015-12-11" {
description
"Initial revision.
NOTE TO RFC EDITOR: Please replace the following reference
to draft-ietf-i2rs-yang-l3-topology-01 with
RFC number when published (i.e. RFC xxxx).";
reference
"draft-ietf-i2rs-yang-l3-topology-01";
}
typedef area-id {
type uint32;
description
"OSPF Area ID";
}
grouping ospf-topology-type {
description
"Identifies the OSPF topology type.";
container ospf {
presence "indiates OSPF Topology";
description
"Its presence identifies the OSPF topology type.";
}
}
augment "/nw:networks/nw:network/nw:network-types/"
+ "l3t:l3-unicast-igp-topology" {
description
"Defines the OSPF topology type.";
uses ospf-topology-type;
}
augment "/nw:networks/nw:network/l3t:igp-topology-attributes" {
when "../nw:network-types/l3t:l3-unicast-igp-topology/ospf" {
description
"Augment only for OSPF topology";
}
description
"Augment topology configuration";
container ospf-topology-attributes {
description
"Containing topology attributes";
leaf area-id {
type area-id;
description
"OSPF area ID";
}
}
}
augment "/nw:networks/nw:network/nw:node/l3t:igp-node-attributes" {
when "../../nw:network-types/l3t:l3-unicast-igp-topology/ospf" {
description
"Augment only for OSPF topology";
}
description
"Augment node configuration";
uses ospf-node-attributes;
}
augment "/nw:networks/nw:network/nt:link/l3t:igp-link-attributes" {
when "../../nw:network-types/l3t:l3-unicast-igp-topology/ospf" {
description
"Augment only for OSPF topology";
}
description
"Augment link configuration";
uses ospf-link-attributes;
}
augment "/nw:networks/nw:network/nw:node/"+
"l3t:igp-node-attributes/l3t:prefix" {
when "../../../nw:network-types/l3t:l3-unicast-igp-topology/"
+"ospf" {
description
"Augment only for OSPF topology";
}
description
"Augment prefix";
uses ospf-prefix-attributes;
}
grouping ospf-node-attributes {
description
"OSPF node scope attributes";
container ospf-node-attributes {
description
"Containing node attributes";
choice router-type {
description
"Indicates router type";
case abr {
leaf abr {
type empty;
description
"The node is ABR";
}
}
case asbr {
leaf asbr {
type empty;
description
"The node is ASBR";
}
}
case internal {
leaf internal {
type empty;
description
"The node is internal";
}
}
case pseudonode {
leaf pseudonode {
type empty;
description
"The node is pseudonode";
}
}
}
leaf dr-interface-id {
when "../router-type/pseudonode" {
description
"Valid only for pseudonode";
}
type uint32;
default "0";
description
"For pseudonodes, DR interface-id";
}
leaf-list multi-topology-id {
type uint8 {
range "0..127";
}
max-elements "128";
description
"List of Multi-Topology Identifier up-to 128 (0-127).
See RFC 4915";
}
leaf capabilities {
type bits {
bit graceful-restart-capable {
position 0;
description
"Graceful restart capable";
}
bit graceful-restart-helper {
position 1;
description
"Graceful restart helper";
}
bit stub-router-support {
position 2;
description
"Stub router support";
}
bit traffic-engineering-support {
position 3;
description
"Traffic engineering support";
}
bit point-to-point-over-lan {
position 4;
description
"Support point to point over LAN";
}
bit experimental-te {
position 5;
description
"Support experimental traffic engineering";
}
}
description
"OSPF capabilities as bit vector. RFC 4970";
}
}
}
grouping ospf-link-attributes {
description
"OSPF link scope attributes";
container ospf-link-attributes {
description
"Containing OSPF link attributes";
leaf multi-topology-id {
type uint8 {
range "0..127";
}
description "Muti topology ID";
}
}
} // ospf-link-attributes
grouping ospf-prefix-attributes {
description
"OSPF prefix attributes";
container ospf-prefix-attributes {
description
"Containing prefix attributes";
leaf forwarding-address {
when "../../l3t:l3-unicast-igp-topology/l3t:ospf/"+
"l3t:router-type/l3t:asbr" {
description "Valid only for ABSR";
}
type inet:ipv4-address;
description
"Forwarding address for ABSR";
}
}
}
augment "/l3t:igp-node-event" {
description
"OSPF node event";
uses ospf-topology-type;
uses ospf:ospf-node-attributes;
}
augment "/l3t:igp-link-event" {
description
"OSPF link event";
uses ospf-topology-type;
uses ospf:ospf-link-attributes;
}
augment "/l3t:igp-prefix-event" {
description
"OSPF prefix event";
uses ospf-topology-type;
uses ospf:ospf-prefix-attributes;
}
}