module ietf-te-service-mapping-types {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-te-service-mapping-types";
prefix tsm-types;
/* Import inet-types */
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
/* Import inet-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) 2020 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.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision 2020-11-02 {
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 template {
base map-type;
description
"The VPN service selects an TE mapping template with path
constraints and optimization criteria";
}
/*
* 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 inet:uri;
description
"Identifier for a TE mapping template. The precise
structure of the te-mapping-template-id will be up
to the implementation. The identifier SHOULD be
chosen such that the same template will always be
identified through the same identifier, even if the
data model is instantiated in separate datastores.";
}
/*
* Groupings
*/
grouping te-ref {
description
"The reference to TE.";
choice te {
description
"The TE";
case vn {
leaf-list vn-list {
type leafref {
path "/vn:vn/vn:vn-list/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";
reference
"RFC 8795: YANG Data Model for Traffic Engineering (TE)
Topologies";
}
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-list {
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";
}
}
}
case te-mapping-template {
if-feature "template";
leaf te-mapping-template-ref {
type leafref {
path "/tsm-types:te-mapping-templates/"
+ "tsm-types:te-mapping-template/tsm-types: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
"The TE";
case vn {
leaf-list ap-list {
type leafref {
path "/vn:ap/vn:access-point-list/vn:access-point-id";
}
description
"The reference to VN AP";
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-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";
}
leaf availability-type {
type identityref {
base availability-type;
}
description
"Availability Requirement for the Service";
}
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(.,'template')" {
error-message "The map-type must be other than "
+ "TE mapping template";
}
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.";
}
}
}