<?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" submissionType="IETF" docName="draft-ietf-teas-actn-pm-telemetry-autonomics-10" category="std" ipr="trust200902" obsoletes="" updates="" xml:lang="en" sortRefs="true" symRefs="true" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.9.0 -->
  <!-- Generated by id2xml 1.5.0 on 2019-10-30T04:53:44Z -->
	<front>
    <title abbrev="VN/TE Perf Monitoring">YANG models for Virtual Network (VN)/TE Performance Monitoring Telemetry and Scaling Intent Autonomics</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-teas-actn-pm-telemetry-autonomics-10"/>
    <author fullname="Young Lee" initials="Y" surname="Lee" role="editor">
      <organization>Samsung Electronics</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>
        <email>younglee.tx@gmail.com</email>
      </address>
    </author>
    <author initials="D" surname="Dhody" fullname="Dhruv Dhody" role="editor">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560066</code>
          <country>India</country>
        </postal>
        <email>dhruv.ietf@gmail.com</email>
      </address>
    </author>
    <!--<author initials="S" surname="Karunanithi" fullname="Satish Karunanithi">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560066</code>
          <country>India</country>
        </postal>
        <email>satish.karunanithi@gmail.com</email>
      </address>
    </author>-->
    <author fullname="Ricard Vilalta" initials="R" surname="Vilalta">
      <organization>CTTC</organization>
      <address>
        <postal>
          <street>Centre Tecnologic de Telecomunicacions de Catalunya (CTTC/CERCA)</street>
          <city>Barcelona</city>
          <region/>
          <code/>
          <country>Spain</country>
        </postal>
        <email>ricard.vilalta@cttc.es</email>
      </address>
    </author>
    <author fullname="Daniel King" initials="D" surname="King">
      <organization>Lancaster University</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country/>
        </postal>
        <email>d.king@lancaster.ac.uk</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>
    <date year="2023"/>
    <workgroup>TEAS Working Group</workgroup>
    <abstract>
      <t>
   This document provides YANG data models that describe performance
   monitoring parameters and scaling intent mechanisms for TE-tunnels and
   Virtual Networks (VNs). There performance monitoring parameters are exposed as the key telemetry data for tunnels and VN.</t>
      <t>
   The models presented in this document allow customers to subscribe to
   and monitor the key performance data of the TE-tunnel or the VN. The models also provide customers with the
   ability to program autonomic scaling intent mechanisms on the level
   of TE-tunnel as well as VN.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   The YANG <xref target="RFC7950" format="default"/> model in <xref target="I-D.ietf-teas-actn-vn-yang" format="default"/> is used to operate customer-driven
   Virtual Networks (VNs) during the computation of VN, its instantiation,
   and its life-cycle service management and operations. YANG model
   in <xref target="I-D.ietf-teas-yang-te" format="default"/> is used to operate TE-tunnels during the
   tunnel instantiation, and its life-cycle management and operations.</t>
      <t>
   The models presented in this draft allow the applications hosted by
   the customers to subscribe to and monitor their key performance data
   of their interest on the level of VN <xref target="I-D.ietf-teas-actn-vn-yang" format="default"/> or TE-tunnel <xref target="I-D.ietf-teas-yang-te" format="default"/>.
   The key characteristic of the models presented in this document is a
   top-down programmability that allows the applications hosted by the
   customers to subscribe to and monitor key performance data of their
   interest and autonomic scaling intent mechanism on the level of VN
   as well as TE-tunnel.</t>
      <t>
   According to the classification of <xref target="RFC8309" format="default"/>, the YANG data models
   presented in this document can be classified as customer service
   models. These can be mapped to the CMI (Customer Network Controller (CNC)-
   Multi-Domain Service Coordinator (MSDC) interface) of ACTN
   <xref target="RFC8453" format="default"/>.</t>
      <t>
   <xref target="RFC8233" format="default"/> describes key network performance data to be considered
   for end-to-end path computation in TE networks. The services provided can be
   optimized to meet the requirements (such as traffic patterns,
   quality, and reliability) of the applications hosted by the
   customers.</t>
      <t>
   This document provides YANG data models with performance monitoring parameters that can be subscribed to for monitoring and telemetry for
   any VN/TE-Tunnel via mechanism specified in <xref target="RFC8641" format="default"/>
   and <xref target="RFC8640" format="default"/>. It also provides an ability to program
   their customized automatic scaling in/out intent as well. These
   models can be utilized by a client network controller to initiate
   the capabilities via a NETCONF <xref target="RFC8341" format="default"/> or a RESTCONF
   <xref target="RFC8040" format="default"/> interface.</t>
      <t>
   The term 'Performance monitoring' in this document refers to
   subscription and publication of streaming telemetry data.
   Subscription is initiated by the client (e.g., CNC) while
   publication is provided by the network (e.g., MDSC/Provisioning Network Controller (PNC)) based on the
   client's subscription. As per <xref target="RFC7799" format="default"/>, this would be classified as a passive method. Note that the actual measurements might be done via any technique though. As the scope of performance monitoring in
   this document is augment the performance monitoring parameters (telemetry data) on the level of a client's VN or TE-tunnel, the entity interfacing to the client (e.g., MDSC) has to
   provide VN or TE-tunnel level information. This requires the controller to have the capability to derive VN or TE-tunnel level performance
   data based on lower-level data collected via PM counters in the
   Network Elements (NE). How the controller entity derives such
   customized level data (i.e., VN or TE-tunnel level) is out of the
   scope of this document.</t>
      <t>
   The data model includes configuration and state data according to
   the Network Management Datastore Architecture (NMDA) <xref target="RFC8342" format="default"/>.</t>
      <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>
   Key Performance Data: This refers to a set of data the customer is
   interested in monitoring for their instantiated VNs or TE-tunnels.
   Key performance data and key performance indicators are inter-
   exchangeable in this draft.</t>-->

	<t>
   Scaling: This refers to the network's ability to re-shape its own
   resources. "Scale out" refers to improve network performance by
   increasing the allocated resources, while "scale in" refers to
   decreasing the allocated resources, typically because the existing
   resources are unnecessary.</t>
        <t>
   Scaling Intent: Scaling intent is used to declare scaling conditions.
   Specifically, scaling intent refers to how the client programs or
   configures conditions that will be applied to their key performance
   data to trigger either scaling out or scaling in. Various conditions
   can be set for scaling intent on either VN or TE-tunnel level.</t>
        <t>
   Network Autonomics: This refers to the network automation capability
   that allows a client to initiate scaling intent mechanisms and
   provides the client with the status of the adjusted network
   resources based on the client's scaling intent in an automated
   fashion.</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>-->
	</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-4" format="default"/> and  <xref target="sect-6" format="default"/> of 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, 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">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">te-types</td>
              <td align="left">ietf-te-types</td>
              <td align="left">
                <xref target="RFC8776" format="default"/></td>
            </tr>
            <tr>
              <td align="left">rt-types</td>
              <td align="left">ietf-routing-types</td>
              <td align="left">
                <xref target="RFC8294" format="default"/></td>
            </tr>
            <tr>
              <td align="left">te-tel</td>
              <td align="left">ietf-te-telemetry</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">vn-tel</td>
              <td align="left">ietf-vn-telemetry</td>
              <td align="left">[RFCXXXX]</td>
            </tr>
          </tbody>
        </table>
        <t>
   Note: The RFC Editor is requested to replace XXXX with the number assigned to
   the RFC once this draft becomes an RFC, and to remove
   this note.</t>
        <t>Further, the following additional documents are referenced in the model defined in this document -
        </t>
        <ul spacing="normal">
          <li>
            <xref target="RFC7471" format="default"/> - OSPF Traffic Engineering (TE) Metric Extensions.</li>
          <li>
            <xref target="RFC8570" format="default"/> - IS-IS Traffic Engineering (TE) Metric Extensions.</li>
          <li>
            <xref target="RFC7823" format="default"/> - Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions.</li>
        </ul>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Use-Cases</name>
      <t>There is a need for real-time (or semi-real-time) traffic monitoring of the network to optimize the network and the traffic distribution. <xref target="workflows-for-dynamic-service-control-based-on-traffic-monitoring" format="default"/> shows the an example of a high-level work-flow
   for dynamic service control based on traffic monitoring that could use the mechanism described in this document.</t>
      <figure anchor="workflows-for-dynamic-service-control-based-on-traffic-monitoring">
        <name>Work flow for dynamic service control based on traffic monitoring</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
   +----------------------------------------------+
   | Client   +-----------------------------+     |
   |          | Dynamic Service Control APP |     |
   |          +-----------------------------+     |
   +----------------------------------------------+
   1.Traffic|  /|\4.Traffic            | /|\
   Monitor &|   | Monitor              |  | 8.Traffic
   Optimize |   | Result     5.Service |  | modify &
   Policy   |   |              modify &|  | optimize
           \|/  |        optimize Req.\|/ | result
   +----------------------------------------------+
   | Orchestrator                                 |
   |    +-------------------------------+         |
   |    |Dynamic Service Control Agent  |         |
   |    +-------------------------------+         |
   |    +---------------+ +-------------------+   |
   |    | Flow Optimize | | vConnection Agent |   |
   |    +---------------+ +-------------------+   |
   +----------------------------------------------+
   2. Path |   /|\3.Traffic            | /|\
   Monitor |    | Monitor              |  |7.Path
   Request |    | Result      6.Path   |  | modify &
           |    |             modify & |  | optimize
          \|/   |        optimize Req.\|/ | result
   +----------------------------------------------+
   | Network SDN Controller                       |
   |  +----------------------+ +-----------------+|
   |  | Network Provisioning | |Abstract Topology||
   |  +----------------------+ +-----------------+|
   |  +------------------+ +--------------------+ |
   |  |Network Monitoring| |Physical Topology DB| |
   |  +------------------+ +--------------------+ |
   +----------------------------------------------+

APP: Application
DB: Database
Req: Request
]]></artwork>
      </figure>
      <t>Some of the key points are as follows:
      </t>
      <ul spacing="normal">
        <li>
	Network traffic monitoring is important to facilitate automatic
        discovery of the imbalance of network traffic, and initiate
        network optimization, thus helping the network operator or the
        virtual network service provider to use the network more
        efficiently and save Capital Expense (CAPEX) and
        Operating Expense (OPEX).</li>
        <li>Customer services have various Service Level Agreement (SLA)
	      requirements, such as service availability, latency,
        jitter, packet loss rate, Bit Error Rate (BER), etc. The
        TE network can satisfy service availability and BER
        requirements by providing different protection and restoration
        mechanisms. However, for other SLA requirements (like latency), there
        are no such mechanisms. In order to provide high quality
        services according to the customer SLA, one possible solution is to
        measure the SLA related performance parameters, and dynamically
        provision and optimize services based on the performance
        monitoring results.
	</li>
        <li>Performance monitoring in a large scale network could generate
	a huge amount of performance information. Therefore, the
        appropriate way to deliver the information at the client and
        network interfaces should be carefully considered.
	</li>
      </ul>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Design of the Data Models</name>
      <t>
   This document describes two YANG models:</t>
      <dl newline="false" spacing="normal" indent="7">
        <dt>(i)</dt>
        <dd>
          <t>
	TE Telemetry Model which provides the TE-Tunnel level of
          </t>
          <t>
	performance monitoring mechanism and scaling intent mechanism
          that allows scale in/out programming by the customer. (See
          <xref target="sect-3.1" format="default"/> &amp; <xref target="sect-7.1" format="default"/> for details).
          </t>
        </dd>
        <dt>(ii)</dt>
        <dd>
          <t>
	VN Telemetry Model which provides the VN level of the
          </t>
          <t>
	aggregated performance monitoring mechanism and scaling
          intent mechanism that allows scale in/out programming by the
          customer (See <xref target="sect-3.2" format="default"/> &amp; <xref target="sect-7.2" format="default"/> for details).
          </t>
        </dd>
      </dl>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>TE Telemetry Model</name>
        <t>
   This model describes the performance telemetry for the TE tunnel. The
   telemetry data is augmented to the TE tunnel.  This model also
   allows autonomic traffic engineering scaling intent configuration
   mechanism on the TE-tunnel level. Various conditions can be set for
   auto-scaling based on the telemetry data (See <xref target="sect-5" format="default"/> for details)</t>
        <t>
   As shown in <xref target="TE-Telemetry-Model-Relationship" format="default"/>, the TE Telemetry Model augments the TE-Tunnel Model to enhance
   TE performance monitoring capability. This monitoring capability
   will facilitate re-optimization and reconfiguration of TE tunnels
   based on the performance monitoring data collected via the TE
   Telemetry YANG model.</t>
        <figure anchor="TE-Telemetry-Model-Relationship">
          <name>TE Telemetry Model Relationship</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
             +------------+          +--------------+
             |  TE-Tunnel |          |      TE      |
             |   Model    |<---------|  Telemetry   |
             +------------+ augments |     Model    |
                                     +--------------+
]]></artwork>
        </figure>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>VN Telemetry Model</name>
        <t>
   As shown in <xref target="VN-Telemetry-Model-Relationships" format="default"/>, the VN Telemetry Model augments the basic VN model to enhance VN
   monitoring capability. This monitoring capability will facilitate
   re-optimization and reconfiguration of VNs based on the
   performance monitoring data collected via the VN Telemetry YANG
   model. This model also imports TE telemetry model to reuse the
   groupings.</t>
        <figure anchor="VN-Telemetry-Model-Relationships">
          <name>VN Telemetry Model Relationships</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
             +----------+          +--------------+
             |    VN    | augments |      VN      |
             |   Model  |<---------|   Telemetry  |
             +----------+          |     Model    |
                                   +--------------+
                                          |
                                          | imports
                                          v
                                   +--------------+
                                   |      TE      |
                                   |   Telemetry  |
                                   |     Model    |
                                   +--------------+
]]></artwork>
        </figure>
        <t>

   This model describes the performance telemetry for the VN model. The
   telemetry data is augmented to the VN model at the VN Level as well as
   at the individual VN member level. This model also allows autonomic
   traffic engineering scaling intent configuration mechanism on the VN
   level. Scale in/out criteria might be used for network autonomics in
   order for the controller to react to a certain set of variations in
   monitored parameters (See <xref target="sect-4" format="default"/> for illustrations).</t>
        <t>
   Moreover, this model also provides a mechanism to define aggregated VN
   telemetry parameters as a grouping of underlying VN-member level telemetry
   parameters. This is unique to the VN model as a VN is made up of multiple
   VN-members and further each VN-member could be set across multiple TE tunnels.
   Grouping operation (such as maximum, mean) could be set
   at the time of configuration. For example, if "maximum" grouping
   operation is used for delay at the VN level, the VN telemetry data
   is reported as the maximum of {delay_vn_member_1, delay_vn_member_2,..
   delay_vn_member_N}. Thus, this telemetry aggregation mechanism
   allows the aggregation (or grouping) of a certain common set of telemetry values
   under a grouping operation. This can also be done at the VN-member level
   to suggest how the end-to-end (E2E) telemetry be inferred from the per domain
   tunnels created and monitored by PNCs. The <xref target="TE-Telemetry-Model-Interactions" format="default"/> provides an example interaction. </t>
        <figure anchor="TE-Telemetry-Model-Interactions">
          <name>TE Telemetry Model Interactions</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
  +------------------------------------------------------------+
  |                      Client                                |
  |                                                            |
  +------------------------------------------------------------+
  1.Client sets the      |   /|\   2. Orchestrator pushes:
  grouping op, and       |    |
  subscribes to the      |    |    VN level telemetry for
  VN level telemetry for |    |    - VN Utilized-bw-percentage
  Delay and              |    |       (Minimum across VN Members)
  Utilized-bw-pecentage  |    |    - VN Delay (Maximum across VN
                        \|/   |     Members)
   +------------------------------------------------------------+
   | Orchestrator                                               |
   |                                                            |
   +------------------------------------------------------------+
]]></artwork>
        </figure>
      </section>
      <section anchor="sect-3.3" numbered="true" toc="default">
        <name>VPN Service Performance Monitoring</name>
        <t>The YANG model in <xref target="I-D.ietf-opsawg-yang-vpn-service-pm"/>
        provides network performance monitoring (PM) and VPN service performance
   monitoring that can be used to monitor and manage network performance
   on the topology at higher layer or the service topology between VPN
   sites. Thus the YANG models in this document could be used along side with ietf-network-vpn-pm to understand and correlate the performance monitoring at the VPN service and the underlying TE level.</t></section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Autonomic Scaling Intent Mechanism</name>
      <t>
   The scaling intent configuration mechanism allows the client to
   configure automatic scale-in and scale-out mechanisms on both the
   TE-tunnel and the VN level. Various conditions can be set for auto-scaling based on the PM telemetry data.</t>
      <t>There are a number of parameters involved in the mechanism:
      </t>
      <ul spacing="normal">
        <li>scale-out-intent or scale-in-intent: whether to scale-out or
        scale-in.</li>
        <li>performance-type: performance metric type (e.g., one-way-delay,
        one-way-delay-min, one-way-delay-max, two-way-delay, two-way-
        delay-min, two-way-delay-max, utilized bandwidth, etc.)</li>
        <li>threshold-value: the threshold value for a certain performance-type that triggers scale-in or scale-out.</li>
        <li>scaling-operation-type: in case where scaling condition can be
	set with one or more performance types, then scaling-operation-type (AND, OR, MIN, MAX, etc.) is applied to these selected
        performance types and its threshold values.</li>
        <li>Threshold-time: the duration for which the criteria needs to hold
	true.</li>
        <li>Cooldown-time: the duration after a scaling action has been
	triggered, for which there will be no further operation.</li>
      </ul>
      <t>
   The tree in <xref target="The-scaling-intent" format="default"/> is a part of ietf-te-telemetry tree whose
   model is presented in full detail in Sections 6 &amp; 7.</t>
      <figure anchor="The-scaling-intent">
        <name>The scaling intent</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
module: ietf-te-telemetry

  augment /te:te/te:tunnels/te:tunnel:
    +--rw te-scaling-intent
    |  +--rw scale-in-intent
    |  |  +--rw threshold-time?      uint32
    |  |  +--rw cooldown-time?       uint32
    |  |  +--rw scaling-condition* [performance-type]
    |  |  |  +--rw performance-type           identityref
    |  |  |  +--rw threshold-value?           scale-value
    |  |  |  +--rw scale-in-operation-type?
    |  |  |          scaling-criteria-operation
    |  |  +--rw scale-in-op?         scale-op
    |  |  +--rw scale?               scale-value
    |  +--rw scale-out-intent
    |     +--rw threshold-time?      uint32
    |     +--rw cooldown-time?       uint32
    |     +--rw scaling-condition* [performance-type]
    |     |  +--rw performance-type            identityref
    |     |  +--rw threshold-value?            scale-value
    |     |  +--rw scale-out-operation-type?
    |     |          scaling-criteria-operation
    |     +--rw scale-out-op?        scale-op
    |     +--rw scale?               scale-value
]]></artwork>
      </figure>
      <t>
   Let's say the client wants to set the scaling out operation based on
   two performance-types (e.g., two-way-delay and utilized-bandwidth
   for a te-tunnel), it can be done as follows:

      </t>
      <ul spacing="normal">
        <li>Set Threshold-time: x (sec) (duration for which the criteria must hold true)</li>
        <li>Set Cooldown-time:	y (sec) (the duration after a scaling action has been triggered, for which there will be no further operation)
	</li>
        <li>Set AND for the scale-out-operation-type	</li>
      </ul>
      <t>
   In the scaling condition's list, the following two components can be
   set:</t>
      <t>List 1: Scaling Condition for Two-way-delay
      </t>
      <ul spacing="normal">
        <li>performance type: Two-way-delay</li>
        <li>threshold-value: z milli-seconds</li>
      </ul>
      <t>List 2: Scaling Condition for Utilized bandwidth
      </t>
      <ul spacing="normal">
        <li>performance type: Utilized bandwidth</li>
        <li>threshold-value: w megabytes</li>
      </ul>
      <t>Refer <xref target="sect-scale"/> for some examples of scaling intent.</t>
    </section>
        <section anchor="sect-perf" numbered="true" toc="default">
      <name>Performance Monitoring Parameters</name>
      <t>This model augments Tunnel model to include performance parameters from the grouping performance-metrics-attributes from te-types <xref target="RFC8776" format="default"/>:</t>
        <ul spacing="normal">
          <li>one-way-delay</li>
          <li>one-way-delay-normality</li>
          <li>one-way-residual-bandwidth</li>
          <li>one-way-residual-bandwidth-normality</li>
          <li>one-way-available-bandwidth</li>
          <li>one-way-available-bandwidth-normality</li>
          <li>one-way-utilized-bandwidth</li>
          <li>one-way-utilized-bandwidth-normality</li>
          <li>two-way-delay</li>
          <li>two-way-delay-normality</li>
       </ul>

        <figure anchor="Perf">
          <name>Performance Monitoring Parameters</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    +--ro te-telemetry
       +--ro performance-metrics-one-way
       |  +--ro one-way-delay?                           uint32
       |  +--ro one-way-delay-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-residual-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-residual-bandwidth-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-available-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-available-bandwidth-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-utilized-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-utilized-bandwidth-normality?
       |          te-types:performance-metrics-normality
       +--ro performance-metrics-two-way
          +--ro two-way-delay?             uint32
          +--ro two-way-delay-normality?
                  te-types:performance-metrics-normality
                ]]></artwork>
        </figure>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Notification</name>
      <t>
   This model does not define specific notifications.  To enable
   notifications, the mechanism defined in <xref target="RFC8641" format="default"/>
   and <xref target="RFC8640" format="default"/> can be used.  This mechanism currently
   allows the user to:
      </t>
      <ul spacing="normal">
        <li>Subscribe to notifications on a per client basis.</li>
        <li>Specify subtree filters or xpath filters so that only interested
      contents will be sent.</li>
        <li>Specify either periodic or on-demand notifications.</li>
      </ul>
      <section anchor="sect-5.1" numbered="true" toc="default">
        <name>YANG Push Subscription Examples</name>
        <t>
   <xref target="RFC8641" format="default"/> allows subscriber applications to request a continuous,
   customized stream of updates from a YANG datastore.</t>
        <t>
   The example in <xref target="TE-Tunnel-Subscription-Example" format="default"/> shows the way for a client to subscribe to the
   telemetry information for a particular tunnel (Tunnel1). The
   telemetry parameter that the client is interested in is one-way-
   delay.</t>
        <figure anchor="TE-Tunnel-Subscription-Example">
          <name>TE Tunnel Subscription Example</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<netconf:rpc netconf:message-id="101"
    xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
    <establish-subscription
       xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
       <filter netconf:type="subtree">
          <te xmlns="urn:ietf:params:xml:ns:yang:ietf-te">
             <tunnels>
                <tunnel>
                  <name>Tunnel1</name>
                    <te-telemetry xmlns="urn:ietf:params:xml:ns:yang:
                                         ietf-te-telemetry">
                        <performance-metrics-one-way>
                           <one-way-delay/>
                        </performance-metrics-one-way>
                     </te-telemetry>
                  </tunnel>
              </tunnels>
          </te>
       </filter>
       <period>500</period>
       <encoding>encode-xml</encoding>
    </establish-subscription>
 </netconf:rpc>
]]></artwork>
        </figure>
        <t>
   The example in <xref target="VN-Tunnel-Subscription-Example" format="default"/> shows the way for a client to subscribe to the
   telemetry information for all VNs. The telemetry parameter that the
   client is interested in is one-way-delay and one-way-utilized-
   bandwidth.</t>
        <figure anchor="VN-Tunnel-Subscription-Example">
          <name>VN Subscription Example</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<netconf:rpc netconf:message-id="101"
    xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
  <establish-subscription
     xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push:1.0">
     <filter netconf:type="subtree">
        <virtual-network xmlns="urn:ietf:params:xml:ns:yang:ietf-vn">
           <vn>
                <vn-id/>
                <vn-telemetry xmlns="urn:ietf:params:xml:ns:yang:
                                      ietf-vn-telemetry">
                  <params>
                    <performance-metrics-one-way>
                      <one-way-delay/>
                      <one-way-utilized-bandwidth/>
                    </performance-metrics-one-way>
                  </params>
                </vn-telemetry>
            </vn>
        </virtual-network>
     </filter>
     <period>500</period>
  </establish-subscription>
</netconf:rpc>
]]></artwork>
        </figure>
      </section>
    </section>
      <section anchor="sect-scale" numbered="true" toc="default">
        <name>Scaling Examples</name>
        <t>
   The example in <xref target="TE-Tunnel-Scaling-Example" format="default"/> shows the way to configure a TE tunnel with the
   scaling-out intent to re-optimize
   when the the scaling condition of two-way-delay crossing 100 milliseconds (100000 microseconds)
   for a threshold of 1 min (60 seconds).</t>
        <figure anchor="TE-Tunnel-Scaling-Example">
          <name>TE Tunnel Scaling Example</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <target>
     <running/>
   </target>
   <config>
     <te xmlns="urn:ietf:params:xml:ns:yang:ietf-te">
         <tunnels>
            <tunnel>
              <name>Tunnel1</name>
                <te-scaling-intent
                  xmlns="urn:ietf:params:xml:ns:yang:
                         ietf-te-telemetry">
                    <scale-out-intent>
                       <threshold-time>
                        60
                      </threshold-time>
                      <scaling-condition>
                        <performance-type>
                          two-way-delay
                        </performance-type>
                        <threshold-value>
                          100000
                        </threshold-value>
                      </scaling-condition>
                    </scale-out-intent>
                 </te-scaling-intent>
              </tunnel>
          </tunnels>
     </te>
   </config>
</edit-config>
]]></artwork>
        </figure>
        <t>
   The example in <xref target="VN-Tunnel-Scaling-Example" format="default"/> shows the way to configure a VN with the
   scaling-in intent to reduce bandwidth
   when the the scaling condition of utilized-percentage crossing 50 percent for a threshold of 5 minutes (300 seconds).</t>
        <figure anchor="VN-Tunnel-Scaling-Example">
          <name>VN Scaling Example</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <target>
     <running/>
   </target>
   <config>
     <virtual-network xmlns="urn:ietf:params:xml:ns:yang:ietf-vn">
          <vn>
              <vn-id>VN1</vn-id>
                <vn-scaling-intent
                  xmlns="urn:ietf:params:xml:ns:yang:
                         ietf-vn-telemetry">
                    <scale-in-intent>
                      <threshold-time>300</threshold-time>
                      <scaling-condition>
                        <performance-type>
                          utilized-percentage
                        </performance-type>
                        <threshold-value>
                          50
                        </threshold-value>
                      </scaling-condition>
                    </scale-in-intent>
              </vn-scaling-intent>
          </vn>
     </virtual-network>
   </config>
</edit-config>
]]></artwork>
        </figure>


 <t>
   The example in <xref target="VN-Tunnel-Scaling-Example2" format="default"/> shows the way to configure a VN with the
   scaling-in when the the scaling condition of one-way-delay-variation crossing 100 milliseconds (100000 microseconds) OR one-way-delay crossing 50 milliseconds (50000 microseconds) for a threshold of 2 minutes (120 seconds).</t>
        <figure anchor="VN-Tunnel-Scaling-Example2">
          <name>VN Scaling Example with OR condition</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <target>
     <running/>
   </target>
   <config>
     <virtual-network xmlns="urn:ietf:params:xml:ns:yang:ietf-vn">
          <vn>
              <vn-id>VN2</vn-id>
                <vn-scaling-intent
                  xmlns="urn:ietf:params:xml:ns:yang:
                         ietf-vn-telemetry">
                    <scale-in-intent>
                      <threshold-time>120</threshold-time>
                      <scaling-condition>
                        <performance-type>
                          one-way-delay-variation
                        </performance-type>
                        <threshold-value>
                          100000
                        </threshold-value>
                        <scale-in-operation-type>
                          OR
                        </scale-in-operation-type>
                      </scaling-condition>
                      <scaling-condition>
                        <performance-type>
                          one-way-delay
                        </performance-type>
                        <threshold-value>
                          50000
                        </threshold-value>
                        <scale-in-operation-type>
                          OR
                        </scale-in-operation-type>
                      </scaling-condition>
                    </scale-in-intent>
              </vn-scaling-intent>
          </vn>
     </virtual-network>
   </config>
</edit-config>
]]></artwork>
        </figure>



        <t>
   The example in <xref target="VN-Grouping-Operation-Example" format="default"/> shows the way to configure a grouping operation at the VN level to require that the VN level one-way-delay needs to be the reported as the max of the one-way-delay at the VN-member level, where as the utilized-percentage is the mean.</t>
        <figure anchor="VN-Grouping-Operation-Example">
          <name>VN Grouping Operation Example</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
   <target>
     <running/>
   </target>
   <config>
     <virtual-network xmlns="urn:ietf:params:xml:ns:yang:ietf-vn">
          <vn>
              <vn-id>VN1</vn-id>
              <vn-telemetry
                xmlns="urn:ietf:params:xml:ns:yang:
                       ietf-vn-telemetry">
                <operation>
                  <performance-type>
                    one-way-delay
                  </performance-type>
                  <grouping-operation>
                    maximum
                  </grouping-operation>
                </operation>
                <operation>
                  <performance-type>
                    utilized-percentage
                  </performance-type>
                  <grouping-operation>
                    mean
                  </grouping-operation>
                </operation>
              </vn-telemetry>
          </vn>
     </virtual-network>
   </config>
</edit-config>
]]></artwork>
        </figure>

    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>YANG Data Tree</name>
      <figure anchor="model-1">
        <name>ietf-te-telemetry YANG model tree</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[


module: ietf-te-telemetry

  augment /te:te/te:tunnels/te:tunnel:
    +--rw te-scaling-intent
    |  +--rw scale-in-intent
    |  |  +--rw threshold-time?      uint32
    |  |  +--rw cooldown-time?       uint32
    |  |  +--rw scaling-condition* [performance-type]
    |  |  |  +--rw performance-type           identityref
    |  |  |  +--rw threshold-value?           scale-value
    |  |  |  +--rw scale-in-operation-type?
    |  |  |          scaling-criteria-operation
    |  |  +--rw scale-in-op?         scale-op
    |  |  +--rw scale?               scale-value
    |  +--rw scale-out-intent
    |     +--rw threshold-time?      uint32
    |     +--rw cooldown-time?       uint32
    |     +--rw scaling-condition* [performance-type]
    |     |  +--rw performance-type            identityref
    |     |  +--rw threshold-value?            scale-value
    |     |  +--rw scale-out-operation-type?
    |     |          scaling-criteria-operation
    |     +--rw scale-out-op?        scale-op
    |     +--rw scale?               scale-value
    +--ro te-telemetry
       +--ro performance-metrics-one-way
       |  +--ro one-way-delay?                           uint32
       |  +--ro one-way-delay-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-residual-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-residual-bandwidth-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-available-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-available-bandwidth-normality?
       |  |       te-types:performance-metrics-normality
       |  +--ro one-way-utilized-bandwidth?
       |  |       rt-types:bandwidth-ieee-float32
       |  +--ro one-way-utilized-bandwidth-normality?
       |          te-types:performance-metrics-normality
       +--ro performance-metrics-two-way
          +--ro two-way-delay?             uint32
          +--ro two-way-delay-normality?
                  te-types:performance-metrics-normality

]]></artwork>
      </figure>
      <figure anchor="model-2">
        <name>ietf-vn-telemetry YANG model tree</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[

module: ietf-vn-telemetry

  augment /vn:virtual-network/vn:vn:
    +--rw vn-scaling-intent
    |  +--rw scale-in-intent
    |  |  +--rw threshold-time?      uint32
    |  |  +--rw cooldown-time?       uint32
    |  |  +--rw scaling-condition* [performance-type]
    |  |  |  +--rw performance-type           identityref
    |  |  |  +--rw threshold-value?           scale-value
    |  |  |  +--rw scale-in-operation-type?
    |  |  |          scaling-criteria-operation
    |  |  +--rw scale-in-op?         scale-op
    |  |  +--rw scale?               scale-value
    |  +--rw scale-out-intent
    |     +--rw threshold-time?      uint32
    |     +--rw cooldown-time?       uint32
    |     +--rw scaling-condition* [performance-type]
    |     |  +--rw performance-type            identityref
    |     |  +--rw threshold-value?            scale-value
    |     |  +--rw scale-out-operation-type?
    |     |          scaling-criteria-operation
    |     +--rw scale-out-op?        scale-op
    |     +--rw scale?               scale-value
    +--rw vn-telemetry
       +--ro params
       |  +--ro performance-metrics-one-way
       |  |  +--ro one-way-delay?                           uint32
       |  |  +--ro one-way-delay-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-residual-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-residual-bandwidth-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-available-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-available-bandwidth-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-utilized-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-utilized-bandwidth-normality?
       |  |          te-types:performance-metrics-normality
       |  +--ro performance-metrics-two-way
       |     +--ro two-way-delay?             uint32
       |     +--ro two-way-delay-normality?
       |             te-types:performance-metrics-normality
       +--rw operation* [performance-type]
          +--rw performance-type      identityref
          +--rw grouping-operation?   identityref
  augment /vn:virtual-network/vn:vn/vn:vn-member:
    +--rw vn-member-telemetry
       +--ro params
       |  +--ro performance-metrics-one-way
       |  |  +--ro one-way-delay?                           uint32
       |  |  +--ro one-way-delay-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-residual-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-residual-bandwidth-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-available-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-available-bandwidth-normality?
       |  |  |       te-types:performance-metrics-normality
       |  |  +--ro one-way-utilized-bandwidth?
       |  |  |       rt-types:bandwidth-ieee-float32
       |  |  +--ro one-way-utilized-bandwidth-normality?
       |  |          te-types:performance-metrics-normality
       |  +--ro performance-metrics-two-way
       |  |  +--ro two-way-delay?             uint32
       |  |  +--ro two-way-delay-normality?
       |  |          te-types:performance-metrics-normality
       |  +--ro te-tunnel-ref*
       |          -> /te:te/tunnels/tunnel/name
       +--rw operation* [performance-type]
          +--rw performance-type      identityref
          +--rw grouping-operation?   identityref

]]></artwork>
      </figure>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>YANG Data Model</name>
      <section anchor="sect-7.1" numbered="true" toc="default">
        <name>ietf-te-telemetry model</name>
        <t>
   The YANG code is as follows:</t>
        <sourcecode name="ietf-te-telemetry@2023-03-10.yang" type="" markers="true"><![CDATA[
module ietf-te-telemetry {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-te-telemetry";
  prefix te-tel;

  /* Import TE */

  import ietf-te {
    prefix te;
    reference
      "I-D.ietf-teas-yang-te: A YANG Data Model for Traffic
       Engineering Tunnels and Interfaces";
  }

  /* Import TE Common types */

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

  /* Import Routing Common types */

  import ietf-routing-types {
    prefix rt-types;
    reference
      "RFC 8294: Common YANG Data Types for the Routing Area";
  }

  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 <younglee.tx@gmail.com>
              Dhruv Dhody <dhruv.ietf@gmail.com>";
  description
    "This module describes YANG data model for performance
     monitoring parameters (telemetry data) for TE tunnels.

     Copyright (c) 2023 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.";

  /* Note: The RFC Editor will replace XXXX with the number
     assigned to the RFC once draft-ietf-teas-pm-telemetry-
     autonomics becomes an RFC.*/

  revision 2023-03-10 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: YANG models for VN/TE Performance Monitoring
       Telemetry and Scaling Intent Autonomics";
  }

  identity telemetry-param-type {
    description
      "Base identity for telemetry param types";
  }

  identity one-way-delay {
    base telemetry-param-type;
    description
      "To specify average Delay in one (forward) direction
       in microseconds.

       At the VN level, it is the max delay of the VN-members.

       The threshold-value for this type is interpreted as
       microseconds.";
    reference
      "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions.
       RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions.
       RFC 7823: Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions";
  }

  identity two-way-delay {
    base telemetry-param-type;
    description
      "To specify average Delay in both (forward and reverse)
       directions in microseconds.

       At the VN level, it is the max delay of the VN-members.

       The threshold-value for this type is interpreted as
       microseconds.";
    reference
      "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions.
       RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions.
       RFC 7823: Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions";
  }

  identity one-way-delay-variation {
    base telemetry-param-type;
    description
      "To specify average Delay Variation in one (forward) direction
       in microseconds.

       At the VN level, it is the max delay variation of the
       VN-members.

       The threshold-value for this type is interpreted as
       microseconds.";
    reference
      "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions.
       RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions.
       RFC 7823: Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions";
  }

  identity two-way-delay-variation {
    base telemetry-param-type;
    description
      "To specify average Delay Variation in both (forward and
       reverse) directions in microseconds.

       At the VN level, it is the max delay variation of the
       VN-members.

       The threshold-value for this type is interpreted as
       microseconds.";
    reference
      "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions.
       RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions.
       RFC 7823: Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions";
  }

  identity utilized-bandwidth {
    base telemetry-param-type;
    description
      "To specify utilized bandwidth over the specified source
       and destination in bytes per second.

       The threshold-value for this type is interpreted as
       bytes per second.";
    reference
      "RFC 7471: OSPF Traffic Engineering (TE) Metric Extensions.
       RFC 8570: IS-IS Traffic Engineering (TE) Metric Extensions.
       RFC 7823: Performance-Based Path Selection for Explicitly
       Routed Label Switched Paths (LSPs) Using TE Metric
       Extensions";
  }

  identity utilized-percentage {
    base telemetry-param-type;
    description
      "To specify utilization percentage of the entity
       (e.g., tunnel, link, etc.)";
  }

  /* Typedef */

  typedef scale-op {
    type enumeration {
      enum UP {
        description
          "Scale up the bandwidth capacity";
      }
      enum DOWN {
        description
          "Scale down the bandwidth capacity";
      }
    }
    description
      "Scaling operation";
  }

  typedef scaling-criteria-operation {
    type enumeration {
      enum AND {
        description
          "AND operation";
      }
      enum OR {
        description
          "OR operation";
      }
    }
    description
      "Operations to analyze list of scaling criteria";
  }

  typedef scale-value {
    type union {
      type uint32;
      type rt-types:bandwidth-ieee-float32;
      type rt-types:percentage;
      type te-types:te-bandwidth;
    }
    description
      "Union of scale values of various types";
  }

  grouping scaling-duration {
    description
      "Base scaling criteria durations";
    leaf threshold-time {
      type uint32;
      units "seconds";
      description
        "The duration for which the criteria must hold true. The
         value of '0' indicates an immediate scaling with no
         duration to wait.";
    }
    leaf cooldown-time {
      type uint32;
      units "seconds";
      description
        "The duration after a scaling-in/scaling-out action has been
         triggered, for which there will be no further operation.
         The value of '0' indicates an immediate scaling action with
         no duration to wait.";
    }
  }

  grouping scaling-criteria {
    description
      "Grouping for scaling criteria";
    leaf performance-type {
      type identityref {
        base telemetry-param-type;
      }
      description
        "Reference to the tunnel level telemetry type";
    }
    leaf threshold-value {
      type scale-value;
      description
        "Scaling threshold for the telemetry parameter type. The
         value is it be interpreted as per the type.";
    }
  }

  grouping scaling-in-intent {
    description
      "Basic scaling in intent";
    uses scaling-duration;
    list scaling-condition {
      key "performance-type";
      description
        "Scaling conditions";
      uses scaling-criteria;
      leaf scale-in-operation-type {
        type scaling-criteria-operation;
        default "AND";
        description
          "Operation to be applied to check between scaling criteria
           to check if the scale in threshold condition has been met.
           Defaults to AND";
      }
    }
    leaf scale-in-op {
      type scale-op;
      default "DOWN";
      description
        "The scaling operation to be performed when scaling condition
         is met";
    }
    leaf scale {
      type scale-value;
      description
        "Additional scaling-by information to be interpreted as per
         the scale-in-op.";
    }
  }

  grouping scaling-out-intent {
    description
      "Basic scaling out intent";
    uses scaling-duration;
    list scaling-condition {
      key "performance-type";
      description
        "Scaling conditions";
      uses scaling-criteria;
      leaf scale-out-operation-type {
        type scaling-criteria-operation;
        default "OR";
        description
          "Operation to be applied to check between scaling criteria
           to check if the scale out threshold condition has been met.
           Defauls to OR";
      }
    }
    leaf scale-out-op {
      type scale-op;
      default "UP";
      description
        "The scaling operation to be performed when scaling condition
         is met";
    }
    leaf scale {
      type scale-value;
      description
        "Additional scaling-by information to be interpreted as per
         the scale-out-op.";
    }
  }

  augment "/te:te/te:tunnels/te:tunnel" {
    description
      "Augmentation parameters for config scaling-criteria TE
       tunnel topologies. Scale in/out criteria might be used
       for network autonomics in order the controller to react
       to a certain set of monitored params.";
    container te-scaling-intent {
      description
        "The scaling intent";
      container scale-in-intent {
        description
          "scale-in";
        uses scaling-in-intent;
      }
      container scale-out-intent {
        description
          "scale-out";
        uses scaling-out-intent;
      }
    }
    container te-telemetry {
      config false;
      description
        "Telemetry Data";
      uses te-types:performance-metrics-attributes;
    }
  }
}

]]></sourcecode>
      </section>
      <section anchor="sect-7.2" numbered="true" toc="default">
        <name>ietf-vn-telemetry model</name>
        <t>
   The YANG code is as follows:</t>
        <sourcecode name="ietf-vn-telemetry@2023-03-10.yang" type="" markers="true"><![CDATA[
module ietf-vn-telemetry {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-vn-telemetry";
  prefix vn-tel;

  /* Import VN */

  import ietf-vn {
    prefix vn;
    reference
      "I-D.ietf-teas-actn-vn-yang: A YANG Data Model for VN
       Operation";
  }

  /* Import TE */

  import ietf-te {
    prefix te;
    reference
      "I-D.ietf-teas-yang-te: A YANG Data Model for Traffic
       Engineering Tunnels and Interfaces";
  }

  /* Import TE Common types */

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

  /* Import TE Telemetry */

  import ietf-te-telemetry {
    prefix te-tel;
    reference
      "RFC XXXX: YANG models for VN/TE Performance Monitoring
       Telemetry and Scaling Intent Autonomics";
  }

  /* Note: The RFC Editor will replace XXXX with the number
     assigned to this draft.*/

  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 <younglee.tx@gmail.com>
              Dhruv Dhody <dhruv.ietf@gmail.com>";
  description
    "This module describes YANG data models for performance
     monitoring parameters (telemetry data) for Virtual Network
     (VN).

     Copyright (c) 2023 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.";

  /* Note: The RFC Editor will replace XXXX with the number
     assigned to the RFC once draft-lee-teas-pm-telemetry-
     autonomics becomes an RFC.*/

  revision 2023-03-10 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: YANG models for VN/TE Performance Monitoring
       Telemetry and Scaling Intent Autonomics";
  }

  identity grouping-op {
    description
      "Base identity for grouping-operation";
  }

  identity minimum {
    base grouping-op;
    description
      "Select the minimum of the monitored parameters";
  }

  identity maximum {
    base grouping-op;
    description
      "The maximum of the monitored parameters";
  }

  identity mean {
    base grouping-op;
    description
      "The mean of the monitored parameters";
  }

  identity standard-deviation {
    base grouping-op;
    description
      "The standard deviation of the monitored parameters";
  }

  identity sum {
    base grouping-op;
    description
      "The sum of the monitored parameters";
  }

  identity and {
    base grouping-op;
    description
      "Logical AND operation";
  }

  identity or {
    base grouping-op;
    description
      "Logical OR operation";
  }

  grouping grouping-operation {
    list operation {
      key "performance-type";
      leaf performance-type {
        type identityref {
          base te-tel:telemetry-param-type;
        }
        description
          "Reference to the tunnel level telemetry type";
      }
      leaf grouping-operation {
        type identityref {
          base grouping-op;
        }
        description
          "describes the operation to apply to the underlying
           TE tunnels";
      }
      description
        "Grouping operation for each performance-type";
    }
    description
      "Grouping operation for each performance-type";
  }

  augment "/vn:virtual-network/vn:vn" {
    description
      "Augmentation parameters for state TE VN topologies.";
    container vn-scaling-intent {
      description
        "scaling intent";
      container scale-in-intent {
        description
          "VN scale-in";
        uses te-tel:scaling-in-intent;
      }
      container scale-out-intent {
        description
          "VN scale-out";
        uses te-tel:scaling-out-intent;
      }
    }
    container vn-telemetry {
      description
        "VN telemetry params";
      container params {
        config false;
        description
          "Read-only telemetry parameters";
        uses te-types:performance-metrics-attributes;
      }
      uses grouping-operation;
    }
  }

  augment "/vn:virtual-network/vn:vn/vn:vn-member" {
    description
      "Augmentation parameters for state TE vn member topologies.";
    container vn-member-telemetry {
      description
        "VN member telemetry params";
      container params {
        config false;
        description
          "Read-only telemetry parameters";
        uses te-types:performance-metrics-attributes;
        leaf-list te-tunnel-ref {
          type leafref {
            path "/te:te/te:tunnels/te:tunnel/te:name";
          }
          description
            "A list of underlying TE tunnels that form the
             VN-member";
        }
      }
      uses grouping-operation;
    }
  }
}

]]></sourcecode>
      </section>
    </section>
    <section anchor="sect-8" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   The YANG modules specified in this document defines a schema for data
   that is 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 Secure Shell (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 Network Configuration Access Control Model (NACM) <xref target="RFC8341" format="default"/> provides the means to restrict access for particular NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.</t>
      <t>
   There are a number of data nodes defined in this YANG module 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.,
   edit-config) to these data nodes without proper protection can have
   a negative effect on network operations.  These are the subtrees
   with the write operation that can be exploited to impact the
   network monitoring. An incorrect condition could cause frequent scaling
   operation to be executed causing harm to the network:

      </t>
      <ul spacing="normal">
        <li>/te:te/te:tunnels/te:tunnel/te-scaling-intent/scale-in-intent</li>
        <li>/te:te/te:tunnels/te:tunnel/te-scaling-intent/scale-out-intent</li>
        <li>/vn:virtual-network/vn:vn/vn-scaling-intent/scale-in-intent</li>
        <li>/vn:virtual-network/vn:vn/vn-scaling-intent/scale-out-intent</li>
      </ul>
      <t>Further, following are the subtrees with the write operation that
    can be exploited by setting an incorrect grouping operation for the
    VN operation impacting the network monitoring:

      </t>
      <ul spacing="normal">
        <li>/vn:virtual-network/vn:vn/vn-telemetry/operation</li>
        <li>/vn:virtual-network/vn:vn/vn:vn-member/vn-member-telemetry/operation</li>
      </ul>
      <t>Some of the readable data nodes in this 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. These are the subtrees with the read operations that can be exploited to learn real-time (and sensitive) telemetry information about the TE tunnels and VN:
      </t>
      <ul spacing="normal">
        <li>/te:te/te:tunnels/te:tunnel/te-telemetry</li>
        <li>/vn:virtual-network/vn:vn/vn-telemetry</li>
        <li>/vn:virtual-network/vn:vn/vn:vn-member/vn-member-telemetry</li>
      </ul>
    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   This document registers the following namespace URIs in the IETF XML
   registry <xref target="RFC3688" format="default"/>:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
--------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-te-telemetry
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
--------------------------------------------------------------------

--------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-vn-telemetry
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
--------------------------------------------------------------------
]]></artwork>
      <t>
   This document registers the following YANG modules in the YANG
   Module
   Names registry <xref target="RFC6020" format="default"/>:</t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
--------------------------------------------------------------------
name:         ietf-te-telemetry
namespace:    urn:ietf:params:xml:ns:yang:ietf-te-telemetry
prefix:       te-tel
reference:    RFC XXXX
--------------------------------------------------------------------

--------------------------------------------------------------------
name:         ietf-vn-telemetry
namespace:    urn:ietf:params:xml:ns:yang:ietf-vn-telemetry
prefix:       vn-tel
reference:    RFC XXXX
--------------------------------------------------------------------
]]></artwork>
    </section>
    <section anchor="sect-10" numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>
   We thank Adrian Farrel, Rakesh Gandhi, Tarek Saad, Igor Bryskin, Kenichi Ogaki, and Greg Mirsky for useful discussions and their suggestions for this work.</t>
   <t>Thanks to Reshad Rahman for an excellent 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.6020.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.8233.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8294.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.8342.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.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://datatracker.ietf.org/doc/bibxml3/draft-ietf-teas-actn-vn-yang.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8640.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.3688.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <!--&RFC6991;-->

	</references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7471.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7823.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7799.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://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8570.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-opsawg-yang-vpn-service-pm.xml"/>
      </references>
    </references>
<section anchor="scope" numbered="true" toc="default">
      <name>Out of Scope</name>
      <t>
This document exclusively focus on performance
   monitoring telemetry and scaling intent mechanisms of the underlying transport (TE-tunnels and
   Virtual Networks (VNs)). The performance
   monitoring of the services is out of scope. See <xref target="sect-3.3"/> for details about VPN performance monitoring. Similarly performance monitoring of IETF network slices could be developed and it is clearly out of scope of this document.</t>
    </section>
<section anchor="contri" numbered="true" toc="default">
      <name>Contributors</name>
      <t>The following have contributed significantly and should be considered as co-author:</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
Satish Karunanithi
Kochava
India
Email: satish.karunanithi@gmail.com
]]></artwork>
</section>
  </back>
</rfc>
