Common YANG Data Types for Traffic Engineering
Extracted elements (27)
The 'te-bandwidth' and 'te-label' groupings use a 'choice' with a 'generic' default case specifically to allow augmentation by technology-specific modules (e.g., WSON, OTN) without modifying the base module. This makes the common types module importable by any TE module regardless of data-plane technology.
The 'te-bandwidth' typedef uses a complex string pattern rather than a numeric type to support multiple encoding technologies in a single type field: IEEE 754 hex-float for packet (bytes/sec), integer ODU lists for OTN, and slot-number/width pairs for DWDM. This trades strict type safety for unified cross-technology representation in a single typedef.
Two separate modules are defined — 'ietf-te-types' (generic) and 'ietf-te-packet-types' (packet-specific) — so that non-packet TE technologies such as GMPLS optical can import only the generic module without pulling in Diffserv-TE or packet bandwidth constraint dependencies.
The 'admin-groups' typedef is a union of classic 'admin-group' (hex-string length 1..11, 32-bit per RFC 3630/5305) and 'extended-admin-group' (unbounded hex-string per RFC 7308), providing backward compatibility so modules consuming this type can handle both classic and extended administrative group encodings.
The 'ietf-te-types' module description states it fully conforms to the Network Management Datastore Architecture (NMDA) as defined in RFC 8342. Implementations and servers exposing data modeled using these types must support NMDA datastores.
The 'association-type' identity hierarchy defines LSP association types: recovery (RFC 4872/6780 for grouping LSPs of the same tunnel), resource-sharing for make-before-break (RFC 4873/6780), double-sided bidirectional (RFC 7551 with independent per-endpoint configuration), and single-sided bidirectional (RFC 6780/7551 with one endpoint dynamically created).
The 'ietf-te-packet-types' YANG module defines packet-technology-specific TE types including Diffserv-TE class types, bandwidth constraints (bc-type), bandwidth constraint models (MAM/RDM/MDRB per RFCs 4125, 4126, 4127), and packet-specific performance metrics.
The 'ietf-te-types' YANG module defines common TE types independent of any specific technology or control-plane instance, intended to be imported by other TE configuration and state modules. It contains typedefs, YANG identities, feature declarations, and groupings covering bandwidth, labels, metrics, protection, and recovery.
The 'lsp-encoding-types' identity hierarchy covers LSP encoding types per RFC 3471: packet, Ethernet, PDH, SDH/SONET, digital wrapper, lambda, fiber, FiberChannel, G.709 ODUk (RFC 4328), G.709 optical channel (RFC 4328), and line (8B/10B, RFC 6004).
The 'lsp-protection-type' identity hierarchy covers protection types from RFC 4872: unprotected, full rerouting (extra-traffic), rerouting without extra-traffic, 1:N with extra-traffic, 1:1, 1+1 unidirectional, 1+1 bidirectional, and extra-traffic (RFC 4427).
The 'objective-function-type' identity hierarchy defines path computation objective functions per RFC 5541: minimize cost path (OF), minimize load path, maximize residual bandwidth, minimize aggregate bandwidth consumption, minimize load on most-loaded link, and minimize cost path set.
The 'performance-metrics-one-way-delay-loss', 'performance-metrics-two-way-delay-loss', and 'performance-metrics-one-way-bandwidth' groupings define PM fields: one-way and two-way delay (uint32, range 0..16777215 microseconds), residual bandwidth, available bandwidth, and utilized bandwidth (IEEE 754 float32, bytes/sec) with anomaly normality indicators, per RFC 7471, RFC 8570, and RFC 7823.
The 'switching-capabilities' identity hierarchy defines interface switching types per RFC 3471: PSC-1 (packet), EVPL (Ethernet VPL per RFC 6004), L2SC (Layer-2), TDM, OTN-TDM, DCSC (data channel per RFC 6002), LSC (lambda), and FSC (fiber).
The 'te-bandwidth' grouping defines generic TE bandwidth via a 'technology' choice container that defaults to 'generic' (using the te-bandwidth string typedef) and is explicitly designed to be augmented for specific data-plane technologies such as OTN or DWDM without modifying the base module.
The 'te-common-status' typedef enumerates states shared by te-oper-status and te-admin-status: up, down, testing, preparing-maintenance (control-plane disabled for graceful shutdown per RFC 5817), maintenance (data-plane disabled), and unknown.
The 'te-label' grouping defines a generic TE label via a 'technology' choice defaulting to 'rt-types:generalized-label', plus a 'direction' leaf (forward/reverse, default forward). The structure can be augmented per data-plane technology.
The 'te-path-disjointness' typedef uses a YANG 'bits' type with bit positions 0 (node disjoint), 1 (link disjoint), and 2 (SRLG disjoint) to express resource disjointness options for a TE tunnel path, as defined in RFC 4872.
The 'te-topology-identifier' grouping contains three leaves for globally scoping a TE topology: provider-id (te-global-id, default 0), client-id (te-global-id, default 0), and topology-id (te-topology-id, default empty string), derived from RFC 6370 and RFC 5003.
Section 6 registers two YANG modules in the IANA 'YANG Module Names' registry: 'ietf-te-types' with namespace 'urn:ietf:params:xml:ns:yang:ietf-te-types' (prefix te-types) and 'ietf-te-packet-types' with namespace 'urn:ietf:params:xml:ns:yang:ietf-te-packet-types' (prefix te-packet-types), both with reference to RFC 8776.
The YANG modules in this document define only data types and groupings with no writable, readable, or RPC data nodes of their own; security risk arises only in modules that import these types. Implementations of importing modules must apply NETCONF/RESTCONF access control (RFC 8341) to prevent unauthorized read or modification of sensitive TE state and configuration.
The 'lsp-state-type' identity hierarchy defines full LSP lifecycle states: lsp-path-computing → lsp-path-computation-ok or lsp-path-computation-failed → lsp-state-setting-up → lsp-state-setup-ok or lsp-state-setup-failed → lsp-state-up → lsp-state-tearing-down → lsp-state-down.
The 'te-recovery-status' typedef enumerates recovery FSM states: normal, recovery-started, recovery-succeeded, recovery-failed, reversion-started, reversion-succeeded, reversion-failed, recovery-unavailable (lockout or protection span failure), recovery-admin (operator-commanded switch), and wait-to-restore (WTR timer active), per RFC 4427 and RFC 6378.
The 'admin-group' typedef uses 'yang:hex-string' with length constraint '1..11' (colon-separated hex octets, up to 4 octets / 32 bits) for administrative group / resource class / color; the most significant byte is leftmost and leading zero bytes may be omitted.
The 'srlg' typedef uses uint32 to represent a Shared Risk Link Group identifier as defined in RFC 4203 (OSPF GMPLS) and RFC 5307 (IS-IS GMPLS). The 'te-metric' and 'te-global-id' types are also uint32.
The 'te-bandwidth' typedef is a string encoding a comma-separated list of decimal, hex integer, or IEEE 754 hex-float values. For packet switching, units are bytes per second (e.g., '0x1p10'); for OTN, integer lists identify ODU types (e.g., '0,2,3,1'); for DWDM, pairs encode frequency slot number and slot width (e.g., '0,2,3,3'). Canonical form is lowercase hex with '0x' prefix.
The 'te-node-id' typedef encodes a TE topology node identifier as 'yang:dotted-quad' (4 octets, dotted-quad notation). It MAY be mapped to the OSPF Router Address TLV (RFC 3630 §2.4.1), IS-IS TE Router ID TLV (RFC 5305 §4.3), IPv6 IS-IS TE Router ID TLV (RFC 6119 §3.2.1), or ASON TE Router ID (RFC 6827 §3).
The 'te-tp-id' typedef is a union of uint32 (unnumbered link endpoint) or 'inet:ip-address' (IPv4 or IPv6 address), mapped to local or remote link identifiers per RFC 3630 and RFC 5305.