module ietf-sr-mpls-topology {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology";
prefix "srmt";
import ietf-network {
prefix "nw";
reference "RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-network-topology {
prefix "nt";
reference "RFC 8345: A YANG Data Model for Network Topologies";
}
import ietf-l3-unicast-topology {
prefix "l3t";
reference "RFC 8346: A YANG Data Model for Layer 3 Topologies";
}
import ietf-segment-routing-common {
prefix "sr-cmn";
reference
"I-D.ietf-spring-sr-yang: YANG Data Model for Segment Routing";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group";
contact
"WG Web:
WG List:
Editor: Xufeng Liu
Editor: Igor Bryskin
Editor: Vishnu Pavan Beeram
Editor: Tarek Saad
Editor: Himanshu Shah
Editor: Stephane Litkowski
";
description
"YANG data model for representing and manipulating Segment
Routing Topologies on MPLS Data Plane.
Copyright (c) 2020 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 RFC XXXX; see the
RFC itself for full legal notices.";
revision 2020-11-01 {
description "Initial revision";
reference
"RFC XXXX: YANG Data Model for SR and SR TE Topologies";
}
feature msd {
description
"Support of signaling MSD (Maximum SID Depth) in IGP.";
reference
"RFC 8476: Signaling Maximum SID Depth (MSD) Using OSPF.
RFC 8491: Signaling Maximum SID Depth (MSD) Using IS-IS.
RFC 8814: Signaling Maximum SID Depth (MSD) Using the Border
Gateway Protocol - Link State.";
}
grouping sr-mpls-topology-type {
description
"Identifies the SR-MPLS topology type. This type of network
topologies use Segment Routing (SR) technology over the MPLS
data plane";
container sr-mpls {
presence "Indicates SR-MPLS topology";
description
"Its presence identifies the SR topology type.";
}
}
augment "/nw:networks/nw:network/nw:network-types/"
+ "l3t:l3-unicast-topology" {
description
"Defines the SR topology type.";
uses sr-mpls-topology-type;
}
augment "/nw:networks/nw:network/l3t:l3-topology-attributes" {
when "../nw:network-types/l3t:l3-unicast-topology/srmt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment topology configuration";
uses sr-mpls-topology-attributes;
}
augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/"
+ "srmt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment node configuration.";
uses sr-node-attributes;
}
augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes"
+ "/l3t:prefix" {
when "../../../nw:network-types/l3t:l3-unicast-topology/"
+ "srmt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment node prefix.";
uses sr-node-prefix-attributes;
}
augment "/nw:networks/nw:network/nt:link/l3t:l3-link-attributes" {
when "../../nw:network-types/l3t:l3-unicast-topology/"
+ "srmt:sr-mpls" {
description "Augment only for SR topology.";
}
description "Augment link configuration";
uses sr-link-attributes;
}
grouping sr-mpls-topology-attributes {
description "SR topology scope attributes.";
container sr-mpls {
description
"Containing SR attributes.";
uses sr-cmn:srgb;
} // sr
} // sr-mpls-topology-attributes
grouping information-source-attributes {
description
"The attributes identifying source that has provided the
related information, and the source credibility.";
leaf information-source {
type enumeration {
enum "unknown" {
description "The source is unknown.";
}
enum "locally-configured" {
description "Configured entity.";
}
enum "ospfv2" {
description "OSPFv2.";
reference
"RFC 8665: OSPF Extensions for Segment Routing.";
}
enum "ospfv3" {
description "OSPFv3.";
reference
"RFC 8666: OSPFv3 Extensions for Segment Routing.";
}
enum "isis" {
description "ISIS.";
reference
"RFC 8667: IS-IS Extensions for Segment Routing.";
}
enum "bgp-ls" {
description "BGP-LS.";
reference
"RFC 7752: North-Bound Distribution of Link-State and
Traffic Engineering (TE) Information Using BGP.
I-D.ietf-idr-bgp-ls-segment-routing-ext:
BGP Link-State extensions for Segment Routing.";
}
enum "system-processed" {
description "System processed entity.";
}
enum "other" {
description "Other source.";
}
}
config false;
description
"Indicates the type of the information source.";
}
leaf information-source-instance {
type string;
config false;
description
"The name indicating the instance of the information
source.";
}
container information-source-state {
config false;
description
"The container contains state attributes related to
the information source.";
leaf credibility-preference {
type uint16;
description
"The preference value to calculate the traffic
engineering database credibility value used for
tie-break selection between different
information-source values.
Higher value is more preferable.";
}
}
} // information-source-attributes
grouping sr-node-attributes {
description "SR node scope attributes.";
container sr-mpls {
presence "Presence indicates SR is enabled.";
description
"Containing SR attributes.";
uses sr-cmn:srgb;
uses sr-cmn:srlb;
uses sr-cmn:node-capabilities;
leaf msd {
if-feature "msd";
type uint8;
description
"Node MSD is the lowest MSD supported by the node.";
}
// Operational state data
uses information-source-attributes;
} // sr
} // sr-node-attributes
grouping sr-node-prefix-attributes {
description "Containing SR attributes for a prefix.";
container sr-mpls {
presence "Presence indicates SR is enabled.";
description
"Containing SR attributes for a prefix.";
uses sr-cmn:prefix-sid-attributes;
uses sr-cmn:last-hop-behavior;
leaf is-local {
type boolean;
default false;
description
"'true' if the SID is local.";
}
leaf is-node {
type boolean;
default false;
description
"'true' if the Prefix-SID refers to the router identified
by the prefix. Typically, the leaf 'is-node' (N-Flag)
is set on Prefix-SIDs attached to a router loopback
address.";
}
leaf is-readvertisment {
type boolean;
config false;
description
"'true' if the prefix to which this Prefix-SID is attached,
has been propagated by the router from another
topology by redistribution.";
}
} // sr
} // sr-node-prefix-attributes
grouping sr-link-attributes {
description "SR link scope attributes";
container sr-mpls {
presence "Presence indicates SR is enabled.";
description
"Containing SR attributes.";
uses sr-cmn:sid-value-type;
leaf sid {
type uint32;
mandatory true;
description
"Adjacency SID, which can be either IGP-Adjacency SID
or BGP PeerAdj SID, depending on the context.";
}
leaf advertise-protection {
type enumeration {
enum "single" {
description
"A single Adj-SID is associated
with the adjacency and reflects
the protection configuration.";
}
enum "dual" {
description
"Two Adj-SIDs will be associated
with the adjacency if interface
is protected. In this case
one will be enforced with
backup flag set, the other
will be enforced to backup flag unset.
In case, protection is not configured,
a single Adj-SID will be advertised
with backup flag unset.";
}
}
default "single";
description
"If set, the Adj-SID refers to an
adjacency being protected.";
}
leaf is-local {
type boolean;
default false;
description
"'true' if the SID is local.";
}
leaf msd {
if-feature "msd";
type uint8;
description
"SID depth of the interface associated with the link.";
}
leaf address-family {
type enumeration {
enum "ipv4" {
description
"The Adj-SID refers to an adjacency with outgoing IPv4
encapsulation.";
}
enum "ipv6" {
description
"The Adj-SID refers to an adjacency with outgoing IPv6
encapsulation.";
}
}
default "ipv4";
description
"This leaf defines the F-Flag (Address-Family flag) of the
SID.";
}
leaf is-backup {
type boolean;
default false;
description
"'true' if the SID is a backup.";
}
leaf is-part-of-set {
type boolean;
default false;
description
"'true' if the SID is part of a set.";
}
leaf is-persistent {
type boolean;
default true;
description
"'true' if the SID is persistently allocated.";
}
leaf is-on-lan {
type boolean;
default false;
description
"'true' if on a lan.";
}
uses information-source-attributes;
} // sr
} // sr-tp-attributes
}