<CODE BEGINS> file "ietf-te@2021-10-22.yang"
module ietf-te {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-te";
/* Replace with IANA when assigned */
prefix te;
/* Import TE generic types */
import ietf-te-types {
prefix te-types;
reference
"RFC8776: Common YANG Data Types for Traffic Engineering.";
}
import ietf-inet-types {
prefix inet;
reference
"RFC6991: Common YANG Data Types.";
}
import ietf-yang-types {
prefix yang;
reference
"RFC6991: Common YANG Data Types.";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group.";
contact
"WG Web: <http://tools.ietf.org/wg/teas/>
WG List: <mailto:teas@ietf.org>
Editor: Tarek Saad
<mailto:tsaad@juniper.net>
Editor: Rakesh Gandhi
<mailto:rgandhi@cisco.com>
Editor: Vishnu Pavan Beeram
<mailto:vbeeram@juniper.net>
Editor: Himanshu Shah
<mailto:hshah@ciena.com>
Editor: Xufeng Liu
<mailto: xufeng.liu.ietf@gmail.com>
Editor: Igor Bryskin
<mailto:i_bryskin@yahoo.com>";
description
"YANG data module for TE configuration, 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 generic YANG module.";
reference
"RFCXXXX: A YANG Data Model for Traffic Engineering Tunnels
and Interfaces.";
}
identity path-computation-error-reason {
description
"Base identity for path computation error reasons.";
}
identity path-computation-error-no-topology {
base path-computation-error-reason;
description
"Path computation has failed because there is no topology
with the provided topology-identifier.";
}
identity path-computation-error-no-dependent-server {
base path-computation-error-reason;
description
"Path computation has failed because one or more dependent
path computation servers are unavailable.
The dependent path computation server could be
a Backward-Recursive Path Computation (BRPC) downstream
PCE or a child PCE.";
reference
"RFC5441, RFC8685";
}
identity path-computation-error-pce-unavailable {
base path-computation-error-reason;
description
"Path computation has failed because PCE is not available.";
reference
"RFC5440";
}
identity path-computation-error-no-inclusion-hop {
base path-computation-error-reason;
description
"Path computation has failed because there is no
node or link provided by one or more inclusion hops.";
reference
"RFC8685";
}
identity path-computation-error-destination-unknown-in-domain {
base path-computation-error-reason;
description
"Path computation has failed because the destination node is
unknown in indicated destination domain.";
reference
"RFC8685";
}
identity path-computation-error-no-resource {
base path-computation-error-reason;
description
"Path computation has failed because there is no
available resource in one or more domains.";
reference
"RFC8685";
}
identity path-computation-error-child-pce-unresponsive {
base path-computation-error-reason;
description
"Path computation has failed because child PCE is not
responsive.";
reference
"RFC8685";
}
identity path-computation-error-destination-domain-unknown {
base path-computation-error-reason;
description
"Path computation has failed because the destination domain
was unknown.";
reference
"RFC8685";
}
identity path-computation-error-p2mp {
base path-computation-error-reason;
description
"Path computation has failed because of P2MP reachability
problem.";
reference
"RFC8306";
}
identity path-computation-error-no-gco-migration {
base path-computation-error-reason;
description
"Path computation has failed because of no Global Concurrent
Optimization (GCO) migration path found.";
reference
"RFC5557";
}
identity path-computation-error-no-gco-solution {
base path-computation-error-reason;
description
"Path computation has failed because of no GCO solution
found.";
reference
"RFC5557";
}
identity path-computation-error-path-not-found {
base path-computation-error-reason;
description
"Path computation no path found error reason.";
reference
"RFC5440";
}
identity path-computation-error-pks-expansion {
base path-computation-error-reason;
description
"Path computation has failed because of Path-Key Subobject
(PKS) expansion failure.";
reference
"RFC5520";
}
identity path-computation-error-brpc-chain-unavailable {
base path-computation-error-reason;
description
"Path computation has failed because PCE BRPC chain
unavailable.";
reference
"RFC5441";
}
identity path-computation-error-source-unknown {
base path-computation-error-reason;
description
"Path computation has failed because source node is unknown.";
reference
"RFC5440";
}
identity path-computation-error-destination-unknown {
base path-computation-error-reason;
description
"Path computation has failed because destination node is
unknown.";
reference
"RFC5440";
}
identity path-computation-error-no-server {
base path-computation-error-reason;
description
"Path computation has failed because path computation
server is unavailable.";
reference
"RFC5440";
}
identity tunnel-actions-type {
description
"TE tunnel actions type.";
}
identity tunnel-action-reoptimize {
base tunnel-actions-type;
description
"Reoptimize tunnel action type.";
}
identity tunnel-admin-auto {
base te-types:tunnel-admin-state-type;
description
"Tunnel administrative auto state. The administrative status
in state datastore transitions to 'tunnel-admin-up' when the
tunnel used by the client layer, and to 'tunnel-admin-down'
when it is not used by the client layer.";
}
identity association-type-diversity {
base te-types:association-type;
description
"Association Type diversity used to associate LSPs whose paths
are to be diverse from each other.";
reference
"RFC8800";
}
identity protocol-origin-type {
description
"Base identity for protocol origin type.";
}
identity protocol-origin-api {
base protocol-origin-type;
description
"Protocol origin is via Application Programmable Interface
(API).";
}
identity protocol-origin-pcep {
base protocol-origin-type;
description
"Protocol origin is Path Computation Engine Protocol (PCEP).";
reference "RFC5440";
}
identity protocol-origin-bgp {
base protocol-origin-type;
description
"Protocol origin is Border Gateway Protocol (BGP).";
reference "RFC5512";
}
typedef tunnel-ref {
type leafref {
path "/te:te/te:tunnels/te:tunnel/te:name";
}
description
"This type is used by data models that need to reference
configured TE tunnel.";
}
typedef path-ref {
type union {
type leafref {
path "/te:te/te:tunnels/te:tunnel/"
+ "te:primary-paths/te:primary-path/te:name";
}
type leafref {
path "/te:te/te:tunnels/te:tunnel/"
+ "te:secondary-paths/te:secondary-path/te:name";
}
}
description
"This type is used by data models that need to reference
configured primary or secondary path of a TE tunnel.";
}
typedef te-gen-node-id {
type union {
type te-types:te-node-id;
type inet:ip-address;
}
description
"Generic type that identifies a node in a TE topology.";
}
/**
* TE tunnel generic groupings
*/
grouping te-generic-node-id {
description
"A reusable grouping for a TE generic node identifier.";
leaf id {
type te-gen-node-id;
description
"The identifier of the node. Can be represented as IP
address or dotted quad address.";
}
leaf type {
type enumeration {
enum ip {
description
"IP address representation of the node identifier.";
}
enum dotted-quad {
description
"Dotted quad address representation of the node
identifier.";
}
}
description
"Type of node identifier representation.";
}
}
grouping primary-path {
description
"The tunnel primary path properties.";
uses path-common-properties;
uses path-preference;
uses k-requested-paths;
uses path-compute-info;
uses path-state;
}
grouping primary-reverse-path {
description
"The tunnel primary reverse path properties.";
reference
"RFC7551";
uses path-common-properties;
uses path-compute-info;
uses path-state;
}
grouping secondary-path {
description
"The tunnel secondary path properties.";
uses path-common-properties;
uses path-preference;
uses path-compute-info;
uses protection-restoration-properties;
uses path-state;
}
grouping secondary-reverse-path {
description
"The tunnel secondary reverse path properties.";
uses path-common-properties;
uses path-preference;
uses path-compute-info;
uses protection-restoration-properties;
uses path-state;
}
grouping path-common-properties {
description
"Common path attributes.";
leaf name {
type string;
description
"TE path name.";
}
leaf path-computation-method {
type identityref {
base te-types:path-computation-method;
}
default "te-types:path-locally-computed";
description
"The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).";
}
container path-computation-server {
when "derived-from-or-self(../path-computation-method, "
+ "'te-types:path-externally-queried')" {
description
"The path-computation server when the path is
externally queried.";
}
uses te-generic-node-id;
description
"Address of the external path computation
server.";
}
leaf compute-only {
type empty;
description
"When set, the path is computed and updated whenever
the topology is updated. No resources are committed
or reserved in the network.";
}
leaf use-path-computation {
when "derived-from-or-self(../path-computation-method, "
+ "'te-types:path-locally-computed')";
type boolean;
default "true";
description
"When 'true' indicates the path is dynamically computed
and/or validated against the Traffic-Engineering Database
(TED), and when 'false' indicates no validation against
the TED is required.";
}
leaf lockdown {
type empty;
description
"Indicates no reoptimization to be attempted for this path.";
}
leaf path-scope {
type identityref {
base te-types:path-scope-type;
}
default "te-types:path-scope-end-to-end";
config false;
description
"Path scope if segment or an end-to-end path.";
}
}
/* This grouping will be re-used in path-computation rpc */
grouping path-compute-info {
description
"Attributes used for path computation request.";
uses tunnel-associations-properties;
uses te-types:generic-path-optimization;
leaf named-path-constraint {
if-feature "te-types:named-path-constraints";
type leafref {
path "/te:te/te:globals/te:named-path-constraints/"
+ "te:named-path-constraint/te:name";
}
description
"Reference to a globally defined named path constraint set.";
}
uses path-constraints-common;
}
/* This grouping will be re-used in path-computation rpc */
grouping path-preference {
description
"The path preference.";
leaf preference {
type uint8 {
range "1..255";
}
default "1";
description
"Specifies a preference for this path. The lower the number
higher the preference.";
}
}
/* This grouping will be re-used in path-computation rpc */
grouping k-requested-paths {
description
"The k-shortest paths requests.";
leaf k-requested-paths {
type uint8;
default "1";
description
"The number of k-shortest-paths requested from the path
computation server and returned sorted by its optimization
objective. The value 0 all possible paths.";
}
}
grouping path-properties {
description
"TE computed path properties grouping.";
uses te-types:generic-path-properties {
augment "path-properties" {
description
"additional path properties returned by path computation.";
uses te-types:te-bandwidth;
leaf disjointness-type {
type te-types:te-path-disjointness;
config false;
description
"The type of resource disjointness.
When reported for a primary path, it represents the
minimum level of disjointness of all the secondary
paths.
When reported for a secondary path, it represents the
disjointness of the secondary path.";
}
}
}
}
grouping path-state {
description
"TE per path state parameters.";
uses path-computation-response;
uses lsp-provisioning-error-info {
augment "lsp-provisioning-error-infos/"
+ "lsp-provisioning-error-info" {
description
"Augmentation of LSP provisioning information under a
specific path.";
leaf lsp-id {
type uint16;
description
"The LSP-ID for which path computation was performed.";
}
}
}
container lsps {
config false;
description
"The TE LSPs container.";
list lsp {
key "node lsp-id";
description
"List of LSPs associated with the tunnel.";
leaf tunnel-name {
type leafref {
path "/te:te/te:lsps/te:lsp/te:tunnel-name";
}
description "TE tunnel name.";
}
leaf node {
type leafref {
path "/te:te/te:lsps/te:lsp/te:node";
}
description "The node where the LSP state resides on.";
}
leaf lsp-id {
type leafref {
path "/te:te/te:lsps/te:lsp/te:lsp-id";
}
description "The TE LSP identifier.";
}
}
}
}
/* This grouping will be re-used in path-computation rpc */
grouping path-computation-response {
description
"Attributes reported by path computation response.";
container computed-paths-properties {
config false;
description
"Computed path properties container.";
list computed-path-properties {
key "k-index";
description
"List of computed paths.";
leaf k-index {
type uint8;
description
"The k-th path returned from the computation server.
A lower k value path is more optimal than higher k
value path(s)";
}
uses path-properties {
description
"The TE path computed properties.";
}
}
}
container computed-path-error-infos {
config false;
description
"Path computation information container.";
list computed-path-error-info {
description
"List of path computation info entries.";
leaf error-description {
type string;
description
"Textual representation of the error occurred during
path computation.";
}
leaf error-timestamp {
type yang:date-and-time;
description
"Timestamp of last path computation attempt.";
}
leaf error-reason {
type identityref {
base path-computation-error-reason;
}
description
"Reason for the path computation error.";
}
}
}
}
grouping lsp-provisioning-error-info {
description
"Grouping for LSP provisioning error information.";
container lsp-provisioning-error-infos {
config false;
description
"LSP provisioning error information.";
list lsp-provisioning-error-info {
description
"List of LSP provisioning error info entries.";
leaf error-description {
type string;
description
"Textual representation of the error occurred during
path computation.";
}
leaf error-timestamp {
type yang:date-and-time;
description
"Timestamp of when the reported error occurred.";
}
leaf error-node-id {
type te-types:te-node-id;
default "0.0.0.0";
description
"Node identifier of node where error occurred.";
}
leaf error-link-id {
type te-types:te-tp-id;
default "0";
description
"Link ID where the error occurred.";
}
}
}
}
grouping protection-restoration-properties-state {
description
"Protection parameters grouping.";
leaf lockout-of-normal {
type boolean;
default "false";
description
"When set to 'True', it represents a lockout of normal
traffic external command. When set to 'False', it
represents a clear lockout of normal traffic external
command. The lockout of normal traffic command applies
to this Tunnel.";
reference
"RFC4427";
}
leaf freeze {
type boolean;
default "false";
description
"When set to 'True', it represents a freeze external command.
When set to 'False', it represents a clear freeze external
command. The freeze command applies to all the Tunnels which
are sharing the protection resources with this Tunnel.";
reference
"RFC4427";
}
leaf lsp-protection-role {
type enumeration {
enum working {
description
"A working LSP must be a primary LSP whilst a protecting
LSP can be either a primary or a secondary LSP. Also,
known as protected LSPs when working LSPs are associated
with protecting LSPs.";
}
enum protecting {
description
"A secondary LSP is an LSP that has been provisioned
in the control plane only; e.g. resource allocation
has not been committed at the data plane.";
}
}
default "working";
description
"LSP role type.";
reference
"RFC4872, section 4.2.1";
}
leaf lsp-protection-state {
type identityref {
base te-types:lsp-protection-state;
}
default "te-types:normal";
description
"The state of the APS state machine controlling which
tunnels is using the resources of the protecting LSP.";
}
leaf protection-group-ingress-node-id {
type te-types:te-node-id;
default "0.0.0.0";
description
"Indicates the te-node-id of the protection group
ingress node when the APS state represents an external
command (LoP, SF, MS) applied to it or a WTR timer
running on it. If the external command is not applied to
the ingress node or the WTR timer is not running on it,
this attribute is not specified. A value 0.0.0.0 is used
when the te-node-id of the protection group ingress node is
unknown (e.g., because the ingress node is outside the scope
of control of the server)";
}
leaf protection-group-egress-node-id {
type te-types:te-node-id;
default "0.0.0.0";
description
"Indicates the te-node-id of the protection group egress node
when the APS state represents an external command (LoP, SF,
MS) applied to it or a WTR timer running on it. If the
external command is not applied to the ingress node or
the WTR timer is not running on it, this attribute is not
specified. A value 0.0.0.0 is used when the te-node-id of
the protection group ingress node is unknown (e.g., because
the ingress node is outside the scope of control of the
server)";
}
}
grouping protection-restoration-properties {
description
"Protection and restoration parameters.";
container protection {
description
"Protection parameters.";
leaf enable {
type boolean;
default "false";
description
"A flag to specify if LSP protection is enabled.";
reference
"RFC4427";
}
leaf protection-type {
type identityref {
base te-types:lsp-protection-type;
}
default "te-types:lsp-protection-unprotected";
description
"LSP protection type.";
}
leaf protection-reversion-disable {
type boolean;
default "false";
description
"Disable protection reversion to working path.";
}
leaf hold-off-time {
type uint32;
units "milli-seconds";
default "0";
description
"The time between the declaration of an SF or SD condition
and the initialization of the protection switching
algorithm.";
reference
"RFC4427";
}
leaf wait-to-revert {
type uint16;
units "seconds";
description
"Time to wait before attempting LSP reversion.";
reference
"RFC4427";
}
leaf aps-signal-id {
type uint8 {
range "1..255";
}
default "1";
description
"The APS signal number used to reference the traffic of
this tunnel. The default value for normal traffic is 1.
The default value for extra-traffic is 255. If not
specified, non-default values can be assigned by the
server, if and only if, the server controls both
endpoints.";
reference
"RFC4427";
}
}
container restoration {
description
"Restoration parameters.";
leaf enable {
type boolean;
default "false";
description
"A flag to specify if LSP restoration is enabled.";
reference
"RFC4427";
}
leaf restoration-type {
type identityref {
base te-types:lsp-restoration-type;
}
default "te-types:lsp-restoration-restore-any";
description
"LSP restoration type.";
}
leaf restoration-scheme {
type identityref {
base te-types:restoration-scheme-type;
}
default "te-types:restoration-scheme-preconfigured";
description
"LSP restoration scheme.";
}
leaf restoration-reversion-disable {
type boolean;
default "false";
description
"Disable restoration reversion to working path.";
}
leaf hold-off-time {
type uint32;
units "milli-seconds";
description
"The time between the declaration of an SF or SD condition
and the initialization of the protection switching
algorithm.";
reference
"RFC4427";
}
leaf wait-to-restore {
type uint16;
units "seconds";
description
"Time to wait before attempting LSP restoration.";
reference
"RFC4427";
}
leaf wait-to-revert {
type uint16;
units "seconds";
description
"Time to wait before attempting LSP reversion.";
reference
"RFC4427";
}
}
}
grouping tunnel-associations-properties {
description
"TE tunnel association grouping.";
container association-objects {
description
"TE tunnel associations.";
list association-object {
key "association-key";
unique "type id source/id source/type";
description
"List of association base objects.";
reference
"RFC4872";
leaf association-key {
type string;
description
"Association key used to identify a specific
association in the list";
}
leaf type {
type identityref {
base te-types:association-type;
}
description
"Association type.";
reference
"RFC4872";
}
leaf id {
type uint16;
description
"Association identifier.";
reference
"RFC4872";
}
container source {
uses te-generic-node-id;
description
"Association source.";
reference
"RFC4872";
}
}
list association-object-extended {
key "association-key";
unique
"type id source/id source/type global-source extended-id";
description
"List of extended association objects.";
reference
"RFC6780";
leaf association-key {
type string;
description
"Association key used to identify a specific
association in the list";
}
leaf type {
type identityref {
base te-types:association-type;
}
description
"Association type.";
reference
"RFC4872, RFC6780";
}
leaf id {
type uint16;
description
"Association identifier.";
reference
"RFC4872, RFC6780";
}
container source {
uses te-generic-node-id;
description
"Association source.";
reference
"RFC4872, RFC6780";
}
leaf global-source {
type uint32;
description
"Association global source.";
reference
"RFC6780";
}
leaf extended-id {
type yang:hex-string;
description
"Association extended identifier.";
reference
"RFC6780";
}
}
}
}
/* TE tunnel configuration/state grouping */
/* These grouping will be re-used in path-computation rpc */
grouping encoding-and-switching-type {
description
"Common grouping to define the LSP encoding and
switching types";
leaf encoding {
type identityref {
base te-types:lsp-encoding-types;
}
description
"LSP encoding type.";
reference
"RFC3945";
}
leaf switching-type {
type identityref {
base te-types:switching-capabilities;
}
description
"LSP switching type.";
reference
"RFC3945";
}
}
grouping tunnel-common-attributes {
description
"Common grouping to define the TE tunnel parameters";
leaf source {
type te-types:te-node-id;
description
"TE tunnel source node ID.";
}
leaf destination {
type te-types:te-node-id;
description
"TE tunnel destination node identifier.";
}
leaf src-tunnel-tp-id {
type binary;
description
"TE tunnel source termination point identifier.";
}
leaf dst-tunnel-tp-id {
type binary;
description
"TE tunnel destination termination point identifier.";
}
leaf bidirectional {
type boolean;
default "false";
description
"Indicates a bidirectional co-routed LSP.";
}
}
grouping tunnel-hierarchy-properties {
description
"A grouping for TE tunnel hierarchy information.";
container hierarchy {
description
"Container for TE hierarchy related information.";
container dependency-tunnels {
description
"List of tunnels that this tunnel can be potentially
dependent on.";
list dependency-tunnel {
key "name";
description
"A tunnel entry that this tunnel can potentially depend
on.";
leaf name {
type leafref {
path "/te:te/te:tunnels/te:tunnel/te:name";
require-instance false;
}
description
"Dependency tunnel name. The tunnel may not have been
instantiated yet.";
}
uses encoding-and-switching-type;
}
}
container hierarchical-link {
description
"Identifies a hierarchical link (in client layer)
that this tunnel is associated with.";
reference
"RFC4206";
leaf local-te-node-id {
type te-types:te-node-id;
default "0.0.0.0";
description
"The local TE node identifier.";
}
leaf local-te-link-tp-id {
type te-types:te-tp-id;
default "0";
description
"The local TE link termination point identifier.";
}
leaf remote-te-node-id {
type te-types:te-node-id;
default "0.0.0.0";
description
"Remote TE node identifier.";
}
uses te-types:te-topology-identifier {
description
"The topology identifier where the hierarchical link
supported by this TE tunnel is instantiated.";
}
}
}
}
grouping tunnel-properties {
description
"Top level grouping for tunnel properties.";
leaf name {
type string;
description
"TE tunnel name.";
}
leaf alias {
type string;
description
"An alternate name of the TE tunnel that can be modified
anytime during its lifetime.";
}
leaf identifier {
type uint32;
description
"TE tunnel Identifier.";
reference
"RFC3209";
}
leaf color {
type uint32;
description "The color associated with the TE tunnel.";
reference "RFC9012";
}
leaf description {
type string;
default "None";
description
"Textual description for this TE tunnel.";
}
leaf admin-state {
type identityref {
base te-types:tunnel-admin-state-type;
}
default "te-types:tunnel-admin-state-up";
description
"TE tunnel administrative state.";
}
leaf operational-state {
type identityref {
base te-types:tunnel-state-type;
}
config false;
description
"TE tunnel operational state.";
}
uses encoding-and-switching-type;
uses tunnel-common-attributes;
container controller {
description
"Contains tunnel data relevant to external controller(s).
This target node may be augmented by external module(s),
for example, to add data for PCEP initiated and/or
delegated tunnels.";
leaf protocol-origin {
type identityref {
base protocol-origin-type;
}
description
"The protocol origin for instantiating the tunnel.";
}
leaf controller-entity-id {
type string;
description
"An identifier unique within the scope of visibility that
associated with the entity that controls the tunnel";
reference "RFC8232";
}
}
leaf reoptimize-timer {
type uint16;
units "seconds";
description
"Frequency of reoptimization of a traffic engineered LSP.";
}
uses tunnel-associations-properties;
uses protection-restoration-properties;
uses te-types:tunnel-constraints;
uses tunnel-hierarchy-properties;
container primary-paths {
description
"The set of primary paths.";
list primary-path {
key "name";
description
"List of primary paths for this tunnel.";
uses primary-path;
container primary-reverse-path {
description
"The reverse primary path properties.";
uses primary-reverse-path;
container candidate-secondary-reverse-paths {
description
"The set of referenced candidate reverse secondary
paths from the full set of secondary reverse paths
which may be used for this primary path.";
list candidate-secondary-reverse-path {
key "secondary-path";
ordered-by user;
description
"List of candidate secondary reverse path(s)";
leaf secondary-path {
type leafref {
path "../../../../../../"
+ "te:secondary-reverse-paths/"
+ "te:secondary-reverse-path/te:name";
}
description
"A reference to the secondary reverse path that
should be utilised when the containing primary
reverse path option is in use.";
}
}
}
}
container candidate-secondary-paths {
description
"The set of candidate secondary paths which may be used
for this primary path. When secondary paths are
specified in the list the path of the secondary LSP in
use must be restricted to those path options referenced.
The priority of the secondary paths is specified within
the list. Higher priority values are less preferred -
that is to say that a path with priority 0 is the most
preferred path. In the case that the list is empty, any
secondary path option may be utilised when the current
primary path is in use.";
list candidate-secondary-path {
key "secondary-path";
ordered-by user;
description
"List of candidate secondary paths for this tunnel.";
leaf secondary-path {
type leafref {
path "../../../../../te:secondary-paths/"
+ "te:secondary-path/te:name";
}
description
"A reference to the secondary path that should be
utilised when the containing primary path option is
in use.";
}
leaf active {
type boolean;
config false;
description
"Indicates the current active path option that has
been selected of the candidate secondary paths.";
}
}
}
}
}
container secondary-paths {
description
"The set of secondary paths.";
list secondary-path {
key "name";
description
"List of secondary paths for this tunnel.";
uses secondary-path;
}
}
container secondary-reverse-paths {
description
"The set of secondary reverse paths.";
list secondary-reverse-path {
key "name";
description
"List of secondary paths for this tunnel.";
uses secondary-reverse-path;
}
}
}
grouping tunnel-actions {
description
"Tunnel actions.";
action tunnel-action {
description
"Tunnel action.";
input {
leaf action-type {
type identityref {
base tunnel-actions-type;
}
description
"Tunnel action type.";
}
}
output {
leaf action-result {
type identityref {
base te-types:te-action-result;
}
description
"The result of the tunnel action operation.";
}
}
}
}
grouping tunnel-protection-actions {
description
"Protection external command actions.";
action protection-external-commands {
input {
leaf protection-external-command {
type identityref {
base te-types:protection-external-commands;
}
description
"Protection external command.";
}
leaf protection-group-ingress-node-id {
type te-types:te-node-id;
description
"When specified, indicates whether the action is
applied on ingress node.
By default, if neither ingress nor egress node-id
is set, the action applies to ingress node only.";
}
leaf protection-group-egress-node-id {
type te-types:te-node-id;
description
"When specified, indicates whether the action is
applied on egress node.
By default, if neither ingress nor egress node-id
is set, the action applies to ingress node only.";
}
leaf path-ref {
type path-ref;
description
"Indicates to which path the external command applies
to.";
}
leaf traffic-type {
type enumeration {
enum normal-traffic {
description
"The manual-switch or forced-switch command applies
to the normal traffic (this Tunnel).";
}
enum null-traffic {
description
"The manual-switch or forced-switch command applies
to the null traffic.";
}
enum extra-traffic {
description
"The manual-switch or forced-switch command applies
to the extra traffic (the extra-traffic Tunnel
sharing protection bandwidth with this Tunnel).";
}
}
description
"Indicates whether the manual-switch or forced-switch
commands applies to the normal traffic, the null traffic
or the extra-traffic.";
reference
"RFC4427";
}
leaf extra-traffic-tunnel-ref {
type tunnel-ref;
description
"In case there are multiple extra-traffic tunnels sharing
protection bandwidth with this Tunnel (m:n protection),
represents which extra-traffic Tunnel the manual-switch
or forced-switch to extra-traffic command applies to.";
}
}
}
}
/*** End of TE tunnel groupings ***/
/**
* LSP related generic groupings
*/
grouping lsp-record-route-information-state {
description
"LSP Recorded route information grouping.";
container lsp-record-route-information {
description
"RSVP recorded route object information.";
list lsp-record-route-information {
when "../../origin-type = 'ingress'" {
description
"Applicable on ingress LSPs only.";
}
key "index";
description
"Record route list entry.";
uses te-types:record-route-state;
}
}
}
grouping lsps-grouping {
description
"LSPs state operational data grouping.";
container lsps {
config false;
description
"TE LSPs state container.";
list lsp {
key "tunnel-name lsp-id node";
unique "source destination tunnel-id lsp-id "
+ "extended-tunnel-id";
description
"List of LSPs associated with the tunnel.";
leaf tunnel-name {
type string;
description "The TE tunnel name.";
}
leaf lsp-id {
type uint16;
description
"Identifier used in the SENDER_TEMPLATE and the
FILTER_SPEC that can be changed to allow a sender to
share resources with itself.";
reference
"RFC3209";
}
leaf node {
type te-types:te-node-id;
description
"The node where the TE LSP state resides on.";
}
uses lsp-properties-state;
uses lsp-record-route-information-state;
}
}
}
/*** End of TE LSP groupings ***/
/**
* TE global generic groupings
*/
/* Global named admin-groups configuration data */
grouping named-admin-groups-properties {
description
"Global named administrative groups configuration
grouping.";
leaf name {
type string;
description
"A string name that uniquely identifies a TE
interface named admin-group.";
}
leaf bit-position {
type uint32;
description
"Bit position representing the administrative group.";
reference
"RFC3209 and RFC7308";
}
}
grouping named-admin-groups {
description
"Global named administrative groups configuration
grouping.";
container named-admin-groups {
description
"TE named admin groups container.";
list named-admin-group {
if-feature "te-types:extended-admin-groups";
if-feature "te-types:named-extended-admin-groups";
key "name";
description
"List of named TE admin-groups.";
uses named-admin-groups-properties;
}
}
}
/* Global named admin-srlgs configuration data */
grouping named-srlgs {
description
"Global named SRLGs configuration grouping.";
container named-srlgs {
description
"TE named SRLGs container.";
list named-srlg {
if-feature "te-types:named-srlg-groups";
key "name";
description
"A list of named SRLG groups.";
leaf name {
type string;
description
"A string name that uniquely identifies a TE
interface named SRLG.";
}
leaf value {
type te-types:srlg;
description
"An SRLG value.";
}
leaf cost {
type uint32;
description
"SRLG associated cost. Used during path to append
the path cost when traversing a link with this SRLG.";
}
}
}
}
/* Global named paths constraints configuration data */
grouping path-constraints-common {
description
"Global named path constraints configuration
grouping.";
uses te-types:common-path-constraints-attributes {
description
"The constraints applicable to the path. This includes:
- The path bandwidth constraint
- The path link protection type constraint
- The path setup/hold priority constraint
- path signaling type constraint
- path metric bounds constraint. The unit of path metric
bound is interpreted in the context of the metric-type.
For example for metric-type 'path-metric-loss', the bound
is multiples of the basic unit 0.000003% as described
in RFC7471 for OSPF, and RFC8570 for ISIS.
- path affinity constraints
- path SRLG constraints";
}
uses te-types:generic-path-disjointness;
uses te-types:path-constraints-route-objects;
container path-in-segment {
presence "The end-to-end tunnel starts in a previous domain;
this tunnel is a segment in the current domain.";
description
"If an end-to-end tunnel crosses multiple domains using
the same technology, some additional constraints have to be
taken in consideration in each domain.
This TE tunnel segment is stitched to the upstream TE tunnel
segment.";
uses te-types:label-set-info;
}
container path-out-segment {
presence
"The end-to-end tunnel is not terminated in this domain;
this tunnel is a segment in the current domain.";
description
"If an end-to-end tunnel crosses multiple domains using
the same technology, some additional constraints have to be
taken in consideration in each domain.
This TE tunnel segment is stitched to the downstream TE
tunnel segment.";
uses te-types:label-set-info;
}
}
grouping named-path-constraints {
description
"Global named path constraints configuration
grouping.";
container named-path-constraints {
description
"TE named path constraints container.";
list named-path-constraint {
if-feature "te-types:named-path-constraints";
key "name";
leaf name {
type string;
description
"A string name that uniquely identifies a
path constraint set.";
}
uses path-constraints-common;
description
"A list of named path constraints.";
}
}
}
/* TE globals container data */
grouping globals-grouping {
description
"Globals TE system-wide configuration data grouping.";
container globals {
description
"Globals TE system-wide configuration data container.";
uses named-admin-groups;
uses named-srlgs;
uses named-path-constraints;
}
}
/* TE tunnels container data */
grouping tunnels-grouping {
description
"Tunnels TE configuration data grouping.";
container tunnels {
description
"Tunnels TE configuration data container.";
list tunnel {
key "name";
description
"The list of TE tunnels.";
uses tunnel-properties;
uses tunnel-actions;
uses tunnel-protection-actions;
}
}
}
/* TE LSPs ephemeral state container data */
grouping lsp-properties-state {
description
"LSPs state operational data grouping.";
leaf source {
type te-types:te-node-id;
description
"Tunnel sender address extracted from
SENDER_TEMPLATE object.";
reference
"RFC3209";
}
leaf destination {
type te-types:te-node-id;
description
"The tunnel endpoint address extracted from SESSION object.";
reference
"RFC3209";
}
leaf tunnel-id {
type uint16;
description
"The tunnel identifier used in the SESSION that remains
constant over the life of the tunnel.";
reference
"RFC3209";
}
leaf extended-tunnel-id {
type yang:dotted-quad;
description
"The LSP Extended Tunnel ID.";
reference
"RFC3209";
}
leaf operational-state {
type identityref {
base te-types:lsp-state-type;
}
description
"The LSP operational state.";
}
leaf signaling-type {
type identityref {
base te-types:path-signaling-type;
}
description
"The signaling protocol used to set up this LSP.";
}
leaf origin-type {
type enumeration {
enum ingress {
description
"Origin ingress.";
}
enum egress {
description
"Origin egress.";
}
enum transit {
description
"Origin transit.";
}
}
default "ingress";
description
"The origin of the LSP relative to the location of the local
switch in the path.";
}
leaf lsp-resource-status {
type enumeration {
enum primary {
description
"A primary LSP is a fully established LSP for which the
resource allocation has been committed at the data
plane.";
}
enum secondary {
description
"A secondary LSP is an LSP that has been provisioned
in the control plane only; e.g. resource allocation
has not been committed at the data plane.";
}
}
default "primary";
description
"LSP resource allocation state.";
reference
"RFC4872, section 4.2.1";
}
uses protection-restoration-properties-state;
}
/*** End of TE global groupings ***/
/**
* TE container
*/
container te {
presence "Enable TE feature.";
description
"TE global container.";
/* TE Global Data */
uses globals-grouping;
/* TE Tunnel Data */
uses tunnels-grouping;
/* TE LSPs Data */
uses lsps-grouping;
}
/* TE Tunnel RPCs/execution Data */
rpc tunnels-path-compute {
description
"TE tunnels RPC nodes.";
input {
container path-compute-info {
/*
* An external path compute module may augment this
* target.
*/
description
"RPC input information.";
}
}
output {
container path-compute-result {
/*
* An external path compute module may augment this
* target.
*/
description
"RPC output information.";
}
}
}
rpc tunnels-actions {
description
"TE tunnels actions RPC";
input {
container tunnel-info {
description
"TE tunnel information.";
choice filter-type {
mandatory true;
description
"Filter choice.";
case all-tunnels {
leaf all {
type empty;
mandatory true;
description
"Apply action on all TE tunnels.";
}
}
case one-tunnel {
leaf tunnel {
type tunnel-ref;
description
"Apply action on the specific TE tunnel.";
}
}
}
}
container action-info {
description
"TE tunnel action information.";
leaf action {
type identityref {
base tunnel-actions-type;
}
description
"The action type.";
}
leaf disruptive {
when "derived-from-or-self(../action, "
+ "'te:tunnel-action-reoptimize')";
type empty;
description
"Specifies whether or not the reoptimization action
is allowed to be disruptive.";
}
}
}
output {
leaf action-result {
type identityref {
base te-types:te-action-result;
}
description
"The result of the tunnel action operation.";
}
}
}
}
<CODE ENDS>