<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="std" docName="draft-ietf-teas-te-service-mapping-yang-16" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.9.0 -->
  <!-- Generated by id2xml 1.5.0 on 2019-09-09T05:10:22Z -->
<front>
    <title abbrev="TE Service Mapping">Traffic Engineering (TE) and Service Mapping YANG Data Model</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-teas-te-service-mapping-yang-16"/>
    <author fullname="Young Lee" initials="Y." surname="Lee" role="editor">
      <organization>Samsung Electronics</organization>
      <address>
        <email>younglee.tx@gmail.com</email>
      </address>
    </author>
    <author fullname="Dhruv Dhody" initials="D." surname="Dhody" role="editor">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country>India</country>
        </postal>
        <email>dhruv.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Giuseppe Fioccola" initials="G." surname="Fioccola">
      <organization>Huawei</organization>
      <address>
        <email>giuseppe.fioccola@huawei.com</email>
      </address>
    </author>
    <author fullname="Qin Wu" initials="Q." surname="Wu" role="editor">
      <organization>Huawei</organization>
      <address>
        <email>bill.wu@huawei.com</email>
      </address>
    </author>
    <author fullname="Daniele Ceccarelli" initials="D." surname="Ceccarelli">
      <organization>Cisco</organization>
      <address>
        <postal>
          <street></street>
          <street></street>
        </postal>
        <email>daniele.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
      <organization>Nvidia</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <date year="2024"/>
    <workgroup>TEAS Working Group</workgroup>
    <abstract>
      <t>
   This document provides a YANG data model to map customer service
   models (e.g., L3VPN Service Delivery model) to Traffic Engineering (TE) models (e.g., the TE Tunnel or the Virtual Network (VN) model). These models are
   referred to as the TE Service Mapping Model and are applicable
   generically to the operator's need for seamless control and
   management of their VPN services with underlying TE support.</t>
      <t>The models are principally used for monitoring and diagnostics of
   the management systems to show how the service requests are mapped
   onto underlying network resources and TE models.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   Data models are a representation of objects that can be configured
   or monitored within a system. Within the IETF, YANG <xref target="RFC7950" format="default"/> is the
   language of choice for documenting data models, and YANG data models have
   been produced to allow the configuration or modeling of a variety of
   network devices, protocol instances, and network services. YANG data
   models have been classified in <xref target="RFC8199" format="default"/> and <xref target="RFC8309" format="default"/>.</t>
      <t>
   Framework for Abstraction and Control of Traffic-Engineered Networks
   (ACTN) <xref target="RFC8453" format="default"/> introduces an architecture to support virtual
   network services and connectivity services. <xref target="I-D.ietf-teas-actn-vn-yang" format="default"/> defines a
   YANG data model and describes how a customer or end-to-end orchestrator
   can request and/or instantiate a generic virtual network service.
   <xref target="I-D.ietf-teas-actn-yang" format="default"/> describes the way IETF YANG data models of different
   classifications can be applied to the ACTN interfaces. In
   particular, it describes how customer service models can be mapped
   into the CNC-MDSC Interface (CMI) of the ACTN architecture.</t>
      <t>
   The models presented in this document are also applicable to generic
   context <xref target="RFC8309" format="default"/> as part of Customer Service Model used between
   Service Orchestrator and Customer.</t>
      <t>
   <xref target="RFC8299" format="default"/> provides an L3VPN service delivery YANG data model for PE-based
   VPNs. The scope of that draft is limited to a set of domains under
   the control of the same network operator to deliver services requiring
   TE tunnels.</t>
      <t>
   <xref target="RFC8466" format="default"/> provides an L2VPN service delivery YANG data model for PE-based
   VPNs. The scope of that draft is limited to a set of domains under
   the control of the same network operator to deliver services requiring
   TE tunnels.</t>
      <t>
   <xref target="I-D.ietf-ccamp-l1csm-yang" format="default"/> provides a L1 connectivity service delivery YANG data model for
   PE-based VPNs. The scope of that draft is limited to a set of
   domains under the control of the same network operator to deliver
   services requiring TE tunnels.</t>
      <t>
   While the IP/MPLS Provisioning Network Controller (PNC) is
   responsible for provisioning the VPN service on the Provider Edge
   (PE) nodes, the Multi-Domain Service Coordinator (MDSC) can
   coordinate how to map the VPN services onto Traffic Engineering (TE)
   tunnels. This is consistent with the two of the core functions of
   the MDSC specified in <xref target="RFC8453" format="default"/>:</t>
      <ul spacing="normal">
        <li>Customer mapping/translation function: This function is to map
  customer requests/commands into network provisioning requests
        that can be sent to the PNC according to the business policies
        that have been provisioned statically or dynamically.
        Specifically, it provides mapping and translation of a
        customer's service request into a set of parameters that are
        specific to a network type and technology such that the network
        configuration process is made possible.
  </li>
        <li>Virtual service coordination function: This function translates
  customer service-related information into a virtual network
        service operations in order to seamlessly operate virtual
        networks while meeting a customer's service requirements. In
        the context of ACTN, service/virtual service coordination
        includes a number of service orchestration functions such as
        multi-destination load balancing, guarantees of service
        quality, bandwidth and throughput. It also includes
        notifications for service faults and performance degradation and
        so forth.
  </li>
      </ul>
      <t>
   <xref target="sect-2" format="default"/> describes a set of TE and service-related parameters that
   this document addresses "new and advanced parameters" that are not
   included in the service models. <xref target="sect-3" format="default"/> discusses the YANG
   modeling approach.</t>
      <section toc="default" numbered="true">
        <name>Purpose of TE Service Mapping for Service Model</name>
        <t>The TE service mapping for the LxSM supports:
        </t>
        <ul spacing="normal">
          <li>A mapping of the LxSM with the underlying TE resources. The TE resources could be in the form of VN, set of TE tunnels, TE abstract topology etc. This mapping can be populated by the network at the time of realization of the service. It is also possible to configure the mapping provided one is aware of VN/tunnels. This mapping model is used only when there is an awareness of VN or TE by the consumer of the model. Otherwise, this mapping information is internal and used for monitoring and diagnostics purposes such as telemetry, auto-scaling, and closed-loop automation.</li>
          <li>Possibility to request the creation of a new VN/Tunnel to be bound to LxSM .</li>
          <li>Indication to share the VN/Tunnel sharing (with or without modification) for the LxSM.</li>
          <li>Support for configuration of underlying TE properties (as opposed to existing VN or tunnels).</li>
          <li>Provide some additional service characteristics for the LxSM models.</li>
        </ul>
      </section>
      <section toc="default" numbered="true">
        <name>Purpose of TE Service Mapping for Network Model</name>
        <t>Apart from the service model, the TE mapping is equally applicable to the Network Models (L3 VPN Service Network Model (L3NM) <xref target="RFC9182" format="default"/>, L2 VPN Service Network Model (L2NM) <xref target="RFC9291" format="default"/> etc.). See <xref target="nw" format="default"/> for details.</t>
        <t>The TE service mapping for the LxNM supports:
        </t>
        <ul spacing="normal">
          <li>A mapping of the LxNM with the underlying TE resources. The TE resources could be in the form of VN, set of TE tunnels, TE abstract topology etc. This mapping can be populated by the network or configured. This mapping is useful to understand the TE realization of the LxVPN as well for monitoring/diagnostic purposes.</li>
          <li>Possibility to request the creation of a new VN/Tunnel to be bound to LxNM .</li>
          <li>Indication to share the VN/Tunnel sharing (with or without modification) for the LxNM.</li>
          <li>Support for configuration of underlying TE properties (as opposed to existing VN or tunnels).</li>
          <li>Provide some additional service characteristics for the LxNM models</li>
        </ul>
      </section>
      <section anchor="sect-1.1" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
   Refer to <xref target="RFC8453" format="default"/>, <xref target="RFC7926" format="default"/>, and <xref target="RFC8309" format="default"/> for the key terms used
   in this document.</t>
        <t>The terminology for describing YANG data models is found in
   <xref target="RFC7950" format="default"/>.</t>
        <!--<section title="Requirements Language"
               toc="default">
        <t>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 <xref target="RFC2119" /> <xref target="RFC8174"/> when, and only when, they
      appear in all capitals, as shown here.</t>
      </section>-->
<t>This document uses the term L3SM to refer to the L3VPN Service Delivery model specified in <xref target="RFC8299" format="default"/> and the term L2SM for Layer 2 Virtual Private Network (L2VPN) Service Delivery model specified in <xref target="RFC8466" format="default"/>. The term L3NM refers to the L3VPN network model specified in <xref target="RFC9182" format="default"/> and L2NM for the L2VPN network model specified in <xref target="RFC9291" format="default"/>.</t>
  </section>
      <section anchor="sect-1.2" numbered="true" toc="default">
        <name>Tree diagram</name>
        <t>
   A simplified graphical representation of the data model is used in
   <xref target="sect-6"/> of this this document.  The meaning of the symbols in
   these diagrams is defined in <xref target="RFC8340" format="default"/>.</t>
      </section>
      <section anchor="sect-1.3" numbered="true" toc="default">
        <name>Prefixes in Data Node Names</name>
        <t>
   In this document, the names of data nodes and other data model objects
   are prefixed using the standard prefix associated with the
   corresponding YANG imported modules, as shown in Table 1.</t>
        <table anchor="tab-prefixes-and-corresponding-yang-modules" align="center">
          <name>Prefixes and corresponding YANG modules</name>
          <thead>
            <tr>
              <th align="left"> Prefix</th>
              <th align="left"> YANG module</th>
              <th align="left"> Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">tsmt</td>
              <td align="left">ietf-te-service-mapping-types</td>
              <td align="left">[RFCXXXX]</td>
            </tr>
            <tr>
              <td align="left">l1csm</td>
              <td align="left">ietf-l1csm</td>
              <td align="left">
                <xref target="I-D.ietf-ccamp-l1csm-yang" format="default"/></td>
            </tr>
            <tr>
              <td align="left">l2vpn-svc</td>
              <td align="left">ietf-l2vpn-svc</td>
              <td align="left">
                <xref target="RFC8466" format="default"/></td>
            </tr>
            <tr>
              <td align="left">l3vpn-svc</td>
              <td align="left">ietf-l3vpn-svc</td>
              <td align="left">
                <xref target="RFC8299" format="default"/></td>
            </tr>
            <tr>
              <td align="left">l1-tsm</td>
              <td align="left">ietf-l1csm-te-service-mapping</td>
              <td align="left">[RFCXXXX]</td>
            </tr>
            <tr>
              <td align="left">l2-tsm</td>
              <td align="left">ietf-l2sm-te-service-mapping</td>
              <td align="left">[RFCXXXX]</td>
            </tr>
            <tr>
              <td align="left">l3-tsm</td>
              <td align="left">ietf-l3sm-te-service-mapping</td>
              <td align="left">[RFCXXXX]</td>
            </tr>
            <tr>
              <td align="left">vn</td>
              <td align="left">ietf-vn</td>
              <td align="left">
                <xref target="I-D.ietf-teas-actn-vn-yang" format="default"/></td>
            </tr>
            <tr>
              <td align="left">nw</td>
              <td align="left">ietf-network</td>
              <td align="left">
                <xref target="RFC8345" format="default"/></td>
            </tr>
            <tr>
              <td align="left">te-types</td>
              <td align="left">ietf-te-types</td>
              <td align="left">
                <xref target="RFC8776" format="default"/></td>
            </tr>
            <tr>
              <td align="left">te</td>
              <td align="left">ietf-te</td>
              <td align="left">
                <xref target="I-D.ietf-teas-yang-te" format="default"/></td>
            </tr>
            <tr>
              <td align="left">l2vpn-ntw</td>
              <td align="left">ietf-l2vpn-ntw</td>
              <td align="left">
                <xref target="RFC9291" format="default"/></td>
            </tr>
            <tr>
              <td align="left">l3vpn-ntw</td>
              <td align="left">ietf-l3vpn-ntw</td>
              <td align="left">
                <xref target="RFC9182" format="default"/></td>
            </tr>
            <tr>
              <td align="left">rt</td>
              <td align="left">ietf-routing</td>
              <td align="left">
                <xref target="RFC8349" format="default"/></td>
            </tr>
            <tr>
              <td align="left">sr-policy</td>
              <td align="left">ietf-sr-policy</td>
              <td align="left">
                <xref target="I-D.ietf-spring-sr-policy-yang" format="default"/></td>
            </tr>
          </tbody>
        </table>
        <t>
   Note: The RFC Editor should replace XXXX with the number assigned to
   the RFC once this draft becomes an RFC.</t>
      </section>
      <section anchor="sect-1-6" numbered="true" toc="default">
      <name>Refrences</name>
      <t>In the YANG modules specified in this document, the following additional documents are referenced -</t>
      <ul spacing="normal">
        <li><xref target="RFC8453"/>: Framework for Abstraction and Control of TE Networks (ACTN)</li>
        <li><xref target="RFC8795"/>: YANG Data Model for Traffic Engineering (TE) Topologies</li>
      </ul>
    </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>TE and Service Related Parameters</name>
      <t>
   While L1/L2/L3 service models (L1CSM, L2SM, L3SM) are intended to
   provide service-specific parameters for VPN service instances, there
   are a number of TE service-related parameters that are not
   included in these service models.</t>
      <t>
   Additional 'service parameters and policies' that are not included in
   the aforementioned service models are addressed in the YANG data models
   defined in this document.</t>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>VN/Tunnel Selection Requirements</name>
        <t>
   In some cases, the service requirements may need additional VN/TE tunnels
   to be established. This may occur when there are no suitable
   existing VN/TE tunnels that can support the service requirements, or
   when the operator would like to dynamically create and bind tunnels
   to the VPN such that they are not shared by other VPNs, for example,
   for network slicing. The establishment of TE tunnels is subject to
   the network operator's policies.</t>
        <t>To summarize, there are three modes of VN/Tunnel Selection
   operations to be supported as follows. Additional modes may be
   defined in the future.</t>
        <ul spacing="normal">
          <li>
            <t>New VN/Tunnel Binding - A customer could request a VPN
          service based on VN/Tunnels that are not shared with other
          existing or future services. This might be to meet the VPN
          isolation requirements. Further, the YANG data model described in
          <xref target="sect-4" format="default"/> of this document can be used to describe the
          mapping between the VPN service and the ACTN VN. The VN (and
          TE tunnels) could be bound to the VPN and not used for any
          other VPN. Under this mode, the following sub-categories can be
          supported:
            </t>
            <ol spacing="normal" type="1"><li>Traffic Isolation: A customer
            expects that the service
       traffic cannot be received by other customers in the
       same network.</li>

              <li>Interference Isolation: A customer expects that the
       service traffic is not impacted by the existence of
       other customers or services in the same network.</li>

       <li>A combination of both.</li>
            </ol>
          </li>
          <li>VN/Tunnel Sharing - A customer could request a VPN service
          where new tunnels (or a VN) do not need to be created for
          each VPN and can be shared across multiple VPNs. Further, the
          mapping YANG data model described in <xref target="sect-5" format="default"/> of this document
          can be used to describe the mapping between the VPN service
          and the tunnels in use. No modification of the properties of
          a tunnel (or VN) is allowed in this mode: an existing tunnel
          can only be selected.</li>
          <li>VN/Tunnel Modify - This mode allows the modification of the
          properties of the existing VN/tunnel (e.g., bandwidth).</li>
          <li>TE Mapping Template - This mode allows a VPN service to use a
     mapping template containing constraints and optimization criteria. This allows
     mapping with the underlay TE characteristics without first creating a VN or tunnels to map.
     The VPN service could be mapped to a template first.
     Once the VN/Tunnels are actually created/selected for the VPN service, the mapping based on the actual TE resources is created.</li>
        </ul>
      </section>
      <section anchor="Policy" numbered="true" toc="default">
        <name>TE Policy</name>
        <t>The service models could be associated with various policies related to mapping the underlying TE resources. The path-affinities could be used to map to the underlying colored TE resources. The desired protection and availability requirements could be specified. </t>
        <section anchor="sect-2.2" numbered="true" toc="default">
          <name>Availability Requirement</name>
          <t>
   Availability is another service requirement or intent that may
   influence the selection or provisioning of TE tunnels or a VN to
   support the requested service. Availability is a probabilistic
   measure of the length of time that a VPN/VN instance functions
   without a network failure.</t>
          <t>
   The availability level will need to be translated into the
   network-specific policies such as the protection/reroute policy associated
   with a VN or Tunnel. The means by which this is achieved is not in
   the scope of this document.</t>
        </section>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>YANG Data Modeling Approach</name>
      <t>
   This section provides how the TE and Service mapping parameters are
   supported using augmentation of the existing service models (i.e.,
   <xref target="I-D.ietf-ccamp-l1csm-yang" format="default"/>, <xref target="RFC8466" format="default"/>, and <xref target="RFC8299" format="default"/>).
   <xref target="augmented-lxsm-model" format="default"/> shows the scope of the
   Augmented LxSM Model.</t>
      <figure anchor="augmented-lxsm-model">
        <name>Augmented LxSM Model</name>
        <artset>
            <artwork type="svg" align="left">
            <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="208" width="560" viewBox="0 0 560 208" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
<path d="M 8,16 L 8,48" fill="none" stroke="black"/>
<path d="M 8,96 L 8,160" fill="none" stroke="black"/>
<path d="M 128,16 L 128,48" fill="none" stroke="black"/>
<path d="M 128,96 L 128,160" fill="none" stroke="black"/>
<path d="M 200,16 L 200,176" fill="none" stroke="black"/>
<path d="M 384,16 L 384,176" fill="none" stroke="black"/>
<path d="M 464,16 L 464,48" fill="none" stroke="black"/>
<path d="M 464,80 L 464,112" fill="none" stroke="black"/>
<path d="M 464,144 L 464,176" fill="none" stroke="black"/>
<path d="M 552,16 L 552,48" fill="none" stroke="black"/>
<path d="M 552,80 L 552,112" fill="none" stroke="black"/>
<path d="M 552,144 L 552,176" fill="none" stroke="black"/>
<path d="M 8,16 L 128,16" fill="none" stroke="black"/>
<path d="M 200,16 L 384,16" fill="none" stroke="black"/>
<path d="M 464,16 L 552,16" fill="none" stroke="black"/>
<path d="M 152,32 L 192,32" fill="none" stroke="black"/>
<path d="M 8,48 L 128,48" fill="none" stroke="black"/>
<path d="M 464,48 L 552,48" fill="none" stroke="black"/>
<path d="M 464,80 L 552,80" fill="none" stroke="black"/>
<path d="M 8,96 L 128,96" fill="none" stroke="black"/>
<path d="M 136,112 L 192,112" fill="none" stroke="black"/>
<path d="M 464,112 L 552,112" fill="none" stroke="black"/>
<path d="M 464,144 L 552,144" fill="none" stroke="black"/>
<path d="M 8,160 L 128,160" fill="none" stroke="black"/>
<path d="M 200,176 L 384,176" fill="none" stroke="black"/>
<path d="M 464,176 L 552,176" fill="none" stroke="black"/>
<polygon class="arrowhead" points="200,112 188,106.4 188,117.6" fill="black" transform="rotate(0,192,112)"/>
<circle cx="144" cy="32" r="6" class="opendot" fill="white" stroke="black"/>
<g class="text">
<text x="60" y="36">LxSM</text>
<text x="424" y="36">. . . .</text>
<text x="504" y="36">ACTN VN</text>
<text x="168" y="52">augment</text>
<text x="292" y="100">Augmented LxSM Model</text>
<text x="424" y="100">. . . .</text>
<text x="504" y="100">TE-topo</text>
<text x="68" y="116">TE &amp; Service</text>
<text x="72" y="132">Mapping Types</text>
<text x="164" y="132">import</text>
<text x="424" y="164">. . . .</text>
<text x="512" y="164">TE-tunnel</text>
<text x="424" y="196">reference</text>
</g>
</svg>
</artwork>
            <artwork type="ascii-art" align="left"><![CDATA[
+--------------+        +----------------------+         +----------+
|    LxSM      | o------|                      | . . . . | ACTN VN  |
+--------------+ augment|                      |         +----------+
                        |                      |
                        |                      |         +----------+
+--------------+        | Augmented LxSM Model | . . . . | TE-topo  |
| TE & Service |------->|                      |         +----------+
| Mapping Types| import |                      |
|              |        |                      |         +----------+
+--------------+        |                      | . . . . | TE-tunnel|
                        +----------------------+         +----------+
                                                reference
]]></artwork></artset>
      </figure>
      <t>
   The Augmented LxSM model (where x=1,2,3) augments the basic LxSM
   model while importing the common TE and Service-related parameters
   (defined in <xref target="sect-2" format="default"/>) grouping information from TE and Service
   Mapping Types. The TE and Service Mapping Types (ietf-te-service-
   mapping-types) module is the repository of all common groupings
   imported by each augmented LxSM model. Any future service models
   would import this mapping-type common model.</t>
      <t>The mapping could be made to any underlying TE resources such as VN, TE topology abstract node (and its connectivity matrix), set of TE tunnels etc. This flexibility from the modeling point of view allows for various use cases in both service and network models.</t>
      <t>
   The role of the augmented LxSM is to expose the
   mapping relationship between service models and TE models so that
   VN/VPN service instantiations provided by the underlying TE networks
   can be viewed outside of the MDSC, for example by an operator who is
   diagnosing the behaviour of the network. Note that this should be done
   only if the operator understands the VN/Tunnel resources and the MDSC is willing to share that
   information. It also allows for the
   customers to access operational state information about how their
   services are instantiated with the underlying VN, TE topology or TE
   tunnels. This mapping will facilitate a seamless service
   management operation with underlay-TE network visibility.</t>
      <t>
   As seen in <xref target="augmented-lxsm-model" format="default"/>, the augmented LxSM service model records a
   mapping between the customer service models and the ACTN VN YANG
   model. Thus, when the MDSC receives a service request it creates a
   VN that meets the customer's service objectives with various
   constraints via the TE-topology model <xref target="RFC8795" format="default"/>, and this relationship
   is recorded by the Augmented LxSM Model. The model also supports a
   mapping between a service model and TE-topology or a TE-tunnel.</t>
      <t>The YANG data models defined in this document
   conform to the Network Management Datastore Architecture (NMDA)
   <xref target="RFC8342" format="default"/>.</t>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>Forward Compatibility</name>
        <t>
   The YANG module defined in this document supports three existing
   service models via augmenting while sharing the common TE and Service
   Mapping Types.</t>
        <t>
   It is possible that new service models will be defined at some
   future time and that it will be desirable to map them to the underlying
   TE constructs in the same way as the three existing models are
   augmented.</t>
   <t><xref target="scope"/> highlights some features that are deemed out of the scope of this document.</t>

      </section>
      <section anchor="nw" numbered="true" toc="default">
        <name>TE and Network Models</name>
        <t>
   The L2/L3 network models (L2NM, L3NM) are intended to describe
      a VPN Service in the Service Provider Network.  It contains
      information of the Service Provider network and might include
      allocated resources.  It can be used by network controllers to
      manage and control the VPN Service configuration in the Service
      Provider network.</t>
        <t>Similar to the service model,  the existing network models (i.e.,
   <xref target="RFC9182" format="default"/>, and <xref target="RFC9291" format="default"/>)
   are augmented to include the TE and Service mapping parameters.
   <xref target="augmented-lxnm-model" format="default"/> shows the scope of the
   Augmented LxNM Model.</t>
        <figure anchor="augmented-lxnm-model">
          <name>Augmented LxNM Model</name>
          <artset>
            <artwork type="svg" align="left">
            <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="208" width="560" viewBox="0 0 560 208" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
<path d="M 8,16 L 8,48" fill="none" stroke="black"/>
<path d="M 8,96 L 8,160" fill="none" stroke="black"/>
<path d="M 128,16 L 128,48" fill="none" stroke="black"/>
<path d="M 128,96 L 128,160" fill="none" stroke="black"/>
<path d="M 200,16 L 200,176" fill="none" stroke="black"/>
<path d="M 384,16 L 384,176" fill="none" stroke="black"/>
<path d="M 464,16 L 464,48" fill="none" stroke="black"/>
<path d="M 464,80 L 464,112" fill="none" stroke="black"/>
<path d="M 464,144 L 464,176" fill="none" stroke="black"/>
<path d="M 552,16 L 552,48" fill="none" stroke="black"/>
<path d="M 552,80 L 552,112" fill="none" stroke="black"/>
<path d="M 552,144 L 552,176" fill="none" stroke="black"/>
<path d="M 8,16 L 128,16" fill="none" stroke="black"/>
<path d="M 200,16 L 384,16" fill="none" stroke="black"/>
<path d="M 464,16 L 552,16" fill="none" stroke="black"/>
<path d="M 152,32 L 192,32" fill="none" stroke="black"/>
<path d="M 8,48 L 128,48" fill="none" stroke="black"/>
<path d="M 464,48 L 552,48" fill="none" stroke="black"/>
<path d="M 464,80 L 552,80" fill="none" stroke="black"/>
<path d="M 8,96 L 128,96" fill="none" stroke="black"/>
<path d="M 136,112 L 192,112" fill="none" stroke="black"/>
<path d="M 464,112 L 552,112" fill="none" stroke="black"/>
<path d="M 464,144 L 552,144" fill="none" stroke="black"/>
<path d="M 8,160 L 128,160" fill="none" stroke="black"/>
<path d="M 200,176 L 384,176" fill="none" stroke="black"/>
<path d="M 464,176 L 552,176" fill="none" stroke="black"/>
<polygon class="arrowhead" points="200,112 188,106.4 188,117.6" fill="black" transform="rotate(0,192,112)"/>
<circle cx="144" cy="32" r="6" class="opendot" fill="white" stroke="black"/>
<g class="text">
<text x="60" y="36">LxNM</text>
<text x="424" y="36">. . . .</text>
<text x="504" y="36">ACTN VN</text>
<text x="168" y="52">augment</text>
<text x="292" y="100">Augmented LxNM Model</text>
<text x="424" y="100">. . . .</text>
<text x="504" y="100">TE-topo</text>
<text x="68" y="116">TE &amp; Service</text>
<text x="72" y="132">Mapping Types</text>
<text x="164" y="132">import</text>
<text x="424" y="164">. . . .</text>
<text x="512" y="164">TE-tunnel</text>
<text x="424" y="196">reference</text>
</g>
</svg>
            </artwork>
            <artwork type="ascii-art" align="left"><![CDATA[

          <artwork name="" type="" align="left" alt=""><![CDATA[
+--------------+        +----------------------+         +----------+
|    LxNM      | o------|                      | . . . . | ACTN VN  |
+--------------+ augment|                      |         +----------+
                        |                      |
                        |                      |         +----------+
+--------------+        | Augmented LxNM Model | . . . . | TE-topo  |
| TE & Service |------->|                      |         +----------+
| Mapping Types| import |                      |
|              |        |                      |         +----------+
+--------------+        |                      | . . . . | TE-tunnel|
                        +----------------------+         +----------+
                                                reference
]]></artwork></artset>
        </figure>
        <t>
   The Augmented LxNM model (where x=2,3) augments the basic LxNM
   model while importing the common TE mapping-related parameters
   (defined in <xref target="sect-2" format="default"/>) grouping information from TE and Service
   Mapping Types.
   The role of the augmented LxNM network model is to expose the
   mapping relationship between network models and TE models.</t>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>L3VPN Architecture in the ACTN Context</name>
      <t>
   <xref target="l3vpn-architecture-from-the-ipoptical-network-perspective" format="default"/> shows the architectural context of this document
   referencing the ACTN components and interfaces.</t>
      <figure anchor="l3vpn-architecture-from-the-ipoptical-network-perspective">
        <name>L3VPN Architecture from the IP+Optical Network Perspective</name>
                  <artset>
            <artwork type="svg" align="center">
            <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="784" width="464" viewBox="0 0 464 784" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
<path d="M 72,160 L 72,448" fill="none" stroke="black"/>
<path d="M 88,176 L 88,288" fill="none" stroke="black"/>
<path d="M 104,544 L 104,624" fill="none" stroke="black"/>
<path d="M 128,576 L 128,608" fill="none" stroke="black"/>
<path d="M 152,288 L 152,568" fill="none" stroke="black"/>
<path d="M 152,608 L 152,664" fill="none" stroke="black"/>
<path d="M 168,16 L 168,96" fill="none" stroke="black"/>
<path d="M 168,480 L 168,568" fill="none" stroke="black"/>
<path d="M 184,352 L 184,432" fill="none" stroke="black"/>
<path d="M 184,576 L 184,608" fill="none" stroke="black"/>
<path d="M 192,48 L 192,80" fill="none" stroke="black"/>
<path d="M 200,544 L 200,624" fill="none" stroke="black"/>
<path d="M 208,80 L 208,216" fill="none" stroke="black"/>
<path d="M 208,288 L 208,376" fill="none" stroke="black"/>
<path d="M 208,432 L 208,480" fill="none" stroke="black"/>
<path d="M 232,544 L 232,624" fill="none" stroke="black"/>
<path d="M 256,576 L 256,608" fill="none" stroke="black"/>
<path d="M 280,480 L 280,568" fill="none" stroke="black"/>
<path d="M 280,608 L 280,728" fill="none" stroke="black"/>
<path d="M 296,432 L 296,568" fill="none" stroke="black"/>
<path d="M 312,576 L 312,608" fill="none" stroke="black"/>
<path d="M 336,544 L 336,624" fill="none" stroke="black"/>
<path d="M 352,176 L 352,288" fill="none" stroke="black"/>
<path d="M 368,80 L 368,376" fill="none" stroke="black"/>
<path d="M 384,48 L 384,80" fill="none" stroke="black"/>
<path d="M 392,352 L 392,432" fill="none" stroke="black"/>
<path d="M 400,16 L 400,96" fill="none" stroke="black"/>
<path d="M 408,160 L 408,448" fill="none" stroke="black"/>
<path d="M 168,16 L 400,16" fill="none" stroke="black"/>
<path d="M 192,48 L 384,48" fill="none" stroke="black"/>
<path d="M 192,80 L 384,80" fill="none" stroke="black"/>
<path d="M 168,96 L 400,96" fill="none" stroke="black"/>
<path d="M 72,160 L 408,160" fill="none" stroke="black"/>
<path d="M 88,176 L 352,176" fill="none" stroke="black"/>
<path d="M 128,224 L 320,224" fill="none" stroke="black"/>
<path d="M 128,256 L 320,256" fill="none" stroke="black"/>
<path d="M 88,288 L 352,288" fill="none" stroke="black"/>
<path d="M 184,352 L 392,352" fill="none" stroke="black"/>
<path d="M 216,384 L 360,384" fill="none" stroke="black"/>
<path d="M 216,416 L 360,416" fill="none" stroke="black"/>
<path d="M 184,432 L 392,432" fill="none" stroke="black"/>
<path d="M 72,448 L 408,448" fill="none" stroke="black"/>
<path d="M 168,480 L 280,480" fill="none" stroke="black"/>
<path d="M 104,544 L 200,544" fill="none" stroke="black"/>
<path d="M 232,544 L 336,544" fill="none" stroke="black"/>
<path d="M 128,576 L 184,576" fill="none" stroke="black"/>
<path d="M 256,576 L 312,576" fill="none" stroke="black"/>
<path d="M 128,608 L 184,608" fill="none" stroke="black"/>
<path d="M 256,608 L 312,608" fill="none" stroke="black"/>
<path d="M 104,624 L 200,624" fill="none" stroke="black"/>
<path d="M 232,624 L 336,624" fill="none" stroke="black"/>
<path d="M 56,672 L 232,672" fill="none" stroke="black"/>
<path d="M 40,704 L 248,704" fill="none" stroke="black"/>
<path d="M 192,736 L 368,736" fill="none" stroke="black"/>
<path d="M 176,768 L 384,768" fill="none" stroke="black"/>
<path d="M 232,672 L 248,704" fill="none" stroke="black"/>
<path d="M 368,736 L 384,768" fill="none" stroke="black"/>
<path d="M 40,704 L 56,672" fill="none" stroke="black"/>
<path d="M 176,768 L 192,736" fill="none" stroke="black"/>
<path d="M 128,224 C 119.16936,224 112,231.16936 112,240" fill="none" stroke="black"/>
<path d="M 320,224 C 328.83064,224 336,231.16936 336,240" fill="none" stroke="black"/>
<path d="M 128,256 C 119.16936,256 112,248.83064 112,240" fill="none" stroke="black"/>
<path d="M 320,256 C 328.83064,256 336,248.83064 336,240" fill="none" stroke="black"/>
<path d="M 216,384 C 207.16936,384 200,391.16936 200,400" fill="none" stroke="black"/>
<path d="M 360,384 C 368.83064,384 376,391.16936 376,400" fill="none" stroke="black"/>
<path d="M 216,416 C 207.16936,416 200,408.83064 200,400" fill="none" stroke="black"/>
<path d="M 360,416 C 368.83064,416 376,408.83064 376,400" fill="none" stroke="black"/>
<polygon class="arrowhead" points="376,376 364,370.4 364,381.6" fill="black" transform="rotate(90,368,376)"/>
<polygon class="arrowhead" points="304,568 292,562.4 292,573.6" fill="black" transform="rotate(90,296,568)"/>
<polygon class="arrowhead" points="288,728 276,722.4 276,733.6" fill="black" transform="rotate(90,280,728)"/>
<polygon class="arrowhead" points="288,568 276,562.4 276,573.6" fill="black" transform="rotate(90,280,568)"/>
<polygon class="arrowhead" points="216,376 204,370.4 204,381.6" fill="black" transform="rotate(90,208,376)"/>
<polygon class="arrowhead" points="216,216 204,210.4 204,221.6" fill="black" transform="rotate(90,208,216)"/>
<polygon class="arrowhead" points="176,568 164,562.4 164,573.6" fill="black" transform="rotate(90,168,568)"/>
<polygon class="arrowhead" points="160,664 148,658.4 148,669.6" fill="black" transform="rotate(90,152,664)"/>
<polygon class="arrowhead" points="160,568 148,562.4 148,573.6" fill="black" transform="rotate(90,152,568)"/>
<g class="text">
<text x="284" y="36">Customer Service Manager</text>
<text x="296" y="68">CNC</text>
<text x="288" y="132">CMI(Augmented L3SM)</text>
<text x="400" y="132">CMI(VN)</text>
<text x="116" y="196">MDSC</text>
<text x="220" y="244">Service Mapping Function</text>
<text x="240" y="324">CMI(VN)</text>
<text x="292" y="372">MDSC</text>
<text x="288" y="404">Service Mapping</text>
<text x="76" y="516">MPI(VPN/TE models)</text>
<text x="368" y="516">MPI(TE/L1 models)</text>
<text x="40" y="580">IP/MPLS</text>
<text x="404" y="580">Optical Domain</text>
<text x="36" y="596">Domain</text>
<text x="156" y="596">PNC1</text>
<text x="284" y="596">PNC2</text>
<text x="388" y="596">Controller</text>
<text x="52" y="612">Controller</text>
<text x="304" y="660">SBI</text>
<text x="144" y="692">IP/MPLS Network</text>
<text x="280" y="756">Optical Network</text>
</g>
</svg>
            </artwork>
            <artwork type="ascii-art" align="left"><![CDATA[
                           +----------------------------+
                           |  Customer Service Manager  |
                           |  +-----------------------+ |
                           |  |           CNC         | |
                           |  +-+-------------------+-+ |
                           +----+-------------------+---+
                                |                   |
                                |CMI(Augmented L3SM)|CMI(VN)
                                |                   |
               +----------------+-------------------+----+
               | +--------------+-----------------+ |    |
               | | MDSC         |                 | |    |
               | |              v                 | |    |
               | |   .-------------------------.  | |    |
               | |  | Service Mapping Function  | | |    |
               | |   '-------------------------'  | |    |
               | |                                | |    |
               | +-------+------+-----------------+ |    |
               |         |      |                   |    |
               |         |      |CMI(VN)            |    |
               |         |      |                   |    |
               |         |   +--+-------------------+--+ |
               |         |   |  v        MDSC       v  | |
               |         |   |  .-------------------.  | |
               |         |   | |   Service Mapping   | | |
               |         |   |  '-------------------'  | |
               |         |   +--+----------+-----------+ |
               +---------+------+----------+-------------+
                         |      |          |
                         | +----+--------+ |
                         | |             | |
       MPI(VPN/TE models)| |             | |MPI(TE/L1 models)
                         | |             | |
                   +-----+-+---+   +-----+-+----+
                   |     v v   |   |     v v    |
        IP/MPLS    |  +------+ |   |  +------+  | Optical Domain
        Domain     |  | PNC1 | |   |  | PNC2 |  | Controller
        Controller |  +--+---+ |   |  +--+---+  |
                   +-----+-----+   +-----+------+
                         |               |
                         V               | SBI
             +---------------------+     |
            /    IP/MPLS Network    \    |
           +-------------------------+   |
                                         V
                              +---------------------+
                             /    Optical Network    \
                            +-------------------------+
]]></artwork></artset>
      </figure>
      <t>
   There are three main entities in the ACTN architecture as shown in
   <xref target="l3vpn-architecture-from-the-ipoptical-network-perspective" format="default"/>.</t>
      <ul spacing="normal">
        <li>CNC: The Customer Network Controller is responsible for generating
   service requests. In the context of an L3VPN, the CNC uses the
   Augmented L3SM to express the service request and communicate it
   to the network operator.</li>
        <li>MDSC: This entity is responsible for coordinating a L3VPN service
   request (expressed via the Augmented L3SM) with the IP/MPLS PNC
   and the Transport PNC. For TE services, one of the key
   responsibilities of the MDSC is to coordinate with both the IP PNC
   and the Transport PNC for the mapping of the Augmented L3VPN
   Service Model to the ACTN VN model. In the VN/TE-tunnel binding
   case, the MDSC will need to coordinate with the Transport PNC to
   dynamically create the TE-tunnels in the transport network as
   needed. These tunnels are added as links in the IP/MPLS Layer
   topology. The MDSC coordinates with IP/MPLS PNC to create the TE-
   tunnels in the IP/MPLS layer, as part of the ACTN VN creation.</li>
        <li>
          <t>PNC: The Provisioning Network Controller is responsible for
   configuring and operating the network devices. <xref target="l3vpn-architecture-from-the-ipoptical-network-perspective" format="default"/> shows two
   distinct PNCs.
          </t>
          <ul spacing="normal">
            <li>IP/MPLS PNC (PNC1): This entity is responsible for device
        configuration to create PE-PE L3VPN tunnels for the VPN
        customer and for the configuration of the L3VPN VRF on the PE
        nodes. Each network element would select a tunnel based on
        the configuration.</li>
            <li>Transport PNC (PNC2): This entity is responsible for the device
        configuration for TE tunnels in the transport networks.</li>
          </ul>
        </li>
      </ul>
      <t>The three main interfaces are shown in <xref target="l3vpn-architecture-from-the-ipoptical-network-perspective" format="default"/> and listed below.</t>
      <ul spacing="normal">
        <li>CMI: The CNC-MDSC Interface is used to communicate service
  requests from the customer to the operator. The requests may be
     expressed as Augmented VPN service requests (L2SM, L3SM), as
     connectivity requests (L1CSM), or as virtual network requests
     (ACTN VN).</li>
        <li>MPI: The MDSC-PNC Interface is used by the MDSC to orchestrate
  networks under the control of PNCs. The requests on this interface
     may use TE tunnel models, TE topology models, VPN network
     configuration models or layer one connectivity models.
  </li>
        <li>SBI: The Southbound Interface is used by the PNC to control
  network devices and is out of the scope of this document.
  </li>
      </ul>
      <t>The TE Service Mapping Model as described in this document can be
  used to see the mapping between service models and VN models and
     TE Tunnel/Topology models. That mapping may occur in the CNC if a
     service request is mapped to a VN request. Or it may occur in the
     MDSC where a service request is mapped to a TE tunnel, TE
     topology, or VPN network configuration model. The TE Service
     Mapping Model may be read from the CNC or MDSC to understand how
     the mapping has been made to see the purpose for which the network
     resources are used.
      </t>
      <t>
   As shown in <xref target="l3vpn-architecture-from-the-ipoptical-network-perspective" format="default"/>, the MDSC may be used recursively. For example,
   the CNC might map an L3SM request to a VN request that it sends to a
   recursive MDSC.</t>
      <t>
   The high-level control flows for one example are as follows:</t>
      <ol spacing="normal" type="1"><li>A customer asks for an L3VPN between CE1 and CE2 using the
     Augmented L3SM model.</li>
        <li>The MDSC considers the service request and local policy to
     determine if it needs to create a new VN or any TE Topology, and
     if that is the case, ACTN VN YANG <xref target="I-D.ietf-teas-actn-vn-yang" format="default"/> is used to
     configure a new VN based on this VPN and map the VPN service to
     the ACTN VN. In case an existing tunnel is to be used, each device
     will select which tunnel to use and populate this mapping
     information.</li>
        <li>
          <t>The MDSC interacts with both the IP/MPLS PNC and the Transport PNC
     to create a PE-PE tunnel in the IP network mapped to a TE tunnel
     in the transport network by providing inter-layer access
     points and tunnel requirements. The specific service information
     is passed to the IP/MPLS PNC for the actual VPN configuration and
     activation.</t>
          <ol spacing="normal" type="a">

  <li>The Transport PNC creates the corresponding TE tunnel
          matching with the access point and egress point.</li>
            <li>The IP/MPLS PNC maps the VPN ID with the corresponding TE
          tunnel ID to bind these two IDs.</li>
          </ol>
        </li>
        <li>The IP/MPLS PNC creates/updates a VRF instance for this VPN
     customer. This is not in the scope of this document.</li>
      </ol>
      <section anchor="sect-4.1" numbered="true" toc="default">
        <name>Service Mapping</name>
        <t>
   Augmented L3SM and L2SM can be used to request VPN service creation
   including the creation of sites and corresponding site network
   access connection between CE and PE. A VPN-ID is used to identify
   each VPN service ordered by the customer. The ACTN VN can be used
   further to establish PE-to-PE connectivity between VPN sites
   belonging to the same VPN service. A VN-ID is used to identify each
   virtual network established between VPN sites.</t>
        <t>
   Once the ACTN VN has been established over the TE network (maybe a
   new VN, maybe modification of an existing VN, or maybe the use of an
   unmodified existing VN), the mapping between the VPN service and the
   ACTN VN service can be created.</t>
      </section>
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>Site Mapping</name>
        <t>
   The elements in Augmented L3SM and L2SM define site location
   parameters and constraints such as distance and access diversity
   that can influence the placement of network attachment points (i.e,
   virtual network access points (VNAP)). To achieve this, a central
   directory can be set up to establish the mapping between location
   parameters and constraints and network attachment point location.
   Suppose multiple attachment points are matched, the management
   system can use constraints or other local policies to select the best
   candidate network attachment points.</t>
        <t>
   After a network attachment point is selected, the mapping between
   VPN site and VNAP can be established as shown in Table 1.</t>
        <table anchor="tab-mapping-between-vpn-site-and-vnap" align="center">
          <name>: Mapping Between VPN Site and VNAP</name>
          <thead>
            <tr>
              <th align="left">   Site   </th>
              <th align="left">  Site Network Access  </th>
              <th align="left"> Location  (Address, Postal Code, State, City, Country Code)</th>
              <th align="left"> Access Diversity  (Constraint-Type, Group-id,Target Group-id) </th>
              <th align="left"> PE     </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">SITE1</td>
              <td align="left">ACCESS1</td>
              <td align="left">(,,US,NewYork,)</td>
              <td align="left">(10,PE-Diverse,10)</td>
              <td align="left">PE1</td>
            </tr>
            <tr>
              <td align="left">SITE2</td>
              <td align="left">ACCESS2</td>
              <td align="left">(,,CN,Beijing,)</td>
              <td align="left">(10,PE-Diverse,10)</td>
              <td align="left">PE2</td>
            </tr>
            <tr>
              <td align="left">SITE3</td>
              <td align="left">ACCESS3</td>
              <td align="left">(,,UK,London, )</td>
              <td align="left">(12,same-PE,12)</td>
              <td align="left">PE4</td>
            </tr>
            <tr>
              <td align="left">SITE4</td>
              <td align="left">ACCESS4</td>
              <td align="left">(,,FR,Paris,)</td>
              <td align="left">(20,Bearer-Diverse,20)</td>
              <td align="left">PE7</td>
            </tr>
          </tbody>
        </table>
        <t>As per <xref target="RFC8299"/>, a VPN has a particular service topology and as a consequence, each site belonging to a VPN is assigned a particular role in this topology. At the time of mapping, the site to the TE endpoints, the role of the site in a particular VPN topology is also mapped. </t>
      </section>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Applicability of TE-Service Mapping in Generic Context </name>
      <t>
   As discussed in the Introduction Section, the models presented in
   this document is also applicable generically outside of the ACTN
   architecture. <xref target="RFC8309" format="default"/> defines Customer Service Model between
   Customer and Service Orchestrator and Service Delivery Model between
   Service Orchestrator and Network Orchestrator(s). TE-Service mapping
   models defined in this document can be regarded primarily as
   Customer Service Model and secondarily as Service Deliver Model.</t>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>YANG Data Trees</name>
      <section numbered="true" toc="default">
        <name>Service Mapping Types</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-te-service-mapping-types
  +--rw te-mapping-templates
     +--rw te-mapping-template* [id]
        +--rw id                  te-mapping-template-id
        +--rw description?        string
        +--rw type                identityref
        +--rw path-constraints
        |  +--rw te-bandwidth
        |  |  +--rw (technology)?
        |  |     +--:(generic)
        |  |        +--rw generic?   te-bandwidth
        |  +--rw link-protection?          identityref
        |  +--rw setup-priority?           uint8
        |  +--rw hold-priority?            uint8
        |  +--rw signaling-type?           identityref
        |  +--rw path-metric-bounds
        |  |  +--rw path-metric-bound* [metric-type]
        |  |     +--rw metric-type    identityref
        |  |     +--rw upper-bound?   uint64
        |  +--rw path-affinities-values
        |  |  +--rw path-affinities-value* [usage]
        |  |     +--rw usage    identityref
        |  |     +--rw value?   admin-groups
        |  +--rw path-affinity-names
        |  |  +--rw path-affinity-name* [usage]
        |  |     +--rw usage            identityref
        |  |     +--rw affinity-name* [name]
        |  |        +--rw name    string
        |  +--rw path-srlgs-lists
        |  |  +--rw path-srlgs-list* [usage]
        |  |     +--rw usage     identityref
        |  |     +--rw values*   srlg
        |  +--rw path-srlgs-names
        |  |  +--rw path-srlgs-name* [usage]
        |  |     +--rw usage    identityref
        |  |     +--rw names*   string
        |  +--rw disjointness?             te-path-disjointness
        +--rw optimizations
           +--rw (algorithm)?
              +--:(metric) {path-optimization-metric}?
              |  +--rw optimization-metric* [metric-type]
              |  |  +--rw metric-type
              |  |  |       identityref
              |  |  +--rw weight?                           uint8
              |  |  +--rw explicit-route-exclude-objects
              |  |  |     ...
              |  |  +--rw explicit-route-include-objects
              |  |        ...
              |  +--rw tiebreakers
              |     +--rw tiebreaker* [tiebreaker-type]
              |           ...
              +--:(objective-function)
                       {path-optimization-objective-function}?
                 +--rw objective-function
                    +--rw objective-function-type?   identityref

]]></artwork>
      </section>
      <section numbered="true" toc="default">
        <name>Service Models</name>
        <section anchor="sect-6.1" numbered="true" toc="default">
          <name>L3SM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-l3sm-te-service-mapping

  augment /l3vpn-svc:l3vpn-svc/l3vpn-svc:vpn-services
            /l3vpn-svc:vpn-service:
    +--rw te-service-mapping!
       +--rw type?                           identityref
       +--rw te-policy
       |  +--rw path-affinities-values
       |  |  +--rw path-affinities-value* [usage]
       |  |     +--rw usage    identityref
       |  |     +--rw value?   admin-groups
       |  +--rw path-affinity-names
       |  |  +--rw path-affinity-name* [usage]
       |  |     +--rw usage            identityref
       |  |     +--rw affinity-name* [name]
       |  |        +--rw name    string
       |  +--rw protection-type?          identityref
       |  +--rw availability-type?        identityref
       +--rw (te)?
       |  +--:(vn)
       |  |  +--rw vn*
       |  |          -> /vn:virtual-network/vn/vn-id
       |  +--:(te-topo)
       |  |  +--rw te-topology-identifier
       |  |  |  +--rw provider-id?   te-global-id
       |  |  |  +--rw client-id?     te-global-id
       |  |  |  +--rw topology-id?   te-topology-id
       |  |  +--rw abstract-node?
       |  |          -> /nw:networks/network/node/node-id
       |  +--:(te-tunnel)
       |     +--rw te-tunnel*                te:tunnel-ref
       |     +--rw sr-policy* [headend color-ref endpoint-ref]
       |             {sr-policy}?
       |        +--rw headend         inet:ip-address-no-zone
       |        +--rw color-ref       leafref
       |        +--rw endpoint-ref    leafref
       +--rw template-ref?
               -> /tsmt:te-mapping-templates/te-mapping-template/id
               {template}?
  augment /l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site
            /l3vpn-svc:site-network-accesses
            /l3vpn-svc:site-network-access:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id
  augment /l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site
            /l3vpn-svc:service/l3vpn-svc:qos/l3vpn-svc:qos-profile
            /l3vpn-svc:qos-profile/l3vpn-svc:custom/l3vpn-svc:classes
            /l3vpn-svc:class:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id
  augment /l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site
            /l3vpn-svc:site-network-accesses
            /l3vpn-svc:site-network-access/l3vpn-svc:service
            /l3vpn-svc:qos/l3vpn-svc:qos-profile
            /l3vpn-svc:qos-profile/l3vpn-svc:custom/l3vpn-svc:classes
            /l3vpn-svc:class:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id

]]></artwork>
        </section>
        <section anchor="sect-6.2" numbered="true" toc="default">
          <name>L2SM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[

module: ietf-l2sm-te-service-mapping

  augment /l2vpn-svc:l2vpn-svc/l2vpn-svc:vpn-services
            /l2vpn-svc:vpn-service:
    +--rw te-service-mapping!
       +--rw type?                           identityref
       +--rw te-policy
       |  +--rw path-affinities-values
       |  |  +--rw path-affinities-value* [usage]
       |  |     +--rw usage    identityref
       |  |     +--rw value?   admin-groups
       |  +--rw path-affinity-names
       |  |  +--rw path-affinity-name* [usage]
       |  |     +--rw usage            identityref
       |  |     +--rw affinity-name* [name]
       |  |        +--rw name    string
       |  +--rw protection-type?          identityref
       |  +--rw availability-type?        identityref
       +--rw (te)?
       |  +--:(vn)
       |  |  +--rw vn*
       |  |          -> /vn:virtual-network/vn/vn-id
       |  +--:(te-topo)
       |  |  +--rw te-topology-identifier
       |  |  |  +--rw provider-id?   te-global-id
       |  |  |  +--rw client-id?     te-global-id
       |  |  |  +--rw topology-id?   te-topology-id
       |  |  +--rw abstract-node?
       |  |          -> /nw:networks/network/node/node-id
       |  +--:(te-tunnel)
       |     +--rw te-tunnel*                te:tunnel-ref
       |     +--rw sr-policy* [headend color-ref endpoint-ref]
       |             {sr-policy}?
       |        +--rw headend         inet:ip-address-no-zone
       |        +--rw color-ref       leafref
       |        +--rw endpoint-ref    leafref
       +--rw template-ref?
               -> /tsmt:te-mapping-templates/te-mapping-template/id
               {template}?
  augment /l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site
            /l2vpn-svc:site-network-accesses
            /l2vpn-svc:site-network-access:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id
  augment /l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site
            /l2vpn-svc:service/l2vpn-svc:qos/l2vpn-svc:qos-profile
            /l2vpn-svc:qos-profile/l2vpn-svc:custom/l2vpn-svc:classes
            /l2vpn-svc:class:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id
  augment /l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site
            /l2vpn-svc:site-network-accesses
            /l2vpn-svc:site-network-access/l2vpn-svc:service
            /l2vpn-svc:qos/l2vpn-svc:qos-profile
            /l2vpn-svc:qos-profile/l2vpn-svc:custom/l2vpn-svc:classes
            /l2vpn-svc:class:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id

]]></artwork>
        </section>
        <section anchor="sect-6.3" numbered="true" toc="default">
          <name>L1CSM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-l1csm-te-service-mapping

  augment /l1csm:l1-connectivity/l1csm:services/l1csm:service:
    +--rw te-service-mapping!
       +--rw type?                           identityref
       +--rw te-policy
       |  +--rw path-affinities-values
       |  |  +--rw path-affinities-value* [usage]
       |  |     +--rw usage    identityref
       |  |     +--rw value?   admin-groups
       |  +--rw path-affinity-names
       |  |  +--rw path-affinity-name* [usage]
       |  |     +--rw usage            identityref
       |  |     +--rw affinity-name* [name]
       |  |        +--rw name    string
       |  +--rw protection-type?          identityref
       |  +--rw availability-type?        identityref
       +--rw (te)?
       |  +--:(vn)
       |  |  +--rw vn*
       |  |          -> /vn:virtual-network/vn/vn-id
       |  +--:(te-topo)
       |  |  +--rw te-topology-identifier
       |  |  |  +--rw provider-id?   te-global-id
       |  |  |  +--rw client-id?     te-global-id
       |  |  |  +--rw topology-id?   te-topology-id
       |  |  +--rw abstract-node?
       |  |          -> /nw:networks/network/node/node-id
       |  +--:(te-tunnel)
       |     +--rw te-tunnel*                te:tunnel-ref
       |     +--rw sr-policy* [headend color-ref endpoint-ref]
       |             {sr-policy}?
       |        +--rw headend         inet:ip-address-no-zone
       |        +--rw color-ref       leafref
       |        +--rw endpoint-ref    leafref
       +--rw template-ref?
               -> /tsmt:te-mapping-templates/te-mapping-template/id
               {template}?
  augment /l1csm:l1-connectivity/l1csm:access/l1csm:unis/l1csm:uni:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id


]]></artwork>
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>Network Models</name>
        <section numbered="true" toc="default">
          <name>L3NM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-l3nm-te-service-mapping

  augment /l3vpn-ntw:l3vpn-ntw/l3vpn-ntw:vpn-services
            /l3vpn-ntw:vpn-service:
    +--rw te-service-mapping!
       +--rw type?                           identityref
       +--rw te-policy
       |  +--rw path-affinities-values
       |  |  +--rw path-affinities-value* [usage]
       |  |     +--rw usage    identityref
       |  |     +--rw value?   admin-groups
       |  +--rw path-affinity-names
       |  |  +--rw path-affinity-name* [usage]
       |  |     +--rw usage            identityref
       |  |     +--rw affinity-name* [name]
       |  |        +--rw name    string
       |  +--rw protection-type?          identityref
       |  +--rw availability-type?        identityref
       +--rw (te)?
       |  +--:(vn)
       |  |  +--rw vn*
       |  |          -> /vn:virtual-network/vn/vn-id
       |  +--:(te-topo)
       |  |  +--rw te-topology-identifier
       |  |  |  +--rw provider-id?   te-global-id
       |  |  |  +--rw client-id?     te-global-id
       |  |  |  +--rw topology-id?   te-topology-id
       |  |  +--rw abstract-node?
       |  |          -> /nw:networks/network/node/node-id
       |  +--:(te-tunnel)
       |     +--rw te-tunnel*                te:tunnel-ref
       |     +--rw sr-policy* [headend color-ref endpoint-ref]
       |             {sr-policy}?
       |        +--rw headend         inet:ip-address-no-zone
       |        +--rw color-ref       leafref
       |        +--rw endpoint-ref    leafref
       +--rw template-ref?
               -> /tsmt:te-mapping-templates/te-mapping-template/id
               {template}?
  augment /l3vpn-ntw:l3vpn-ntw/l3vpn-ntw:vpn-services
            /l3vpn-ntw:vpn-service/l3vpn-ntw:vpn-nodes
            /l3vpn-ntw:vpn-node/l3vpn-ntw:vpn-network-accesses
            /l3vpn-ntw:vpn-network-access:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id


]]></artwork>
        </section>
        <section numbered="true" toc="default">
          <name>L2NM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[

module: ietf-l2nm-te-service-mapping

  augment /l2vpn-ntw:l2vpn-ntw/l2vpn-ntw:vpn-services
            /l2vpn-ntw:vpn-service:
    +--rw te-service-mapping!
       +--rw type?                           identityref
       +--rw te-policy
       |  +--rw path-affinities-values
       |  |  +--rw path-affinities-value* [usage]
       |  |     +--rw usage    identityref
       |  |     +--rw value?   admin-groups
       |  +--rw path-affinity-names
       |  |  +--rw path-affinity-name* [usage]
       |  |     +--rw usage            identityref
       |  |     +--rw affinity-name* [name]
       |  |        +--rw name    string
       |  +--rw protection-type?          identityref
       |  +--rw availability-type?        identityref
       +--rw (te)?
       |  +--:(vn)
       |  |  +--rw vn*
       |  |          -> /vn:virtual-network/vn/vn-id
       |  +--:(te-topo)
       |  |  +--rw te-topology-identifier
       |  |  |  +--rw provider-id?   te-global-id
       |  |  |  +--rw client-id?     te-global-id
       |  |  |  +--rw topology-id?   te-topology-id
       |  |  +--rw abstract-node?
       |  |          -> /nw:networks/network/node/node-id
       |  +--:(te-tunnel)
       |     +--rw te-tunnel*                te:tunnel-ref
       |     +--rw sr-policy* [headend color-ref endpoint-ref]
       |             {sr-policy}?
       |        +--rw headend         inet:ip-address-no-zone
       |        +--rw color-ref       leafref
       |        +--rw endpoint-ref    leafref
       +--rw template-ref?
               -> /tsmt:te-mapping-templates/te-mapping-template/id
               {template}?
  augment /l2vpn-ntw:l2vpn-ntw/l2vpn-ntw:vpn-services
            /l2vpn-ntw:vpn-service/l2vpn-ntw:vpn-nodes
            /l2vpn-ntw:vpn-node/l2vpn-ntw:vpn-network-accesses
            /l2vpn-ntw:vpn-network-access:
    +--rw (te)?
       +--:(vn)
       |  +--rw vn-ap*   -> /vn:access-point/ap/vn-ap/vn-ap-id
       +--:(te)
          +--rw ltp*     te-types:te-tp-id


]]></artwork>
        </section>
      </section>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>YANG Data Models</name>
      <t>The YANG modules are as follows:</t>
      <section anchor="sect-7.1" numbered="true" toc="default">
        <name>ietf-te-service-mapping-types</name>
        <sourcecode name="ietf-te-service-mapping-types@2024-10-20.yang" type="" markers="true"><![CDATA[
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 inet-types */

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }

  /* Import te-types */

  import ietf-te-types {
    prefix te-types;
    reference
      "RFC 8776: Common YANG Data Types for Traffic Engineering";
  }

  /* Import network module */

  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:   <https://datatracker.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  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) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: Traffic Engineering (TE) and Service Mapping YANG
       Data 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 bound to the service.";
  }

  identity traffic-isolation {
    base new;
    description
      "Traffic isolation: a customer expects that the service
       traffic cannot be received by other customers in the
       same network.";
  }

  identity interference-isolation {
    base new;
    description
      "Interference isolation: a customer expects that the
       service traffic is not impacted by the existence of
       other customers or services in the same network.";
  }

  identity traffic-interference-isolation {
    base new;
    description
      "Both Traffic and Interference isolation are enabled.";
  }

  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%";
  }

  identity level-unspecified {
    base availability-type;
    description
      "level unspecified";
  }

  /*
   * 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
        "The service (e.g. VPN) can be mapped to a VN, TE-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 {
        /*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*/
        uses te-types:te-topology-identifier;
        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";
          /*Ideally Headend should be part of SR-Policy (but is
            missing) - This is retained to keep track of this*/
          key "headend color-ref endpoint-ref";
          description
            "SR Policy";
          leaf headend {
            type inet:ip-address-no-zone;
            description
              "The headend node for the SR Policy";
          }
          leaf 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 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 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 te-endpoint-ref {
    description
      "The reference to TE endpoints.";
    choice te {
      description
        "TE endpoint is referenced by VN Access Point (VNAP) or TE
         Link Termination Point (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-list 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 te-policy {
    description
      "Various underlying TE policy requirements";
    uses te-types:generic-path-affinities;
    leaf protection-type {
      type identityref {
        base te-types:lsp-protection-type;
      }
      default "te-types:lsp-protection-unprotected";
      description
        "Desired protection level for the underlying
         TE resources";
    }
    leaf availability-type {
      type identityref {
        base availability-type;
      }
      default "level-unspecified";
      description
        "Availability Requirement for the Service";
    }
  }

  grouping te-mapping {
    description
      "Mapping between Services and TE";
    leaf type {
      type identityref {
        base map-type;
      }
      default "none";
      description
        "Isolation Requirements, Tunnel Bind or
         Tunnel Selection";
    }
    container te-policy {
      uses te-policy;
      description
        "Desired Underlying TE Policy";
    }
    uses te-ref;
  }

  /*
   * containers
   */

  container te-mapping-templates {
    description
      "The templates include 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 type {
        type identityref {
          base map-type;
        }
        must "0 = derived-from-or-self(.,'none')" {
          error-message "The map-type must be other than "
                      + "none";
        }
        mandatory true;
        description
          "Map type for the VN/Tunnel creation/
           selection.";
      }
      uses te-types:generic-path-constraints;
      uses te-types:generic-path-optimization;
      description
        "Template - only id and type are mandatory,
         if no other parameters are present, it
         indicates that no constraints and optimization
         criteria has been specified";
    }
  }
}

]]></sourcecode>
      </section>
      <section numbered="true" toc="default">
        <name>Service Models</name>
        <section anchor="sect-7.2" numbered="true" toc="default">
          <name>ietf-l3sm-te-service-mapping</name>
          <sourcecode name="ietf-l3sm-te-service-mapping@2024-10-20.yang" type="" markers="true"><![CDATA[
module ietf-l3sm-te-service-mapping {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-l3sm-te-service-mapping";
  prefix l3-tsm;

  import ietf-te-service-mapping-types {
    prefix tsmt;
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Model";
  }
  import ietf-l3vpn-svc {
    prefix l3vpn-svc;
    reference
      "RFC 8299: YANG Data Model for L3VPN Service Delivery";
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/teas/about/>
     WG List:  <mailto:teas@ietf.org>

     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  description
    "This module contains a YANG module for the mapping of Layer 3
     Service Model (L3SM) to the TE and VN.

     Copyright (c) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Model";
  }

  /*
   * Augmentation to L3SM
   */

  augment "/l3vpn-svc:l3vpn-svc/l3vpn-svc:vpn-services"
        + "/l3vpn-svc:vpn-service" {
    description
      "L3SM augmented to include TE parameters and mapping";
    container te-service-mapping {
      presence "Indicates L3 service to TE mapping";
      description
        "Container to augment l3sm to TE parameters and mapping";
      uses tsmt:te-mapping;
    }
  }

  //augment

  augment "/l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site"
        + "/l3vpn-svc:site-network-accesses"
        + "/l3vpn-svc:site-network-access" {
    description
      "This augment is only valid for TE mapping of L3SM network-access
       to TE endpoints";
    uses tsmt:te-endpoint-ref;
  }

  //augment

  augment "/l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site"
        + "/l3vpn-svc:service/l3vpn-svc:qos/l3vpn-svc:qos-profile"
        + "/l3vpn-svc:qos-profile/l3vpn-svc:custom"
        + "/l3vpn-svc:classes/l3vpn-svc:class" {
    description
      "This augment is for per-class in site for custom QoS profile";
    uses tsmt:te-endpoint-ref;
  }

  augment "/l3vpn-svc:l3vpn-svc/l3vpn-svc:sites/l3vpn-svc:site"
        + "/l3vpn-svc:site-network-accesses"
        + "/l3vpn-svc:site-network-access"
        + "/l3vpn-svc:service/l3vpn-svc:qos/l3vpn-svc:qos-profile"
        + "/l3vpn-svc:qos-profile/l3vpn-svc:custom"
        + "/l3vpn-svc:classes/l3vpn-svc:class" {
    description
      "This augment is for per-class in site-network-access for custom
       QoS profile";
    uses tsmt:te-endpoint-ref;
  }
}

]]></sourcecode>
        </section>
        <section anchor="sect-7.3" numbered="true" toc="default">
          <name>ietf-l2sm-te-service-mapping</name>
          <sourcecode name="ietf-l2sm-te-service-mapping@2024-10-20.yang" type="" markers="true"><![CDATA[
module ietf-l2sm-te-service-mapping {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-l2sm-te-service-mapping";
  prefix l2-tsm;

  import ietf-te-service-mapping-types {
    prefix tsmt;
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }
  import ietf-l2vpn-svc {
    prefix l2vpn-svc;
    reference
      "RFC 8466: A YANG Data Model for Layer 2 Virtual Private Network
       (L2VPN) Service Delivery";
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  description
    "This module contains a YANG module for the mapping of Layer 2
     Virtual Private Network (L2VPN) Service Delivery to the TE and
     Virtual Network (VN).

     Copyright (c) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }

  /*
   * Augmentation to L2SM
   */

  augment "/l2vpn-svc:l2vpn-svc/l2vpn-svc:vpn-services/"
        + "l2vpn-svc:vpn-service" {
    description
      "L2SM augmented to include TE parameters and mapping";
    container te-service-mapping {
      presence "indicates L2 service is relying on underlying TE";
      description
        "Container to augment L2SM to TE parameters and mapping
         If no other parameters exist, it indicates that the
         underlying TE resources have not been mapped yet.";
      uses tsmt:te-mapping;
    }
  }

  augment "/l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site"
        + "/l2vpn-svc:site-network-accesses"
        + "/l2vpn-svc:site-network-access" {
    description
      "This augments the L2SM network-access with a reference
       to TE endpoints when underlying TE is used";
    uses tsmt:te-endpoint-ref;
  }

  augment "/l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site"
        + "/l2vpn-svc:service/l2vpn-svc:qos/l2vpn-svc:qos-profile"
        + "/l2vpn-svc:qos-profile/l2vpn-svc:custom"
        + "/l2vpn-svc:classes/l2vpn-svc:class" {
    when './l2vpn-svc:bandwidth/l2vpn-svc:end-to-end' {
      description
        "applicable only with end-to-end";
    }
    description
      "This augment is for per-class in site for custom QoS profile";
    uses tsmt:te-endpoint-ref;
  }

  augment "/l2vpn-svc:l2vpn-svc/l2vpn-svc:sites/l2vpn-svc:site"
        + "/l2vpn-svc:site-network-accesses"
        + "/l2vpn-svc:site-network-access"
        + "/l2vpn-svc:service/l2vpn-svc:qos/l2vpn-svc:qos-profile"
        + "/l2vpn-svc:qos-profile/l2vpn-svc:custom"
        + "/l2vpn-svc:classes/l2vpn-svc:class" {
    description
      "This augment is for per-class in site-network-access for custom
       QoS profile";
    uses tsmt:te-endpoint-ref;
  }
}

]]></sourcecode>
        </section>
        <section anchor="sect-7.4" numbered="true" toc="default">
          <name>ietf-l1csm-te-service-mapping</name>
          <sourcecode name="ietf-l1csm-te-service-mapping@2024-10-20.yang" type="" markers="true"><![CDATA[
module ietf-l1csm-te-service-mapping {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-l1csm-te-service-mapping";
  prefix l1-tsm;

  import ietf-te-service-mapping-types {
    prefix tsmt;
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }
  import ietf-l1csm {
    prefix l1csm;
    reference
      "I-D.ietf-ccamp-l1csm-yang: A YANG Data Model for L1 Connectivity
       Service Model (L1CSM)";
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>
     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  description
    "This module contains a YANG module for the mapping of
     Layer 1 Connectivity Service Module (L1CSM) to the TE and
     Virtual Network (VN).

     Copyright (c) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }

  /*
   * Augmentation to L1CSM
   */

  augment "/l1csm:l1-connectivity/l1csm:services/l1csm:service" {
    description
      "L1CSM augmented to include TE parameters and mapping";
    container te-service-mapping {
      presence "Indicates L1 service is relying on underlying TE";
      description
        "Container to augment L1CSM to TE parameters and mapping.
         If no other parameters exist, it indicates that the
         underlying TE resources have not been mapped yet.";
      uses tsmt:te-mapping;
    }
  }

  augment "/l1csm:l1-connectivity/l1csm:access/l1csm:unis/"
        + "l1csm:uni" {
    description
      "This augments the L1CSM UNI with a reference
       to TE endpoints";
    uses tsmt:te-endpoint-ref;
  }
}

]]></sourcecode>
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>Network Models</name>
        <section numbered="true" toc="default">
          <name>ietf-l3nm-te-service-mapping</name>
          <sourcecode name="ietf-l3nm-te-service-mapping@2024-10-20.yang" type="" markers="true"><![CDATA[
module ietf-l3nm-te-service-mapping {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-l3nm-te-service-mapping";
  prefix l3nm-tsm;

  import ietf-te-service-mapping-types {
    prefix tsmt;
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }
  import ietf-l3vpn-ntw {
    prefix l3vpn-ntw;
    reference
      "RFC 9182: A YANG Network Data Model for Layer 3 VPNs";
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  description
    "This module contains a YANG module for the mapping of Layer 3
     VPNs network model to the TE and Virtual Network (VN).

     Copyright (c) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }

  /*
   * Augmentation to L3NM
   */

  augment "/l3vpn-ntw:l3vpn-ntw/l3vpn-ntw:vpn-services"
        + "/l3vpn-ntw:vpn-service" {
    description
      "L3SM augmented to include TE parameters and mapping";
    container te-service-mapping {
      presence "Indicates L3 network is relying on underlying TE";
      description
        "Container to augment l3nm to TE parameters and mapping.
         If no other parameters exist, it indicates that the
         underlying TE resources have not been mapped yet.";
      uses tsmt:te-mapping;
    }
  }

  augment "/l3vpn-ntw:l3vpn-ntw/l3vpn-ntw:vpn-services"
        + "/l3vpn-ntw:vpn-service"
        + "/l3vpn-ntw:vpn-nodes/l3vpn-ntw:vpn-node"
        + "/l3vpn-ntw:vpn-network-accesses"
        + "/l3vpn-ntw:vpn-network-access" {
    description
      "This augments the L3NM network-access with a reference
       to TE endpoints when underlying TE is used";
    uses tsmt:te-endpoint-ref;
  }
}

]]></sourcecode>
        </section>
        <section numbered="true" toc="default">
          <name>ietf-l2nm-te-service-mapping</name>
          <sourcecode name="ietf-l2nm-te-service-mapping@2024-10-20.yang" type="" markers="true"><![CDATA[
module ietf-l2nm-te-service-mapping {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-l2nm-te-service-mapping";
  prefix l2nm-tsm;

  import ietf-te-service-mapping-types {
    prefix tsmt;
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }
  import ietf-l2vpn-ntw {
    prefix l2vpn-ntw;
    reference
      "RFC 9291: A Layer 2 VPN Network YANG Model";
  }

  organization
    "IETF Traffic Engineering Architecture and Signaling (TEAS)
     Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/teas/>
     WG List:  <mailto:teas@ietf.org>

     Editor:   Young Lee
               <mailto:younglee.tx@gmail.com>
     Editor:   Dhruv Dhody
               <mailto:dhruv.ietf@gmail.com>
     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";
  description
    "This module contains a YANG module for the mapping of Layer 2
     Network Model (L2NM) to the TE and Virtual Network (VN).

     Copyright (c) 2024 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 Revised 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 2024-10-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX:  Traffic Engineering and Service Mapping Yang Data
       Model";
  }

  /*
   * Augmentation to L2NM
   */

  augment "/l2vpn-ntw:l2vpn-ntw/l2vpn-ntw:vpn-services"
        + "/l2vpn-ntw:vpn-service" {
    description
      "L2SM augmented to include TE parameters and mapping";
    container te-service-mapping {
      presence "Indicates L2 network is relying on underlying TE";
      description
        "Container to augment l2nm to TE parameters and mapping.
         If no other parameters exist, it indicates that the
         underlying TE resources have not been mapped yet.";
      uses tsmt:te-mapping;
    }
  }

  //augment

  augment "/l2vpn-ntw:l2vpn-ntw/l2vpn-ntw:vpn-services"
        + "/l2vpn-ntw:vpn-service"
        + "/l2vpn-ntw:vpn-nodes/l2vpn-ntw:vpn-node"
        + "/l2vpn-ntw:vpn-network-accesses"
        + "/l2vpn-ntw:vpn-network-access" {
    description
      "This augments the L2NM network-access with a reference
       to TE endpoints when underlying TE is used";
    uses tsmt:te-endpoint-ref;
  }

  //augment
}

]]></sourcecode>
        </section>
      </section>
    </section>
    <section anchor="sect-8" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The YANG modules defined in this document are designed to be accessed via
   network management protocols such as NETCONF <xref target="RFC6241" format="default"/>
   or RESTCONF <xref target="RFC8040" format="default"/>.  The lowest NETCONF layer is the secure
   transport layer and the mandatory-to-implement secure transport is
   SSH <xref target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS and the
   mandatory-to-implement secure transport is TLS <xref target="RFC8446" format="default"/></t>
      <t>The NETCONF access control model <xref target="RFC8341" format="default"/> provides
   the means to restrict access for particular NETCONF or RESTCONF users to a
   pre-configured subset of all available NETCONF or RESTCONF protocol
   operations and content.</t>
      <t>There are a number of data nodes defined in the YANG modules that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g.,  &lt;edit-config&gt;)
   to these data nodes without proper protection can have a negative
   effect on network operations. These are the subtrees and data nodes and
   their sensitivity/vulnerability:
      </t>
      <ul spacing="normal">
        <li>/l3vpn-svc/vpn-services/vpn-service/te-service-mapping/te-mapping/ - can configure TE Service mapping.</li>
        <li>/l3vpn-svc/sites/site/site-network-accesses/site-network-access/te/ - can configure TE Endpoint mapping.</li>
        <li>/l2vpn-svc/vpn-services/vpn-service/te-service-mapping/te-mapping/ - can configure TE Service mapping.</li>
        <li>/l2vpn-svc/sites/site/site-network-accesses/site-network-access/te/ - can configure TE Endpoint mapping.</li>
        <li>/l1-connectivity/services/service/te-service-mapping/te-mapping/ - can configure TE Service mapping.</li>
        <li>/l1-connectivity/access/unis/uni/te/ - can configure TE Endpoint mapping.</li>
        <li>/l3vpn-ntw/vpn-services/vpn-service/te-service-mapping/te-mapping/ - can configure TE Network mapping.</li>
        <li>/l3vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/vpn-network-accesses/vpn-network-access/te/ - can configure TE Endpoint mapping.</li>
        <li>/l2vpn-ntw/vpn-services/vpn-service/te-service-mapping/te-mapping/ - can configure TE Network mapping.</li>
        <li>/l2vpn-ntw/vpn-services/vpn-service/vpn-nodes/vpn-node/vpn-network-accesses/vpn-network-access/te/ - can configure TE Endpoint mapping.</li>
      </ul>
      <t>Unauthorized access to the above list can adversely affect the
   VPN service.</t>
      <t>Some of the readable data nodes in the YANG module may be considered
    sensitive or vulnerable in some network environments. It is thus important
    to control read access (e.g., via get, get-config, or notification) to
    these data nodes. The TE-related parameters attached to the VPN service can leak sensitive information about the network. This is applicable to all elements in the YANG data models defined in this document. </t>
      <t>This document has no RPC defined.</t>
    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document requests the IANA to register six URIs in the "IETF XML Registry"
    <xref target="RFC3688" format="default"/>.
   Following the format in RFC 3688, the following registrations are requested -
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[

URI: urn:ietf:params:xml:ns:yang:ietf-te-service-mapping-types
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

URI: urn:ietf:params:xml:ns:yang:ietf-l3sm-te-service-mapping
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

URI: urn:ietf:params:xml:ns:yang:ietf-l2sm-te-service-mapping
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

URI: urn:ietf:params:xml:ns:yang:ietf-l1csm-te-service-mapping
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

URI: urn:ietf:params:xml:ns:yang:ietf-l3nm-te-service-mapping
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

URI: urn:ietf:params:xml:ns:yang:ietf-l2nm-te-service-mapping
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.

        ]]></artwork>
      <t>This document request the IANA to register six YANG modules in the "YANG Module Names"
   registry <xref target="RFC6020" format="default"/>, as follows -
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
Name:      ietf-te-service-mapping-types
Namespace: urn:ietf:params:xml:ns:yang:ietf-te-service-mapping-types
Prefix:    tsmt
Reference: [This.I-D]

Name:      ietf-l3sm-te-service-mapping
Namespace: urn:ietf:params:xml:ns:yang:ietf-l3sm-te-service-mapping
Prefix:    l3-tsm
Reference: [This.I-D]

Name:      ietf-l2sm-te-service-mapping
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2sm-te-service-mapping
Prefix:    l2-tsm
Reference: [This.I-D]

Name:      ietf-l1csm-te-service-mapping
Namespace: urn:ietf:params:xml:ns:yang:ietf-l1csm-te-service-mapping
Prefix:    l1-tsm
Reference: [This.I-D]

Name:      ietf-l3nm-te-service-mapping
Namespace: urn:ietf:params:xml:ns:yang:ietf-l3nm-te-service-mapping
Prefix:    l3nm-tsm
Reference: [This.I-D]

Name:      ietf-l2nm-te-service-mapping
Namespace: urn:ietf:params:xml:ns:yang:ietf-l2nm-te-service-mapping
Prefix:    l2nm-tsm
Reference: [This.I-D]

        ]]></artwork>
    </section>
    <section anchor="sect-10" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
   We thank Diego Caviglia, and Igor Bryskin for useful discussions and
   motivation for this work.</t>
   <t>Thanks to Xufeng Liu for the YANGDOCTOR review.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7926.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8299.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8345.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8466.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9182.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-ccamp-l1csm-yang.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-teas-actn-vn-yang.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-teas-yang-te.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8776.xml"/>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9291.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8795.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-spring-sr-policy-yang.xml"/>
        <!--&RFC6991;
    &RFC2119;
    &RFC8174;-->

  </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8199.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8309.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8453.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-teas-actn-yang.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-dhody-teas-te-traffic-yang.xml"/>
      </references>
    </references>
    <section anchor="App1" numbered="true" toc="default">
      <name>Examples</name>
      <t>This section details a few examples of how the TE-service mapping is used in various scenarios.</t>
      <t>Example 1: An L3VPN service with optimization criteria for the underlying TE as delay can be set in the mapping template and then augmented to the L3SM service.  </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
{
  "ietf-te-service-mapping-types:te-mapping-templates": {
    "te-mapping-template": [
      {
        "id": "delay",
        "description": "delay-based template",
        "type": "select",
        "optimizations": {
          "optimization-metric": [
            {
              "metric-type": "ietf-te-types:path-metric-delay-average"
            }
          ]
        }
      }
    ]
  }
}
]]></artwork>
      <t>The L3SM service can map it to the existing least-delay TE resources in the form of VN or TE-tunnels.</t>
      <t>Example 2: An L2VPN service with a bandwidth constraint and a hop-limit criteria for the underlying TE can be set in the mapping template and then augmented to the L2SM service.  </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
   {
     "ietf-te-service-mapping-types:te-mapping-templates": {
       "te-mapping-template": [
         {
           "id": "bw-hop",
           "description": "Bandwidth and hop limit",
           "type": "new",
           "path-constraints": {
             "te-bandwidth": {
               "generic": "0x1p10"
             },
             "path-metric-bounds": {
               "path-metric-bound": [
                 {
                   "metric-type": "ietf-te-types:path-metric-hop",
                   "upper-bound": "10"
                 }
               ]
             }
           }
         }
       ]
     }
   }
]]></artwork>
      <t>The L2SM service can map it to a new TE resource in the form of a VN or TE-tunnels.</t>
      <t>Example 3: A VN (VN1) could be created beforehand and then explicitly mapped to the L2VPN service as shown below.</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
{
  "ietf-vn:virtual-network": {
    "vn": [
      {
        "vn-id": "VN1"
      }
    ]
  }
}
{
 "ietf-l2vpn-svc:vpn-services": {
  "vpn-service":[
   {
   	"vpn-id": "VPN1",
   	"ietf-l2sm-te-service-mapping:te-service-mapping":{
   	  "te-mapping":"select",
   	  "te":{
   	    "vn":"VN1"
   	  }
   	}
   }
  ]
 }
}
]]></artwork>
      <t>Example 4: A VPN service may want different optimization criteria for some of its sites. The template does not allow for such a case but it can be achieved by creating the TE resources separately and then mapping them to the service.</t>
    </section>
    <!--<section anchor="App2" numbered="true" toc="default">
      <name>Discussion</name>
      <ul spacing="normal">
        <li>While the support to bind a tunnel to the VPN is supported. We do not have a mechanism to map traffic to a path.  The input can come from the user. E.g. the enterprise customer can tell, the traffic from source X on port Y should go with delay less than Z. Further discussion is required on how and where to model these.</li>
        <li>Support for Calendaring and scheduling TE resources.</li>
      </ul>
    </section>-->
<section anchor="scope" numbered="true" toc="default">
      <name>Out of Scope</name>
   <t>Scheduling is currently out of scope, although an operator could
use their own scheduling mechanism on top of this YANG data model. In future
augmentations to this model might also be designed to integrate scheduling and calendaring.</t>
<t>Note that the mechanism to map traffic (for example the enterprise customer can tell, the traffic from source X on port Y should go on a path with a delay less than Z) can be via local configuration or through a YANG data model developed in the future (See one such attempt at <xref target="I-D.dhody-teas-te-traffic-yang"/>).</t>
    </section>
    <section anchor="sect-a" numbered="true" toc="default">
      <name>Contributor Addresses</name>
      <artwork name="" type="" align="left" alt=""><![CDATA[
Adrian Farrel
Old Dog Consulting

EMail: adrian@olddog.co.uk

Italo Busi
Huawei Technologies

EMail: Italo.Busi@huawei.com

Haomian Zheng
Huawei Technologies

EMail: zhenghaomian@huawei.com

Anton Snitser
Sedonasys

EMail: antons@sedonasys.com

SAMIER BARGUIL GIRALDO
Telefonica

EMail: samier.barguilgiraldo.ext@telefonica.com

Oscar Gonzalez de Dios
Telefonica

EMail: oscar.gonzalezdedios@telefonica.com

Carlo Perocchio
Ericsson

EMail: carlo.perocchio@ericsson.com

Kenichi Ogaki
KDDI
Email: ke-oogaki@kddi.com
]]></artwork>
    </section>
  </back>
</rfc>
