module ietf-isis-flex-algo {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-isis-flex-algo";
prefix isis-flex-algo;
import ietf-routing {
prefix rt;
reference "RFC 8349: A YANG Data Model for Routing
Management (NMDA Version)";
}
import ietf-te-types {
prefix te-types;
reference
"RFC8776: Common YANG Data Types for Traffic Engineering.";
}
import ietf-isis {
prefix "isis";
}
import ietf-te {
prefix "te";
}
import ietf-isis-link-attr {
prefix "isis-link-attr";
}
organization
"IETF LSR - Link State Routing Working Group";
contact
"WG Web:
WG List:
Author: Yingzhen Qu
Author: Acee Lindem
Author: Stephane Litkowski
";
description
"The YANG module defines the configuration and operational
state for ISIS Flexible Algorithm as defined in RFC xxxx.
This YANG model conforms to the Network Management
Datastore Architecture (NMDA) as described in RFC 8342.
Copyright (c) 2022 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 Revised BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX;
see the RFC itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
reference "RFC XXXX: YANG Data Model for ISIS Flexible Algorithm.";
revision 2022-03-06 {
description
"Initial Version";
reference "RFC XXXX: YANG Data Model for ISIS Flexible Algorithm.";
}
/* Identities */
identity metric-type {
description
"Base identity for route metric types.";
}
identity igp-metric {
base metric-type;
description
"Identity for the IGP metric type.";
}
identity min-uni-delay {
base metric-type;
description
"Min unidirectional link delay metric type.";
reference
"RFC 8570 - IS-IS Traffic Engineering (TE) Metric Extensions";
}
identity te-metric {
base metric-type;
description
"Traffic engineering metric type.";
reference
"RFC 5305 - IS-IS Extensions for Traffic Engineering (TE)";
}
identity fad-flags {
description
"Base identity for ISIS FAD flags.";
}
identity m-bit {
base fad-flags;
description
"M bit, when set, the flex-algo specific prefix and ASBR
metric MUST be used for inter-area and external prefix
calculation.";
}
/* Identity augmentation */
identity flex-algo-bit {
base isis-link-attr:sabm-bit;
description
"X bit, flexible algorithm.";
}
/* Groupings */
grouping fa-ex-ag-sub-tlv {
container fa-ex-ag-sub-tlv {
leaf-list extended-admin-groups {
type uint64;
description
"Extended administrative group as defined in RFC 7308.";
}
description
"The flex-algo exclude admin group sub-tlv.";
}
description
"The flex-algo exclude admin group sub-tlv.";
}
grouping fa-in-any-ag-sub-tlv {
container fa-in-any-ag-sub-tlv {
leaf-list extended-admin-groups {
type uint64;
description
"Extended administrative group as defined in RFC 7308.";
}
description
"The flex-algo include-any admin group sub-tlv.";
}
description
"The flex-algo include-any admin group sub-tlv.";
}
grouping fa-in-all-ag-sub-tlv {
container fa-in-all-ag-sub-tlv {
leaf-list extended-admin-groups {
type uint64;
description
"Extended administrative group as defined in RFC 7308.";
}
description
"The flex-algo include-all admin group sub-tlv.";
}
description
"The flex-algo include-all admin group sub-tlv.";
}
grouping fad-flags-sub-tlv {
container fad-flags-sub-tlv {
leaf-list fad-flags {
type identityref {
base fad-flags;
}
description
"Flex-algo definition flags list.";
}
description
"ISIS flex-algo definition flags.";
}
description
"The flex-algo definition flags sub-tlv.";
}
grouping fa-ex-srlg-sub-tlv {
container fa-ex-srlg-sub-tlv {
leaf-list srlgs {
type uint32;
description
"SRLG value as defined in RFC 4203.";
}
description
"The flex-algo exclude SRLG sub-tlv.";
}
description
"The flex-algo exclude SRLG sub-tlv.";
}
grouping fad-tlvs {
container fad-tlvs {
list fad-tlv {
leaf flex-algo {
type uint8;
description
"Flex-algo number, value between 128 and 255 inclusive.";
}
leaf metric-type {
type identityref {
base metric-type;
}
description
"Type of metric to be used during the calculation.";
}
leaf calc-type {
type uint8 {
range "0..127";
}
description
"IGP algorithm types, value from 0 to 127 as
defined under 'Interior Gateway Protocol (IGP)
Parameter' by IANA.";
}
leaf priority {
type uint8;
description
"Priority of the advertisement.";
}
uses fa-ex-ag-sub-tlv;
uses fa-in-any-ag-sub-tlv;
uses fa-in-all-ag-sub-tlv;
uses fad-flags-sub-tlv;
uses fa-ex-srlg-sub-tlv;
uses isis:unknown-tlvs;
description
"List of flex-algo definition TLVs.";
}
description
"ISIS Flexible Algorithm Definition TLV.";
}
description
"ISIS Flexible Algorithm Definition (FAD) TLV.";
}
grouping fapm-sub-tlvs {
container fapm-sub-tlvs {
list fapm-sub-tlv {
leaf flex-algo {
type uint8;
description
"Flex-algo number, value between 128 and 255
inclusive.";
}
leaf metric {
type uint32;
description
"Prefix metric.";
}
description
"List of flex-algo prefix sub-tlvs.";
}
description
"Flex-algo prefix metric sub-tlvs.";
}
description
"Flexible Algorithm Prefix Metric (FAPM) sub TLVs.";
}
/* Configurations */
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol configuration
with flexible algorithm.";
container isis-flex-algo {
list flex-algo {
key "algo-number";
leaf algo-number {
type uint8 {
range "128..255";
}
description
"An identifier in the range 128-255 that's associated
with the Flexible Algorithm Definition.";
}
leaf advertise-definition {
type boolean;
default true;
description
"Enable to advertise the flex-algo definition.";
}
container admin-groups {
if-feature "te-types:extended-admin-groups";
if-feature "te-types:named-extended-admin-groups";
leaf-list exclude-admin-groups {
type leafref {
path "/te:te/te:globals/te:named-admin-groups/"
+ "te:named-admin-group/te:name";
}
description
"Exclude rule used during the flex-algo
path computation.";
}
leaf-list include-any-admin-groups {
type leafref {
path "/te:te/te:globals/te:named-admin-groups/"
+ "te:named-admin-group/te:name";
}
description
"Include-any rule used during the flex-algo
path computation.";
}
leaf-list include-all-admin-groups {
type leafref {
path "/te:te/te:globals/te:named-admin-groups/"
+ "te:named-admin-group/te:name";
}
description
"Include-all rule used during the flex-algo
path computation.";
}
description
"Specify links for the flex-algo path computation.";
}
leaf-list exclude-srlgs {
if-feature "te-types:named-srlg-groups";
type leafref {
path "/te:te/te:globals/te:named-srlgs/te:named-srlg/"
+ "te:name";
}
description
"Shared Risk Link Groups (SRLGs) to be excluded during
the flex-algo path computation.";
}
leaf fast-reroute {
type boolean;
default true;
description
"Enable fast reroute.";
}
leaf metric-type {
type identityref {
base metric-type;
}
description
"Type of metric to be used during the calculation.";
}
leaf microloop-avoidance {
type boolean;
default true;
description
"Enable microloop avoidance.";
}
container prefix-metric {
presence
"Use flex-algo specific prefix metric.";
description
"Use flex-algo prefix metric.";
}
leaf priority {
type uint8;
description
"Priority of the advertisement.";
}
description
"List of flex-algo configurations.";
}
description
"Flexible Algorithm configuration.";
}
}
/* Database */
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis/isis:database/isis:levels/isis:lsp"+
"/isis:router-capabilities" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol LSDB router capability.";
uses fad-tlvs;
}
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis/isis:database/isis:levels/isis:lsp"+
"/isis:extended-ipv4-reachability/isis:prefixes" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol LSDB prefix.";
uses fapm-sub-tlvs;
}
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis/isis:database/isis:levels/isis:lsp"+
"/isis:mt-extended-ipv4-reachability/isis:prefixes" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol LSDB prefix.";
uses fapm-sub-tlvs;
}
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis/isis:database/isis:levels/isis:lsp"+
"/isis:ipv6-reachability/isis:prefixes" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol LSDB prefix.";
uses fapm-sub-tlvs;
}
augment "/rt:routing/" +
"rt:control-plane-protocols/rt:control-plane-protocol"+
"/isis:isis/isis:database/isis:levels/isis:lsp"+
"/isis:mt-ipv6-reachability/isis:prefixes" {
when "/rt:routing/rt:control-plane-protocols/"+
"rt:control-plane-protocol/rt:type = 'isis:isis'" {
description
"This augment ISIS routing protocol when used";
}
description
"This augments ISIS protocol LSDB prefix.";
uses fapm-sub-tlvs;
}
/* notification */
notification flex-algo-not-supported {
uses isis:notification-instance-hdr;
leaf flex-algo-number {
type uint8 {
range "128..255";
}
description
"Flex-algo identifier which is not supported by the IS-IS
instance.";
}
description
"This notification is sent when an IS-IS instance does not
support this flex-algo.";
}
}