[email protected] Maven / Gradle / Ivy
The newest version!
module l3-unicast-igp-topology {
yang-version 1;
namespace "urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology";
// replace with IANA namespace when assigned
prefix "l3t";
import network-topology {
prefix "nt";
revision-date 2013-10-21;
}
import ietf-inet-types {
prefix "inet";
revision-date 2013-07-15;
}
organization "TBD";
contact "TBD";
revision "2013-10-21" {
description "Initial revision";
reference "TBD";
}
typedef igp-event-type {
description "IGP Event type for notifications";
type enumeration {
enum "add" {
value 0;
description "An IGP node or link or prefix or termination-point has been added";
}
enum "remove" {
value 1;
description "An IGP node or link or prefix or termination-point has been removed";
}
enum "update" {
value 2;
description "An IGP node or link or prefix or termination-point has been updated";
}
}
} // igp-event-type
identity flag-identity {
description "Base type for flags";
}
identity undefined-flag {
base "flag-identity";
}
typedef flag-type {
type identityref {
base "flag-identity";
}
}
grouping igp-prefix-attributes {
leaf prefix {
type inet:ip-prefix;
}
leaf metric {
type uint32;
}
leaf-list flag {
type flag-type;
}
}
grouping l3-unicast-igp-topology-type {
container l3-unicast-igp-topology {
presence "indicates L3 Unicast IGP Topology";
}
}
grouping igp-topology-attributes {
container igp-topology-attributes {
leaf name {
description "Name of the topology";
type string;
}
leaf-list flag {
description "Topology flags";
type flag-type;
}
}
}
grouping igp-node-attributes {
container igp-node-attributes {
leaf name {
description "Node name";
type inet:domain-name;
}
leaf-list flag {
description "Node operational flags";
type flag-type;
}
leaf-list router-id {
description "Router-id for the node";
type inet:ip-address;
}
list prefix {
key "prefix";
uses igp-prefix-attributes;
}
}
}
grouping igp-link-attributes {
container igp-link-attributes {
leaf name {
description "Link Name";
type string;
}
leaf-list flag {
description "Link flags";
type flag-type;
}
leaf metric {
description "Link Metric";
type uint32 {
range "0..16777215" {
description "
";
// OSPF/ISIS supports max 3 byte metric.
// Ideally we would like this restriction to be
// defined in the derived models, however,
// we are not allowed to augment a "must" statement.
}
}
}
}
} // grouping igp-link-attributes
grouping igp-termination-point-attributes {
container igp-termination-point-attributes {
choice termination-point-type {
case ip {
leaf-list ip-address {
description "IPv4 or IPv6 address";
type inet:ip-address;
}
}
case unnumbered {
leaf unnumbered-id {
description "Unnumbered interface identifier";
type uint32;
}
}
}
}
} // grouping igp-termination-point-attributes
augment "/nt:network-topology/nt:topology/nt:topology-types" {
uses l3-unicast-igp-topology-type;
}
augment "/nt:network-topology/nt:topology" {
when "nt:topology-types/l3-unicast-igp-topology";
uses igp-topology-attributes;
}
augment "/nt:network-topology/nt:topology/nt:node" {
when "../nt:topology-types/l3-unicast-igp-topology";
uses igp-node-attributes;
}
augment "/nt:network-topology/nt:topology/nt:link" {
when "../nt:topology-types/l3-unicast-igp-topology";
uses igp-link-attributes;
}
augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
when "../../nt:topology-types/l3-unicast-igp-topology";
uses igp-termination-point-attributes;
}
notification igp-node-event {
leaf igp-event-type {
type igp-event-type;
}
leaf topology-ref {
type nt:topology-ref;
}
uses l3-unicast-igp-topology-type;
uses nt:node-attributes;
uses igp-node-attributes;
}
notification igp-link-event {
leaf igp-event-type {
type igp-event-type;
}
leaf topology-ref {
type nt:topology-ref;
}
uses l3-unicast-igp-topology-type;
uses nt:link-attributes;
uses igp-link-attributes;
}
notification igp-prefix-event {
leaf igp-event-type {
type igp-event-type;
}
leaf topology-ref {
type nt:topology-ref;
}
leaf node-ref {
type nt:node-ref;
}
uses l3-unicast-igp-topology-type;
container prefix {
uses igp-prefix-attributes;
}
}
notification termination-point-event {
leaf igp-event-type {
type igp-event-type;
}
leaf topology-ref {
type nt:topology-ref;
}
leaf node-ref {
type nt:node-ref;
}
uses l3-unicast-igp-topology-type;
uses nt:tp-attributes;
uses igp-termination-point-attributes;
}
}