blob: 2e763809400e8d0317b98fa7c9d1308086adb7ae [file] [log] [blame]
module ietf-te-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-te-types";
/* Replace with IANA when assigned */
prefix "te-types";
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix "yang";
}
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>
WG Chair: Lou Berger
<mailto:lberger@labn.net>
WG Chair: Vishnu Pavan Beeram
<mailto:vbeeram@juniper.net>
Editor: Tarek Saad
<mailto:tsaad@cisco.com>
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@ericsson.com>
Editor: Xia Chen
<mailto:jescia.chenxia@huawei.com>
Editor: Raqib Jones
<mailto:raqib@Brocade.com>
Editor: Bin Wen
<mailto:Bin_Wen@cable.comcast.com>";
description
"This module contains a collection of generally
useful TE specific YANG data type defintions.";
revision "2016-07-05" {
description "Latest revision of TE basic types";
reference "RFC3209";
}
/*
* Identities
*/
identity tunnel-type {
description
"Base identity from which specific tunnel types are
derived.";
}
identity tunnel-p2p {
base tunnel-type;
description
"TE point-to-point tunnel type.";
}
identity tunnel-p2mp {
base tunnel-type;
description
"TE point-to-multipoint tunnel type.";
}
identity state-type {
description
"Base identity for TE states";
}
identity state-up {
base state-type;
description
"State up";
}
identity state-down {
base state-type;
description
"State down";
}
identity path-invalidation-action-type {
description
"Base identity for TE path invalidation action types";
}
identity tunnel-invalidation-action-drop-type {
base path-invalidation-action-type;
description
"TE path invalidation action drop";
}
identity tunnel-invalidation-action-drop-tear {
base path-invalidation-action-type;
description
"TE path invalidation action tear";
}
identity lsp-prot-type {
description
"Base identity from which LSP protection types are
derived.";
}
identity lsp-prot-unprotected {
base lsp-prot-type;
description
"LSP protection 'Unprotected'";
reference "RFC4872";
}
identity lsp-prot-reroute-extra {
base lsp-prot-type;
description
"LSP protection '(Full) Rerouting'";
reference "RFC4872";
}
identity lsp-prot-reroute {
base lsp-prot-type;
description
"LSP protection 'Rerouting without Extra-Traffic'";
reference "RFC4872";
}
identity lsp-prot-1-for-n {
base lsp-prot-type;
description
"LSP protection '1:N Protection with Extra-Traffic'";
reference "RFC4872";
}
identity lsp-prot-unidir-1-to-1 {
base lsp-prot-type;
description
"LSP protection '1+1 Unidirectional Protection'";
reference "RFC4872";
}
identity lsp-prot-bidir-1-to-1 {
base lsp-prot-type;
description
"LSP protection '1+1 Bidirectional Protection'";
reference "RFC4872";
}
identity switching-capabilities {
description
"Base identity for interface switching capabilities";
}
identity switching-psc1 {
base switching-capabilities;
description
"Packet-Switch Capable-1 (PSC-1)";
}
identity switching-evpl {
base switching-capabilities;
description
"Ethernet Virtual Private Line (EVPL)";
}
identity switching-l2sc {
base switching-capabilities;
description
"Layer-2 Switch Capable (L2SC)";
}
identity switching-tdm {
base switching-capabilities;
description
"Time-Division-Multiplex Capable (TDM)";
}
identity switching-otn {
base switching-capabilities;
description
"OTN-TDM capable";
}
identity switching-dcsc {
base switching-capabilities;
description
"Data Channel Switching Capable (DCSC)";
}
identity switching-lsc {
base switching-capabilities;
description
"Lambda-Switch Capable (LSC)";
}
identity switching-fsc {
base switching-capabilities;
description
"Fiber-Switch Capable (FSC)";
}
identity lsp-encoding-types {
description
"Base identity for encoding types";
}
identity lsp-encoding-packet {
base lsp-encoding-types;
description
"Packet LSP encoding";
}
identity lsp-encoding-ethernet {
base lsp-encoding-types;
description
"Ethernet LSP encoding";
}
identity lsp-encoding-pdh {
base lsp-encoding-types;
description
"ANSI/ETSI LSP encoding";
}
identity lsp-encoding-sdh {
base lsp-encoding-types;
description
"SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding";
}
identity lsp-encoding-digital-wrapper {
base lsp-encoding-types;
description
"Digital Wrapper LSP encoding";
}
identity lsp-encoding-lambda {
base lsp-encoding-types;
description
"Lambda (photonic) LSP encoding";
}
identity lsp-encoding-fiber {
base lsp-encoding-types;
description
"Fiber LSP encoding";
}
identity lsp-encoding-fiber-channel {
base lsp-encoding-types;
description
"FiberChannel LSP encoding";
}
identity lsp-encoding-oduk {
base lsp-encoding-types;
description
"G.709 ODUk (Digital Path)LSP encoding";
}
identity lsp-encoding-optical-channel {
base lsp-encoding-types;
description
"Line (e.g., 8B/10B) LSP encoding";
}
identity lsp-encoding-line {
base lsp-encoding-types;
description
"Line (e.g., 8B/10B) LSP encoding";
}
identity path-signaling-type {
description
"Base identity from which specific path signaling
types are derived.";
}
identity path-signaling-rsvpte {
base tunnel-type;
description
"RSVP-TE path signaling type";
}
identity path-signaling-sr {
base tunnel-type;
description
"Segment-routing path signaling type";
}
/* TE basic features */
feature p2mp-te {
description
"Indicates support for P2MP-TE";
}
feature frr-te {
description
"Indicates support for TE FastReroute (FRR)";
}
feature extended-admin-groups {
description
"Indicates support for TE link extended admin
groups.";
}
feature named-path-affinities {
description
"Indicates support for named path affinities";
}
feature named-extended-admin-groups {
description
"Indicates support for named extended admin groups";
}
feature named-srlg-groups {
description
"Indicates support for named SRLG groups";
}
feature named-path-constraints {
description
"Indicates support for named path constraints";
}
grouping explicit-route-subobject {
description
"The explicit route subobject grouping";
choice type {
description
"The explicit route subobject type";
case ipv4-address {
description
"IPv4 address explicit route subobject";
leaf v4-address {
type inet:ipv4-address;
description
"An IPv4 address. This address is
treated as a prefix based on the
prefix length value below. Bits beyond
the prefix are ignored on receipt and
SHOULD be set to zero on transmission.";
}
leaf v4-prefix-length {
type uint8;
description
"Length in bits of the IPv4 prefix";
}
leaf v4-loose {
type boolean;
description
"Describes whether the object is loose
if set, or otherwise strict";
}
}
case ipv6-address {
description
"IPv6 address Explicit Route Object";
leaf v6-address {
type inet:ipv6-address;
description
"An IPv6 address. This address is
treated as a prefix based on the
prefix length value below. Bits
beyond the prefix are ignored on
receipt and SHOULD be set to zero
on transmission.";
}
leaf v6-prefix-length {
type uint8;
description
"Length in bits of the IPv4 prefix";
}
leaf v6-loose {
type boolean;
description
"Describes whether the object is loose
if set, or otherwise strict";
}
}
case as-number {
leaf as-number {
type uint16;
description "AS number";
}
description
"Autonomous System explicit route subobject";
}
case unnumbered-link {
leaf router-id {
type inet:ip-address;
description
"A router-id address";
}
leaf interface-id {
type uint32;
description "The interface identifier";
}
description
"Unnumbered link explicit route subobject";
reference
"RFC3477: Signalling Unnumbered Links in
RSVP-TE";
}
case label {
leaf value {
type uint32;
description "the label value";
}
description
"The Label ERO subobject";
}
/* AS domain sequence..? */
}
}
grouping record-route-subobject {
description
"The record route subobject grouping";
choice type {
description
"The record route subobject type";
case ipv4-address {
leaf v4-address {
type inet:ipv4-address;
description
"An IPv4 address. This address is
treated as a prefix based on the prefix
length value below. Bits beyond the
prefix are ignored on receipt and
SHOULD be set to zero on transmission.";
}
leaf v4-prefix-length {
type uint8;
description
"Length in bits of the IPv4 prefix";
}
leaf v4-flags {
type uint8;
description
"IPv4 address sub-object flags";
reference "RFC3209";
}
}
case ipv6-address {
leaf v6-address {
type inet:ipv6-address;
description
"An IPv6 address. This address is
treated as a prefix based on the
prefix length value below. Bits
beyond the prefix are ignored on
receipt and SHOULD be set to zero
on transmission.";
}
leaf v6-prefix-length {
type uint8;
description
"Length in bits of the IPv4 prefix";
}
leaf v6-flags {
type uint8;
description
"IPv6 address sub-object flags";
reference "RFC3209";
}
}
case unnumbered-link {
leaf router-id {
type inet:ip-address;
description
"A router-id address";
}
leaf interface-id {
type uint32;
description "The interface identifier";
}
description
"Unnumbered link record route subobject";
reference
"RFC3477: Signalling Unnumbered Links in
RSVP-TE";
}
case label {
leaf value {
type uint32;
description "the label value";
}
leaf flags {
type uint8;
description
"Label sub-object flags";
reference "RFC3209";
}
description
"The Label ERO subobject";
}
}
}
identity route-usage-type {
description
"Base identity for route usage";
}
identity route-include-ero {
base route-usage-type;
description
"Include ERO from route";
}
identity route-exclude-ero {
base route-usage-type;
description
"Exclude ERO from route";
}
identity route-exclude-srlg {
base route-usage-type;
description
"Exclude SRLG from route";
}
identity path-metric-type {
description
"Base identity for path metric type";
}
identity path-metric-te {
base path-metric-type;
description
"TE path metric";
}
identity path-metric-igp {
base path-metric-type;
description
"IGP path metric";
}
identity path-tiebreaker-type {
description
"Base identity for path tie-breaker type";
}
identity path-tiebreaker-minfill {
base path-tiebreaker-type;
description
"Min-Fill LSP path placement";
}
identity path-tiebreaker-maxfill {
base path-tiebreaker-type;
description
"Max-Fill LSP path placement";
}
identity path-tiebreaker-randoom {
base path-tiebreaker-type;
description
"Random LSP path placement";
}
identity bidir-provisioning-mode {
description
"Base identity for bidirectional provisioning
mode.";
}
identity bidir-provisioning-single-sided {
base bidir-provisioning-mode;
description
"Single-sided bidirectional provioning mode";
}
identity bidir-provisioning-double-sided {
base bidir-provisioning-mode;
description
"Double-sided bidirectional provioning mode";
}
identity bidir-association-type {
description
"Base identity for bidirectional association type";
}
identity bidir-assoc-corouted {
base bidir-association-type;
description
"Co-routed bidirectional association type";
}
identity bidir-assoc-non-corouted {
base bidir-association-type;
description
"Non co-routed bidirectional association type";
}
identity resource-affinities-type {
description
"Base identity for resource affinities";
}
identity resource-aff-include-all {
base resource-affinities-type;
description
"The set of attribute filters associated with a
tunnel all of which must be present for a link
to be acceptable";
}
identity resource-aff-include-any {
base resource-affinities-type;
description
"The set of attribute filters associated with a
tunnel any of which must be present for a link
to be acceptable";
}
identity resource-aff-exclude-any {
base resource-affinities-type;
description
"The set of attribute filters associated with a
tunnel any of which renders a link unacceptable";
}
identity te-optimization-criterion {
description
"Base identity for TE optimization criterion.";
reference
"RFC3272: Overview and Principles of Internet Traffic
Engineering.";
}
identity not-optimized {
base te-optimization-criterion;
description "Optimization is not applied.";
}
identity cost {
base te-optimization-criterion;
description "Optimized on cost.";
}
identity delay {
base te-optimization-criterion;
description "Optimized on delay.";
}
/*
* Typedefs
*/
typedef performance-metric-normality {
type enumeration {
enum "unknown" {
value 0;
description
"Unknown.";
}
enum "normal" {
value 1;
description
"Normal.";
}
enum "abnormal" {
value 2;
description
"Abnormal. The anomalous bit is set.";
}
}
description
"Indicates whether a performance metric is normal, abnormal, or
unknown.";
reference
"RFC7471: OSPF Traffic Engineering (TE) Metric Extensions.
RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.
RFC7823: Performance-Based Path Selection for Explicitly
Routed Label Switched Paths (LSPs) Using TE Metric
Extensions";
}
typedef te-admin-status {
type enumeration {
enum up {
description
"Enabled.";
}
enum down {
description
"Disabled.";
}
enum testing {
description
"In some test mode.";
}
enum preparing-maintenance {
description
"Resource is disabled in the control plane to prepare for
graceful shutdown for maintenance purposes.";
reference
"RFC5817: Graceful Shutdown in MPLS and Generalized MPLS
Traffic Engineering Networks";
}
enum maintenance {
description
"Resource is disabled in the data plane for maintenance
purposes.";
}
}
description
"Defines a type representing the administrative status of
a TE resource.";
}
typedef te-global-id {
type uint32;
description
"An identifier to uniquely identify an operator, which can be
either a provider or a client.
The definition of this type is taken from RFC6370 and RFC5003.
This attribute type is used solely to provide a globally
unique context for TE topologies.";
}
typedef te-link-access-type {
type enumeration {
enum point-to-point {
description
"The link is point-to-point.";
}
enum multi-access {
description
"The link is multi-access, including broacast and NBMA.";
}
}
description
"Defines a type representing the access type of a TE link.";
reference
"RFC3630: Traffic Engineering (TE) Extensions to OSPF
Version 2.";
}
typedef te-node-id {
type yang:dotted-quad;
description
"An identifier for a node in a topology.
The identifier is represented as 32-bit unsigned integer in
the dotted-quad notation.
This attribute is mapped to Router ID in
RFC3630, RFC5329, RFC5305, and RFC6119.";
}
typedef te-oper-status {
type enumeration {
enum up {
description
"Operational up.";
}
enum down {
description
"Operational down.";
}
enum testing {
description
"In some test mode.";
}
enum unknown {
description
"Status cannot be determined for some reason.";
}
enum preparing-maintenance {
description
"Resource is disabled in the control plane to prepare for
graceful shutdown for maintenance purposes.";
reference
"RFC5817: Graceful Shutdown in MPLS and Generalized MPLS
Traffic Engineering Networks";
}
enum maintenance {
description
"Resource is disabled in the data plane for maintenance
purposes.";
}
}
description
"Defines a type representing the operational status of
a TE resource.";
}
typedef te-recovery-status {
type enumeration {
enum normal {
description
"Both the recovery and working spans are fully
allocated and active, data traffic is being
transported over (or selected from) the working
span, and no trigger events are reported.";
}
enum recovery-started {
description
"The recovery action has been started, but not completed.";
}
enum recovery-succeeded {
description
"The recovery action has succeeded. The working span has
reported a failure/degrade condition and the user traffic
is being transported (or selected) on the recovery span.";
}
enum recovery-failed {
description
"The recovery action has failed.";
}
enum reversion-started {
description
"The reversion has started.";
}
enum reversion-failed {
description
"The reversion has failed.";
}
enum recovery-unavailable {
description
"The recovery is unavailable -- either as a result of an
operator Lockout command or a failure condition detected
on the recovery span.";
}
enum recovery-admin {
description
"The operator has issued a command switching the user
traffic to the recovery span.";
}
enum wait-to-restore {
description
"The recovery domain is recovering from a failuer/degrade
condition on the working span that is being controlled by
the Wait-to-Restore (WTR) timer.";
}
}
description
"Defines the status of a recovery action.";
reference
"RFC4427: Recovery (Protection and Restoration) Terminology
for Generalized Multi-Protocol Label Switching (GMPLS).
RFC6378: MPLS Transport Profile (MPLS-TP) Linear Protection";
}
typedef te-template-name {
type string {
pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*';
}
description
"A type for the name of a TE node template or TE link
template.";
}
typedef te-topology-event-type {
type enumeration {
enum "add" {
value 0;
description
"A TE node or te-link has been added.";
}
enum "remove" {
value 1;
description
"A TE node or te-link has been removed.";
}
enum "update" {
value 2;
description
"A TE node or te-link has been updated.";
}
}
description "TE Event type for notifications";
} // te-topology-event-type
typedef te-tunnel-event-type {
type enumeration {
enum "add" {
value 0;
description
"A TE tunnel has been added.";
}
enum "remove" {
value 1;
description
"A TE tunnel has been removed.";
}
enum "update" {
value 2;
description
"A TE tunnel has been updated.";
}
}
description "TE Event type for notifications";
} // te-tunnel-event-type
typedef te-topology-id {
type string {
pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*';
}
description
"An identifier for a topology.";
}
typedef te-tp-id {
type union {
type uint32; // Unnumbered
type inet:ip-address; // IPv4 or IPv6 address
}
description
"An identifier for a TE link endpoint on a node.
This attribute is mapped to local or remote link identifier in
RFC3630 and RFC5305.";
}
typedef generalized-label {
type binary;
description
"Generalized label. Nodes sending and receiving the
Generalized Label know what kinds of link they are
using, the Generalized Label does not identify its
type. Instead, nodes are expected to know from the
context what type of label to expect.";
reference "rfc3471: section 3.2";
}
typedef admin-group {
type binary {
length 32;
}
description
"Administrative group/Resource class/Color.";
}
typedef extended-admin-group {
type binary;
description
"Extended administrative group/Resource class/Color.";
}
typedef admin-groups {
type union {
type admin-group;
type extended-admin-group;
}
description "TE administrative group derived type";
}
typedef srlg {
type uint32;
description "SRLG type";
}
identity path-computation-srlg-type {
description
"Base identity for SRLG path computation";
}
identity srlg-ignore {
base path-computation-srlg-type;
description
"Ignores SRLGs in path computation";
}
identity srlg-strict {
base path-computation-srlg-type;
description
"Include strict SRLG check in path computation";
}
identity srlg-preferred {
base path-computation-srlg-type;
description
"Include preferred SRLG check in path computation";
}
identity srlg-weighted {
base path-computation-srlg-type;
description
"Include weighted SRLG check in path computation";
}
typedef te-metric {
type uint32;
description
"TE link metric";
}
/**
* TE tunnel generic groupings
**/
/* Tunnel path selection parameters */
grouping tunnel-path-selection {
description
"Tunnel path selection properties grouping";
container path-selection {
description
"Tunnel path selection properties container";
leaf topology-id {
type te-types:te-topology-id;
description
"The tunnel path is computed using the specific
topology identified by this identifier";
}
leaf cost-limit {
type uint32 {
range "1..4294967295";
}
description
"The tunnel path cost limit.";
}
leaf hop-limit {
type uint8 {
range "1..255";
}
description
"The tunnel path hop limit.";
}
leaf metric-type {
type identityref {
base path-metric-type;
}
default path-metric-te;
description
"The tunnel path metric type.";
}
leaf tiebreaker-type {
type identityref {
base path-tiebreaker-type;
}
default path-tiebreaker-maxfill;
description
"The tunnel path computation tie breakers.";
}
leaf ignore-overload {
type boolean;
description
"The tunnel path can traverse overloaded node.";
}
uses tunnel-path-affinities;
uses tunnel-path-srlgs;
}
}
grouping tunnel-path-affinities {
description
"Path affinities grouping";
container tunnel-path-affinities {
if-feature named-path-affinities;
description
"Path affinities container";
choice style {
description
"Path affinities representation style";
case values {
leaf value {
type uint32 {
range "0..4294967295";
}
description
"Affinity value";
}
leaf mask {
type uint32 {
range "0..4294967295";
}
description
"Affinity mask";
}
}
case named {
list constraints {
key "usage";
leaf usage {
type identityref {
base resource-affinities-type;
}
description "Affinities usage";
}
container constraint {
description
"Container for named affinities";
list affinity-names {
key "name";
leaf name {
type string;
description
"Affinity name";
}
description
"List of named affinities";
}
}
description
"List of named affinity constraints";
}
}
}
}
}
grouping tunnel-path-srlgs {
description
"Path SRLG properties grouping";
container tunnel-path-srlgs {
description
"Path SRLG properties container";
choice style {
description
"Type of SRLG representation";
case values {
leaf usage {
type identityref {
base route-exclude-srlg;
}
description "SRLG usage";
}
leaf-list values {
type te-types:srlg;
description "SRLG value";
}
}
case named {
list constraints {
key "usage";
leaf usage {
type identityref {
base route-exclude-srlg;
}
description "SRLG usage";
}
container constraint {
description
"Container for named SRLG list";
list srlg-names {
key "name";
leaf name {
type string;
description
"The SRLG name";
}
description
"List named SRLGs";
}
}
description
"List of named SRLG constraints";
}
}
}
}
}
grouping tunnel-bidir-assoc-properties {
description
"TE tunnel associated bidirectional properties
grouping";
container bidirectional {
description
"TE tunnel associated bidirectional attributes.";
container association {
description
"Tunnel bidirectional association properties";
leaf id {
type uint16;
description
"The TE tunnel association identifier.";
}
leaf source {
type inet:ip-address;
description
"The TE tunnel association source.";
}
leaf global-source {
type inet:ip-address;
description
"The TE tunnel association global
source.";
}
leaf type {
type identityref {
base bidir-association-type;
}
default bidir-assoc-non-corouted;
description
"The TE tunnel association type.";
}
leaf provisioing {
type identityref {
base bidir-provisioning-mode;
}
description
"Describes the provisioning model of the
associated bidirectional LSP";
reference
"draft-ietf-teas-mpls-tp-rsvpte-ext-
associated-lsp, section-3.2";
}
}
}
}
/*** End of TE tunnel groupings ***/
/**
* TE interface generic groupings
**/
}