2020-07-31 18:04:20 +02:00
module frr-pathd {
yang-version 1.1 ;
namespace "http://frrouting.org/yang/pathd" ;
prefix frr-pathd;
import ietf-inet-types {
prefix inet;
}
import ietf-routing-types {
prefix rt-types;
}
organization
"Free Range Routing" ;
contact
" FRR Users List: <mailto:frog@lists.frrouting.org>
FRR Development List: <mailto:dev@lists.frrouting.org>" ;
description
"This module defines a model for managing FRR pathd daemon." ;
revision 2018-11-06 {
description
"Initial revision." ;
2025-04-16 09:17:31 +02:00
reference "FRRouting" ;
2020-07-31 18:04:20 +02:00
}
typedef protocol-origin-type {
type enumeration {
enum pcep {
value 1 ;
description "The object was created through PCEP" ;
}
enum bgp {
value 2 ;
description "The object was created through GBP" ;
}
enum local {
value 3 ;
description "The object was created through CLI, Yang model via Netconf, gRPC, etc" ;
}
}
2025-04-16 09:17:31 +02:00
description
"Indication for the protocol origin of an object." ;
2020-07-31 18:04:20 +02:00
}
typedef originator-type {
type string {
length "1..64" ;
}
description
"Identifier of the originator of an object, could be 'config', '1.1.1.1:4189' or '2001:db8:85a3::8a2e:370:7334:4189'" ;
}
container pathd {
2025-04-16 09:17:31 +02:00
description
"Path properties for Segment Routing TE" ;
2020-07-31 18:04:20 +02:00
container srte {
2025-04-16 09:17:31 +02:00
description
"Segment Routing TE properties" ;
2020-07-31 18:04:20 +02:00
list segment-list {
key "name" ;
description "Segment-list properties" ;
leaf name {
type string {
length "1..64" ;
}
description "Segment-list name" ;
}
leaf protocol-origin {
type protocol-origin-type;
mandatory true ;
description
"Indication for the protocol origin of the segment list." ;
}
leaf originator {
type originator-type;
mandatory true ;
description "Originator of the segment list" ;
}
list segment {
key "index" ;
description "Configure Segment/hop at the index" ;
leaf index {
type uint32 ;
description "Segment index" ;
2021-04-22 16:04:42 +02:00
}
leaf sid-value {
type rt-types : mpls-label;
description "MPLS label value" ;
}
container nai {
presence "The segment has a Node or Adjacency Identifier" ;
2025-04-16 09:17:31 +02:00
description
"Node or Adjacency Identifier for the segment" ;
2021-04-22 16:04:42 +02:00
leaf type {
type enumeration {
enum ipv4_node {
value 1 ;
description "IPv4 node identifier" ;
}
enum ipv6_node {
value 2 ;
description "IPv6 node identifier" ;
}
enum ipv4_adjacency {
value 3 ;
description "IPv4 adjacency" ;
}
enum ipv6_adjacency {
value 4 ;
description "IPv6 adjacency" ;
}
enum ipv4_unnumbered_adjacency {
value 5 ;
description "IPv4 unnumbered adjacency" ;
}
enum ipv4_local_iface {
value 7 ;
description "IPv4 prefix with local interface id" ;
}
enum ipv6_local_iface {
value 8 ;
description "IPv6 prefix with local interface id" ;
}
enum ipv4_algo {
value 9 ;
description "IPv4 prefix with optional algorithm" ;
}
enum ipv6_algo {
value 10 ;
description "IPv6 prefix with optional algorithm" ;
2020-07-31 18:04:20 +02:00
}
}
2025-04-16 09:17:31 +02:00
mandatory true ;
description "NAI type" ;
2021-04-22 16:04:42 +02:00
}
leaf local-address {
type inet : ip-address;
mandatory true ;
2025-04-16 09:17:31 +02:00
description
"Local address of the NAI" ;
2021-04-22 16:04:42 +02:00
}
leaf local-prefix-len {
2025-04-16 09:17:31 +02:00
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_algo' or ../type = 'ipv6_algo'" ;
2021-04-22 16:04:42 +02:00
type uint8 ;
mandatory true ;
2025-04-16 09:17:31 +02:00
description
"Prefix length of the local address" ;
2021-04-22 16:04:42 +02:00
}
leaf local-interface {
2025-04-16 09:17:31 +02:00
when "../type = 'ipv4_local_iface' or ../type = 'ipv6_local_iface' or ../type = 'ipv4_unnumbered_adjacency'" ;
2021-04-22 16:04:42 +02:00
type uint32 ;
mandatory true ;
2025-04-16 09:17:31 +02:00
description
"Local interface ID for the NAI" ;
2021-04-22 16:04:42 +02:00
}
leaf remote-address {
2025-04-16 09:17:31 +02:00
when "../type = 'ipv4_adjacency' or ../type = 'ipv6_adjacency' or ../type = 'ipv4_unnumbered_adjacency'" ;
2021-04-22 16:04:42 +02:00
type inet : ip-address;
2025-04-16 09:17:31 +02:00
mandatory true ;
description
"Remote address of the NAI" ;
}
leaf remote-interface {
when "../type = 'ipv4_unnumbered_adjacency'" ;
type uint32 ;
mandatory true ;
description
"Remote interface ID for the NAI" ;
}
2021-04-22 16:04:42 +02:00
leaf algorithm {
2025-04-16 09:17:31 +02:00
when "../type = 'ipv4_algo' or ../type = 'ipv6_algo'" ;
2021-04-22 16:04:42 +02:00
type uint8 ;
mandatory true ;
2025-04-16 09:17:31 +02:00
description
"Algorithm to use for the NAI" ;
2020-07-31 18:04:20 +02:00
}
2025-04-16 09:17:31 +02:00
}
2020-07-31 18:04:20 +02:00
}
}
list policy {
key "color endpoint" ;
unique "name" ;
2025-04-16 09:17:31 +02:00
description
"List of SR Policies." ;
2020-07-31 18:04:20 +02:00
leaf color {
type uint32 ;
description
"Color of the SR Policy." ;
}
leaf endpoint {
type inet : ip-address;
description
"Indication for the endpoint of the SR Policy." ;
}
leaf name {
type string {
length "1..64" ;
}
description
"Name of the SR Policy." ;
}
leaf binding-sid {
type rt-types : mpls-label;
description
"BSID of the SR Policy." ;
}
leaf is-operational {
type boolean ;
config false ;
description
"True if a valid candidate path of this policy is operational in zebra, False otherwise" ;
}
list candidate-path {
2025-04-16 09:17:31 +02:00
key "preference" ;
2020-07-31 18:04:20 +02:00
unique "name" ;
description
"List of Candidate Paths of the SR Policy." ;
leaf preference {
type uint32 ;
description
"Administrative preference." ;
}
leaf name {
type string {
length "1..64" ;
}
mandatory true ;
description
"Symbolic Name of the Candidate Path." ;
}
leaf is-best-candidate-path {
type boolean ;
config false ;
description
"True if the candidate path is the best candidate path, False otherwise" ;
}
leaf protocol-origin {
type protocol-origin-type;
mandatory true ;
description
"Indication for the protocol origin of the Candidate Path." ;
}
leaf originator {
type originator-type;
mandatory true ;
description "Originator of the candidate path" ;
}
leaf discriminator {
type uint32 ;
config false ;
description "Candidate path distinguisher" ;
}
leaf type {
type enumeration {
enum explicit {
value 1 ;
2025-04-16 09:17:31 +02:00
description
"Explicit path defined by a segment list" ;
2020-07-31 18:04:20 +02:00
}
enum dynamic {
value 2 ;
2025-04-16 09:17:31 +02:00
description
"Dynamic path computed by a routing protocol" ;
2020-07-31 18:04:20 +02:00
}
}
2025-04-16 09:17:31 +02:00
mandatory true ;
description
"Type of the Candidate Path." ;
2020-07-31 18:04:20 +02:00
}
leaf segment-list-name {
type leafref {
path . . /../../segment-list/name;
}
description
"The name of the Segment List to use as LSP." ;
}
container constraints {
when "../type = 'dynamic'" ;
description
"Generic dynamic path constraints" ;
container bandwidth {
presence "If the candidate has a bandwidth constraint" ;
description
"The bandwidth needed by the candidate path." ;
leaf required {
type boolean ;
default "true" ;
description
"If the bandwidth limitation is a requirement or only a suggestion" ;
}
leaf value {
type decimal64 {
fraction-digits 6 ;
}
2025-04-16 09:17:31 +02:00
mandatory true ;
description
"The bandwidth value for the candidate path." ;
2020-07-31 18:04:20 +02:00
}
}
container affinity {
description
"Affinity let you configure how the links should be used when calculating a path." ;
leaf exclude-any {
type uint32 ;
description
"A 32-bit vector representing a set of attribute filters which renders a link unacceptable." ;
}
leaf include-any {
type uint32 ;
description
"A 32-bit vector representing a set of attribute filters which renders a link acceptable. A null set (all bits set to zero) automatically passes." ;
}
leaf include-all {
type uint32 ;
description
"A 32-bit vector representing a set of attribute filters which must be present for a link to be acceptable. A null set (all bits set to zero) automatically passes." ;
}
}
list metrics {
key "type" ;
2025-04-16 09:17:31 +02:00
description
"This list contains the different metrics that can be used to describe a path." ;
2020-07-31 18:04:20 +02:00
leaf type {
type enumeration {
enum igp {
value 1 ;
description "IGP metric" ;
}
enum te {
value 2 ;
description "TE metric" ;
}
enum hc {
value 3 ;
description "Hop Counts" ;
}
enum abc {
value 4 ;
description "Aggregate bandwidth consumption" ;
}
enum lmll {
value 5 ;
description "Load of the most loaded link" ;
}
enum cigp {
value 6 ;
description "Cumulative IGP cost" ;
}
enum cte {
value 7 ;
description "Cumulative TE cost" ;
}
enum pigp {
value 8 ;
description "P2MP IGP metric" ;
}
enum pte {
value 9 ;
description "P2MP TE metric" ;
}
enum phc {
value 10 ;
description "P2MP hop count metric" ;
}
enum msd {
value 11 ;
description "Segment-ID (SID) Depth" ;
}
enum pd {
value 12 ;
description "Path Delay metric" ;
}
enum pdv {
value 13 ;
description "Path Delay Variation metric" ;
}
enum pl {
value 14 ;
description "Path Loss metric" ;
}
enum ppd {
value 15 ;
description "P2MP Path Delay metric" ;
}
enum ppdv {
value 16 ;
description "P2MP Path Delay variation metric" ;
}
enum ppl {
value 17 ;
description "P2MP Path Loss metric" ;
}
enum nap {
value 18 ;
description "Number of adaptations on a path" ;
}
enum nlp {
value 19 ;
description "Number of layers on a path" ;
}
enum dc {
value 20 ;
description "Domain Count metric" ;
}
enum bnc {
value 21 ;
description "Border Node Count metric" ;
}
}
2025-04-16 09:17:31 +02:00
description
"Type of the metric." ;
2020-07-31 18:04:20 +02:00
}
leaf required {
type boolean ;
default "true" ;
description
"If the metric is a requirement, or if it is only a suggestion" ;
}
leaf is-bound {
type boolean ;
description
"Defines if the value is a bound (a maximum) for the path metric that must not be exceeded." ;
}
leaf is-computed {
type boolean ;
description
"Defines if the value has been generated by the originator of the path." ;
}
leaf value {
type decimal64 {
fraction-digits 6 ;
}
2025-04-16 09:17:31 +02:00
mandatory true ;
description
"Value of the metric." ;
2020-07-31 18:04:20 +02:00
}
}
container objective-function {
presence "If the candidate has an objective function constraint" ;
description
2022-02-14 18:56:21 +01:00
"Define objective function constraint as a list of preferred functions" ;
2020-07-31 18:04:20 +02:00
leaf required {
type boolean ;
default "true" ;
description
"If an objective function is a requirement, or if it is only a suggestion" ;
}
leaf type {
type enumeration {
enum mcp {
value 1 ;
description "Minimum Cost Path" ;
}
enum mlp {
value 2 ;
description "Minimum Load Path" ;
}
enum mbp {
value 3 ;
description "Maximum residual Bandwidth Path" ;
}
enum mbc {
value 4 ;
description "Minimize aggregate Bandwidth Consumption" ;
}
enum mll {
value 5 ;
description "Minimize the Load of the most loaded Link" ;
}
enum mcc {
value 6 ;
description "Minimize the Cumulative Cost of a set of paths" ;
}
enum spt {
value 7 ;
description "Shortest Path Tree" ;
}
enum mct {
value 8 ;
description "Minimum Cost Tree" ;
}
enum mplp {
value 9 ;
description "Minimum Packet Loss Path" ;
}
enum mup {
value 10 ;
description "Maximum Under-Utilized Path" ;
}
enum mrup {
value 11 ;
description "Maximum Reserved Under-Utilized Path" ;
}
enum mtd {
value 12 ;
description "Minimize the number of Transit Domains" ;
}
enum mbn {
value 13 ;
description "Minimize the number of Border Nodes" ;
}
enum mctd {
value 14 ;
description "Minimize the number of Common Transit Domains" ;
}
enum msl {
value 15 ;
description "Minimize the number of Shared Links" ;
}
enum mss {
value 16 ;
description "Minimize the number of Shared SRLGs" ;
}
enum msn {
value 17 ;
description "Minimize the number of Shared Nodes" ;
}
}
2025-04-16 09:17:31 +02:00
mandatory true ;
description
"Type of objective function." ;
2020-07-31 18:04:20 +02:00
}
}
}
}
}
}
}
}