module ietf-te-device {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-te-device";
/* Replace with IANA when assigned */
prefix te-dev;
/* Import TE module */
import ietf-te {
prefix te;
reference
"draft-ietf-teas-yang-te: A YANG Data Model for Traffic
Engineering Tunnels and Interfaces";
}
/* Import TE types */
import ietf-te-types {
prefix te-types;
reference
"RFC8776: Common YANG Data Types for Traffic Engineering.";
}
import ietf-interfaces {
prefix if;
reference
"RFC8343: A YANG Data Model for Interface Management";
}
import ietf-routing-types {
prefix rt-types;
reference
"RFC8294: Common YANG Data Types for the Routing Area";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group";
contact
"WG Web:
WG List:
Editor: Tarek Saad
Editor: Rakesh Gandhi
Editor: Vishnu Pavan Beeram
Editor: Himanshu Shah
Editor: Xufeng Liu
Editor: Igor Bryskin
";
description
"YANG data module for TE device configurations,
state, and RPCs. The model fully conforms to the
Network Management Datastore Architecture (NMDA).
Copyright (c) 2019 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
(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.";
// RFC Ed.: replace XXXX with actual RFC number and remove this
// note.
// RFC Ed.: update the date below with the date of RFC publication
// and remove this note.
revision 2021-10-22 {
description
"Latest update to TE device YANG module.";
reference
"RFCXXXX: A YANG Data Model for Traffic Engineering Tunnels
and Interfaces";
}
/**
* TE LSP device state grouping
*/
grouping lsps-device-info {
description
"TE LSP device state grouping.";
container lsp-timers {
when "../te:origin-type = 'ingress'" {
description
"Applicable to ingress LSPs only.";
}
description
"Ingress LSP timers.";
leaf life-time {
type uint32;
units "seconds";
description
"TE LSP lifetime.";
}
leaf time-to-install {
type uint32;
units "seconds";
description
"TE LSP installation delay time.";
}
leaf time-to-destroy {
type uint32;
units "seconds";
description
"TE LSP expiration delay time.";
}
}
container downstream-info {
when "../te:origin-type != 'egress'" {
description
"Downstream information of the LSP.";
}
description
"downstream information.";
leaf nhop {
type te-types:te-tp-id;
description
"downstream next-hop address.";
}
leaf outgoing-interface {
type if:interface-ref;
description
"downstream interface.";
}
container neighbor {
uses te:te-generic-node-id;
description
"downstream neighbor address.";
}
leaf label {
type rt-types:generalized-label;
description
"downstream label.";
}
}
container upstream-info {
when "../te:origin-type != 'ingress'" {
description
"Upstream information of the LSP.";
}
description
"upstream information.";
leaf phop {
type te-types:te-tp-id;
description
"upstream next-hop or previous-hop address.";
}
container neighbor {
uses te:te-generic-node-id;
description
"upstream neighbor address.";
}
leaf label {
type rt-types:generalized-label;
description
"upstream label.";
}
}
}
/**
* Device general groupings.
*/
grouping lsp-device-timers {
description
"Device TE LSP timers configs.";
leaf lsp-install-interval {
type uint32;
units "seconds";
description
"TE LSP installation delay time.";
}
leaf lsp-cleanup-interval {
type uint32;
units "seconds";
description
"TE LSP cleanup delay time.";
}
leaf lsp-invalidation-interval {
type uint32;
units "seconds";
description
"TE LSP path invalidation before taking action delay time.";
}
}
/**
* TE global device groupings
*/
/* TE interface container data */
grouping interfaces-grouping {
description
"TE interface configuration data grouping.";
container interfaces {
description
"Configuration data model for TE interfaces.";
uses te-all-attributes;
list interface {
key "interface";
description
"TE interfaces.";
leaf interface {
type if:interface-ref;
description
"TE interface name.";
}
/* TE interface parameters */
uses te-attributes;
}
}
}
/**
* TE interface device groupings
*/
grouping te-admin-groups-config {
description
"TE interface affinities grouping.";
choice admin-group-type {
description
"TE interface administrative groups
representation type.";
case value-admin-groups {
choice value-admin-group-type {
description
"choice of admin-groups.";
case admin-groups {
description
"Administrative group/Resource
class/Color.";
leaf admin-group {
type te-types:admin-group;
description
"TE interface administrative group.";
}
}
case extended-admin-groups {
if-feature "te-types:extended-admin-groups";
description
"Extended administrative group/Resource
class/Color.";
leaf extended-admin-group {
type te-types:extended-admin-group;
description
"TE interface extended administrative group.";
}
}
}
}
case named-admin-groups {
list named-admin-groups {
if-feature "te-types:extended-admin-groups";
if-feature "te-types:named-extended-admin-groups";
key "named-admin-group";
description
"A list of named admin-group entries.";
leaf named-admin-group {
type leafref {
path "../../../../te:globals/"
+ "te:named-admin-groups/te:named-admin-group/"
+ "te:name";
}
description
"A named admin-group entry.";
}
}
}
}
}
/* TE interface SRLGs */
grouping te-srlgs-config {
description
"TE interface SRLG grouping.";
choice srlg-type {
description
"Choice of SRLG configuration.";
case value-srlgs {
list values {
key "value";
description
"List of SRLG values that
this link is part of.";
leaf value {
type uint32 {
range "0..4294967295";
}
description
"Value of the SRLG";
}
}
}
case named-srlgs {
list named-srlgs {
if-feature "te-types:named-srlg-groups";
key "named-srlg";
description
"A list of named SRLG entries.";
leaf named-srlg {
type leafref {
path "../../../../te:globals/"
+ "te:named-srlgs/te:named-srlg/te:name";
}
description
"A named SRLG entry.";
}
}
}
}
}
grouping te-igp-flooding-bandwidth-config {
description
"Configurable items for igp flooding bandwidth
threshold configuration.";
leaf threshold-type {
type enumeration {
enum delta {
description
"'delta' indicates that the local
system should flood IGP updates when a
change in reserved bandwidth >= the specified
delta occurs on the interface.";
}
enum threshold-crossed {
description
"THRESHOLD-CROSSED indicates that
the local system should trigger an update (and
hence flood) the reserved bandwidth when the
reserved bandwidth changes such that it crosses,
or becomes equal to one of the threshold values.";
}
}
description
"The type of threshold that should be used to specify the
values at which bandwidth is flooded. 'delta' indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where 'threshold-crossed' is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values.";
}
leaf delta-percentage {
when "../threshold-type = 'delta'" {
description
"The percentage delta can only be specified when the
threshold type is specified to be a percentage delta of
the reserved bandwidth.";
}
type rt-types:percentage;
description
"The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded.";
}
leaf threshold-specification {
when "../threshold-type = 'threshold-crossed'" {
description
"The selection of whether mirrored or separate threshold
values are to be used requires user specified thresholds
to be set.";
}
type enumeration {
enum mirrored-up-down {
description
"mirrored-up-down indicates that a single set of
threshold values should be used for both increasing
and decreasing bandwidth when determining whether
to trigger updated bandwidth values to be flooded
in the IGP TE extensions.";
}
enum separate-up-down {
description
"separate-up-down indicates that a separate
threshold values should be used for the increasing
and decreasing bandwidth when determining whether
to trigger updated bandwidth values to be flooded
in the IGP TE extensions.";
}
}
description
"This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
'mirrored-up-down' indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where 'separate-up-down' specifies that the
increasing and decreasing values will be separately
specified.";
}
leaf-list up-thresholds {
when "../threshold-type = 'threshold-crossed'"
+ "and ../threshold-specification = 'separate-up-down'" {
description
"A list of up-thresholds can only be specified when the
bandwidth update is triggered based on crossing a
threshold and separate up and down thresholds are
required.";
}
type rt-types:percentage;
description
"The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.";
}
leaf-list down-thresholds {
when "../threshold-type = 'threshold-crossed'"
+ "and ../threshold-specification = 'separate-up-down'" {
description
"A list of down-thresholds can only be specified when the
bandwidth update is triggered based on crossing a
threshold and separate up and down thresholds are
required.";
}
type rt-types:percentage;
description
"The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.";
}
leaf-list up-down-thresholds {
when "../threshold-type = 'threshold-crossed'"
+ "and ../threshold-specification = 'mirrored-up-down'" {
description
"A list of thresholds corresponding to both increasing
and decreasing bandwidths can be specified only when an
update is triggered based on crossing a threshold, and
the same up and down thresholds are required.";
}
type rt-types:percentage;
description
"The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing.";
}
}
/* TE interface metric */
grouping te-metric-config {
description
"TE interface metric grouping.";
leaf te-metric {
type te-types:te-metric;
description
"TE interface metric.";
}
}
/* TE interface switching capabilities */
grouping te-switching-cap-config {
description
"TE interface switching capabilities.";
list switching-capabilities {
key "switching-capability";
description
"List of interface capabilities for this interface.";
leaf switching-capability {
type identityref {
base te-types:switching-capabilities;
}
description
"Switching Capability for this interface.";
}
leaf encoding {
type identityref {
base te-types:lsp-encoding-types;
}
description
"Encoding supported by this interface.";
}
}
}
grouping te-advertisements-state {
description
"TE interface advertisements state grouping.";
container te-advertisements-state {
description
"TE interface advertisements state container.";
leaf flood-interval {
type uint32;
description
"The periodic flooding interval.";
}
leaf last-flooded-time {
type uint32;
units "seconds";
description
"Time elapsed since last flooding in seconds.";
}
leaf next-flooded-time {
type uint32;
units "seconds";
description
"Time remained for next flooding in seconds.";
}
leaf last-flooded-trigger {
type enumeration {
enum link-up {
description
"Link-up flooding trigger.";
}
enum link-down {
description
"Link-down flooding trigger.";
}
enum threshold-up {
description
"Bandwidth reservation up threshold.";
}
enum threshold-down {
description
"Bandwidth reservation down threshold.";
}
enum bandwidth-change {
description
"Bandwidth capacity change.";
}
enum user-initiated {
description
"Initiated by user.";
}
enum srlg-change {
description
"SRLG property change.";
}
enum periodic-timer {
description
"Periodic timer expired.";
}
}
default "periodic-timer";
description
"Trigger for the last flood.";
}
list advertised-level-areas {
key "level-area";
description
"List of level-areas that the TE interface is advertised
in.";
leaf level-area {
type uint32;
description
"The IGP area or level where the TE interface link state
is advertised in.";
}
}
}
}
/* TE interface attributes grouping */
grouping te-attributes {
description
"TE attributes configuration grouping.";
uses te-metric-config;
uses te-admin-groups-config;
uses te-srlgs-config;
uses te-igp-flooding-bandwidth-config;
uses te-switching-cap-config;
container state {
config false;
description
"State parameters for interface TE metric.";
uses te-advertisements-state;
}
}
grouping te-all-attributes {
description
"TE attributes configuration grouping for all
interfaces.";
uses te-igp-flooding-bandwidth-config;
}
/*** End of TE interfaces device groupings ***/
/**
* TE device augmentations
*/
augment "/te:te" {
description
"TE global container.";
/* TE Interface Configuration Data */
uses interfaces-grouping;
container performance-thresholds {
description
"Performance parameters configurable thresholds.";
}
}
/* TE globals device augmentation */
augment "/te:te/te:globals" {
description
"Global TE device specific configuration parameters.";
uses lsp-device-timers;
}
/* TE tunnels device configuration augmentation */
augment "/te:te/te:tunnels/te:tunnel" {
description
"Tunnel device dependent augmentation.";
leaf path-invalidation-action {
type identityref {
base te-types:path-invalidation-action-type;
}
description
"Tunnel path invalidation action.";
}
uses lsp-device-timers;
}
/* TE LSPs device state augmentation */
augment "/te:te/te:lsps/te:lsp" {
description
"TE LSP device dependent augmentation.";
uses lsps-device-info;
}
/* TE interfaces RPCs/execution Data */
rpc link-state-update {
description
"Triggers a link state update for the specific interface.";
input {
choice filter-type {
mandatory true;
description
"Filter choice.";
case match-all {
leaf all {
type empty;
mandatory true;
description
"Match all TE interfaces.";
}
}
case match-one-interface {
leaf interface {
type if:interface-ref;
description
"Match a specific TE interface.";
}
}
}
}
}
}