module ietf-te-service-mapping-types {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-te-service-mapping-types";
prefix tsmt;
/* Import te-types */
import ietf-te-types {
prefix te-types;
reference
"RFC 8776: Common YANG Data Types for Traffic Engineering";
}
/* Import network model */
import ietf-network {
prefix nw;
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
/* Import TE model */
import ietf-te {
prefix te;
reference
"I-D.ietf-teas-yang-te: A YANG Data Model for Traffic
Engineering Tunnels and Interfaces";
}
/* Import VN model */
import ietf-vn {
prefix vn;
reference
"I-D.ietf-teas-actn-vn-yang: A Yang Data Model for VN Operation";
}
/* Import Routing */
import ietf-routing {
prefix rt;
reference
"RFC 8349: A YANG Data Model for Routing Management";
}
/* Import SR Policy */
import ietf-sr-policy {
prefix sr-policy;
reference
"I-D.ietf-spring-sr-policy-yang: YANG Data Model for Segment
Routing Policy";
}
organization
"IETF Traffic Engineering Architecture and Signaling (TEAS)
Working Group";
contact
"WG Web:
WG List:
Editor: Young Lee
Editor: Dhruv Dhody
Editor: Qin Wu
";
description
"This module contains a YANG module for TE & Service mapping
parameters and policies as a common grouping applicable to
variuous service models (e.g., L1CSM, L2SM, L3SM, etc.)
Copyright (c) 2021 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.";
revision 2021-08-28 {
description
"Initial revision.";
reference
"RFC XXXX: Traffic Engineering and Service Mapping Yang Model";
}
/*
* Features
*/
feature template {
description
"Support TE mapping templates.";
}
feature sr-policy {
description
"Support SR Policy.";
}
/*
* Identity for map-type
*/
identity map-type {
description
"Base identity from which specific map types are derived.";
}
identity new {
base map-type;
description
"The new VN/tunnels are binded to the service.";
}
identity hard-isolation {
base new;
description
"Hard isolation.";
}
identity detnet-hard-isolation {
base hard-isolation;
description
"Hard isolation with deterministic characteristics.";
}
identity soft-isolation {
base new;
description
"Soft-isolation.";
}
identity select {
base map-type;
description
"The VPN service selects an existing tunnel with no
modification.";
}
identity modify {
base map-type;
description
"The VPN service selects an existing tunnel and allows to modify
the properties of the tunnel (e.g., b/w)";
}
identity none {
base map-type;
description
"The VPN service is not mapped to any underlying TE";
}
/*
* Identity for availability-type
*/
identity availability-type {
description
"Base identity from which specific map types are derived.";
}
identity level-1 {
base availability-type;
description
"level 1: 99.9999%";
}
identity level-2 {
base availability-type;
description
"level 2: 99.999%";
}
identity level-3 {
base availability-type;
description
"level 3: 99.99%";
}
identity level-4 {
base availability-type;
description
"level 4: 99.9%";
}
identity level-5 {
base availability-type;
description
"level 5: 99%";
}
/*
* Typedef
*/
typedef te-mapping-template-id {
type string;
description
"Identifier for a TE mapping template.";
}
/*
* Groupings
*/
grouping te-ref {
description
"The reference to TE.";
choice te {
description
"How the VPN is mapped to a VN, Topology, Tunnel, SR Policy
etc.";
case vn {
leaf-list vn {
type leafref {
path "/vn:virtual-network/vn:vn/vn:vn-id";
}
description
"The reference to VN";
reference
"RFC 8453: Framework for Abstraction and Control of TE
Networks (ACTN)";
}
}
case te-topo {
leaf vn-topology-id {
type te-types:te-topology-id;
description
"An identifier to the TE Topology Model where the abstract
nodes and links of the Topology can be found for Type 2
VNs as defined in RFC 8453";
reference
"RFC 8795: YANG Data Model for Traffic Engineering (TE)
Topologies
RFC 8453: Framework for Abstraction and Control of TE
Networks (ACTN)";
}
leaf abstract-node {
type leafref {
path "/nw:networks/nw:network/nw:node/nw:node-id";
}
description
"A reference to the abstract node in TE Topology";
reference
"RFC 8795: YANG Data Model for Traffic Engineering (TE)
Topologies";
}
}
case te-tunnel {
leaf-list te-tunnel {
type te:tunnel-ref;
description
"Reference to TE Tunnels";
reference
"I-D.ietf-teas-yang-te: A YANG Data Model for Traffic
Engineering Tunnels and Interfaces";
}
list sr-policy {
if-feature "sr-policy";
key "policy-color-ref policy-endpoint-ref";
description
"SR Policy";
leaf policy-color-ref {
type leafref {
path
"/rt:routing/sr-policy:segment-routing"
+ "/sr-policy:traffic-engineering/sr-policy:policies"
+ "/sr-policy:policy/sr-policy:color";
}
description
"Reference to sr-policy color";
}
leaf policy-endpoint-ref {
type leafref {
path
"/rt:routing/sr-policy:segment-routing"
+ "/sr-policy:traffic-engineering/sr-policy:policies"
+ "/sr-policy:policy/sr-policy:endpoint";
}
description
"Reference to sr-policy endpoint";
}
}
}
}
leaf te-mapping-template-ref {
if-feature "template";
type leafref {
path "/tsmt:te-mapping-templates/"
+ "tsmt:te-mapping-template/tsmt:id";
}
description
"An identifier to the TE Mapping Template where the TE
constraints and optimization criteria are specified.";
}
}
//grouping
grouping te-endpoint-ref {
description
"The reference to TE endpoints.";
choice te {
description
"How the TE endpoint is defined by VN's AP or TE's LTP";
case vn {
leaf-list vn-ap {
type leafref {
path "/vn:access-point/vn:ap/vn:vn-ap/vn:vn-ap-id";
}
description
"The reference to VNAP";
reference
"RFC 8453: Framework for Abstraction and Control of TE
Networks (ACTN)";
}
}
case te {
leaf ltp {
type te-types:te-tp-id;
description
"Reference LTP in the TE-topology";
reference
"RFC 8795: YANG Data Model for Traffic Engineering (TE)
Topologies";
}
}
}
}
//grouping
grouping te-policy {
description
"Various underlying TE policy requirements";
leaf color {
type uint32;
description
"Maps to the underlying colored TE resources";
}
leaf protection-type {
type identityref {
base te-types:lsp-protection-type;
}
description
"Desired protection level for the underlying
TE resources";
}
leaf availability-type {
type identityref {
base availability-type;
}
description
"Availability Requirement for the Service";
}
}
//grouping
grouping te-mapping {
description
"Mapping between Services and TE";
container te-mapping {
description
"Mapping between Services and TE";
leaf map-type {
type identityref {
base map-type;
}
description
"Isolation Requirements, Tunnel Bind or
Tunnel Selection";
}
container te-policy {
uses te-policy;
description
"Desired Underlying TE Policy";
}
uses te-ref;
}
}
//grouping
container te-mapping-templates {
description
"The TE constraints and optimization criteria";
list te-mapping-template {
key "id";
leaf id {
type te-mapping-template-id;
description
"Identification of the Template to be used.";
}
leaf description {
type string;
description
"Description of the template.";
}
leaf map-type {
type identityref {
base map-type;
}
must "0 = derived-from-or-self(.,'none')" {
error-message "The map-type must be other than "
+ "none";
}
description
"Map type for the VN/Tunnel creation/
selection.";
}
uses te-types:generic-path-constraints;
uses te-types:generic-path-optimization;
description
"List for templates.";
}
}
}