<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.39 (Ruby 3.2.3) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-yl-cats-data-model-07"
category="std" consensus="true" submissionType="IETF" updates="" tocInclude="true" sortRefs="true" symRefs="true"
version="3">
  <!-- xml2rfc v2v3 conversion 3.33.0 -->
  <front>
    <title abbrev="YANG Data Model for CATS">Data Model for Computing-Aware Traffic Steering (CATS)</title>
    <seriesInfo name="Internet-Draft" value="draft-yl-cats-data-model-07"/>
    
    <author initials="H." surname="Yao" fullname="Huijuan Yao">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>
          <city>Beijing</city>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>yaohuijuan@chinamobile.com</email>
      </address>
    </author>
    <author initials="C." surname="Lin" fullname="Changwang Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <author initials="Z." surname="Li" fullname="Zhenqiang Li">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>lizhenqiang@chinamobile.com</email>
      </address>
    </author>
    <author initials="Q." surname="Xiong" fullname="Quan Xiong">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <!-- <country>India</country> -->
        </postal>
        <email>xiong.quan@zte.com.cn</email>
      </address>
    </author>
    <author initials="L. M." surname="Contreras" fullname="Luis M. Contreras">
      <organization>Telefonica</organization>
      <address>
        <postal>
          <country>Spain</country>
        </postal>
        <email>luismiguel.contrerasmurillo@telefonica.com</email>
      </address>
    </author>
    <date year="2026"/>
    <area>Routing</area>
    <workgroup>CATS Working Group</workgroup>
    <keyword>CATS, YANG</keyword>
    <abstract>
<t>This document defines a YANG data model for the management of Computing-Aware Traffic Steering (CATS) systems.</t>
<t>The YANG module defined in this document conforms to the Network Management Datastore Architecture (NMDA).</t>
    </abstract>
  </front>
  <middle>

    <section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="I-D.ietf-cats-framework"/> introduces a framework for Computing-Aware Traffic Steering (CATS).
      This document defines a YANG data model for managing the CATS system. The model extends the "ietf-routing"
      YANG model defined in <xref target="RFC8349"/>, is agnostic to specific protocol extensions, and conforms to the framework
      definition to serve as a critical diagnostic or control mechanism.</t>
      <section anchor="terminology">
        <name>Terminology</name>
      <t>The following terms as defined in <xref target="I-D.ietf-cats-framework"/> are used:</t>
      <ul spacing="normal">
        <li>
          <t>CS-ID: CATS Service ID.</t>
        </li>
        <li>
          <t>CSCI-ID: CATS Service Contact Instance ID.</t>
        </li>
        <li>
          <t>C-SMA: CATS Service Metric Agent.</t>
        </li>
        <li>
          <t>C-NMA: CATS Network Metric Agent.</t>
        </li>
        <li>
          <t>C-PS: CATS Path Selector.</t>
        </li>
        <li>
          <t>C-TC: CATS Traffic Classifier.</t>
        </li>
      </ul>
      <t>The new defined terms:</t>
      <ul spacing="normal">
        <li>
          <t>C-CIB: CATS Computing Information Base, as shown in <xref target="fig-cats-sys-arch"/>, responsible for
          maintaining CATS network computing information. Provides basic data for the C-SMA.</t>
        </li>
        <li>
          <t>C-NIB: CATS Network Information Base, as shown in <xref target="fig-cats-sys-arch"/>, responsible for
          maintaining CATS network information. Provides basic data for the C-NMA.</t>
        </li>
        <li>
          <t>CATS-SBI: The CATS Southbound Interface, as shown in <xref target="fig-cats-sys-arch"/>. The interface
          between the CATS Forwarders and the CATS Control Plane (regardless of the protocols
          used in the Control Plane). It could be used to report service metric information
          from CATS Forwarders to the Control Plane, and also could be used to send path and
          service policy information or service information from the Control Plane to CATS Forwarders.</t>
        </li>
        <li>
          <t>C-SMA API: An extended interface between the Control Plane or Management Plane
          and the C-SMA, or between CATS Forwarders and service instances, as shown in <xref target="fig-cats-sys-arch"/>,
          it is used to report service metric information to the Control Plane or CATS Forwarders.</t>
        </li>
      </ul>
      </section>
      <section anchor="conventions">
        <name>Conventions Used in This Document</name>
        <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 anchor="tree-diagrams">
        <name>Tree Diagrams</name>
        <t>Tree diagrams used in this document follow the notation defined in <xref target="RFC8340"/>.</t>
      </section>
      <section anchor="prefixes">
        <name>Prefixes in Data Node Names</name>
        <t>In this document, names of data nodes, actions, and other data model objects are often used
        without a prefix, as long as it is clear from the context in which YANG module each name is defined.
        Otherwise, names are prefixed using the standard prefix associated with the corresponding YANG module,
        as shown in <xref target="tab-prefixes"/>.</t>
        <table anchor="tab-prefixes">
          <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">ip</td>
              <td align="left">ietf-ip</td>
              <td align="left">
                <xref target="RFC8344"/></td>
            </tr>
            <tr>
              <td align="left">rt</td>
              <td align="left">ietf-routing</td>
              <td align="left">
                <xref target="RFC8349"/></td>
            </tr>
            <tr>
              <td align="left">cats</td>
              <td align="left">ietf-cats</td>
              <td align="left">
                <xref target="design-of-cats-data-model"/></td>
            </tr>
            <tr>
              <td align="left">yang</td>
              <td align="left">ietf-yang-types</td>
              <td align="left">
                <xref target="RFC9911"/></td>
            </tr>
            <tr>
              <td align="left">inet</td>
              <td align="left">ietf-inet-types</td>
              <td align="left">
                <xref target="RFC9911"/></td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="cats-system-overview">
      <name>CATS System Overview</name>
       <t>As defined in <xref target="I-D.ietf-cats-framework"/>, the CATS framework structure consists of the C-SMA
   (responsible for maintaining service metrics), the C-NMA (responsible for maintaining network metrics),
   the C-PS (responsible for maintaining forwarding table entries), and the C-TC (responsible for traffic
   classification), as shown in <xref target="fig-cats-sys-arch"/>.</t>
       <t>The C-CIB and C-NIB are defined in the management plane. The CATS-SBI is used to exchange
   information between CATS Forwarders and the Control Plane. The C-SMA API is an extended interface
   to report service metric information between the Control Plane and the C-SMA or between CATS Forwarders
   and service instances.</t>
      <figure anchor="fig-cats-sys-arch">
        <name>CATS System Architecture</name>
        <artwork><![CDATA[
      +----------------------------------+           +-------+
      | Management                       | C-SMA API |       |
      | Plane   +------+----------+      |<==========| C-SMA |
      |         |      |          |      |           |       |
      |         |   +--v---+   +--v---+  |           +--+----+
      |         |   |C-CIB |   |C-NIB |  |              |
      |         |   +---^--+   +--^---+  |              |
      |         |       |         |      |              |
      +---------|-------|---------|------+              |
      | Control |   +---v--+   +--v---+  |              |
      | Plane   |   |C-SMA |   |C-NMA |  |              |
      |         |   +------+   +------+  |              |
      |         |                        |              |
      |         |   +-------+            |              |
      |         +-->| C-PS  |            |              |
      |             +-------+            |              |
      +----------------------------------+              |
        /\ CATS-SBI  C-SMA API/\    /\ CATS-SBI         |
        ||                    ||    ||                  |
        \/                    ||    \/                  |
+----------------+  +-----------------------+           |
|CATS Forwarder1 |  |CATS Forwarder2        |           |
|    +------+    |  |    +------+------+    | C-SMA API +--------+
|    | C-TC |    |  |    | C-TC | C-PS |    |<==========| +--------+
|    +------+    |  |    +------+--+---+    |           | |Service |
|                |  |              |        |           | |Contact |
+----------------+  |              |        |           +-|Instance|
                    |          +---+---+    |             +--------+
                    |          |       |    |                 |
                    |      +---+--+ +--+--+ |           +--------+
                    |      |C-SMA | |C-NMA| |           | +--------+
                    |      +------+ +-----+ |           | |Service |
                    +-----------------------+           +-|Instance|
                                                          +--------+

]]></artwork>
      </figure>
    </section>
    <section anchor="design-of-cats-data-model">
      <name>Design of CATS Data Model</name>
      <section anchor="model-scope">
      <name>Scope of Model</name>
      <t>The model covers CATS systems as described in <xref target="I-D.ietf-cats-framework"/>.
      This model can be used to manage CATS systems.</t>
      <t>The operational state data and statistics can be retrieved by this model. The subscription
      and push mechanism defined in <xref target="RFC8639"/> and <xref target="RFC8641"/> can be implemented by the user to
      subscribe to notifications on the data nodes in this model.</t>
      <t>The model contains all the basic configuration parameters to operate the CATS system.
      Depending on the implementation choices, some systems might not allow some of the advanced
      parameters to be configurable.</t>
      <t>Occasionally-implemented parameters are modeled as optional features in this model.
      This model can be extended, and it has been structured in a way that such extensions
      can be conveniently made.</t>
      </section>
      <section anchor="specification">
        <name>Specification</name>
        <t>This model imports from and augments the "ietf-routing" YANG model defined in <xref target="RFC8349"/>.
        Both configuration branch and state branch of <xref target="RFC8349"/> are augmented. The configuration
        branch covers node base and policy configuration. The container 'cats' is the top level
        container in this data model.</t>
        <t>The YANG data model defined in this document conforms to the Network Management Datastore
        Architecture (NMDA) <xref target="RFC8342"/>. The operational state data is combined with the associated
        configuration data in the same hierarchy <xref target="RFC8407"/>.</t>
      </section>
      <section anchor="model-structure">
        <name>Model Structure</name>
        <t>This document defines a YANG data model for the management of CATS corresponding data.
        The data model is applicable to the CATS-SBI interface and the C-SMA API interface in <xref target="fig-cats-sys-arch"/>.</t>
        <t>The CATS YANG model includes basic CATS objects, traffic-classifier objects,
        and service-metric objects. The model also includes YANG notifications.</t>
        <ul spacing="normal">
          <li>
            <t>The CATS base table provides interfaces for the functionality of the C-PS component,
            which can be used for communication between the Control Plane and the C-SMA, as well as
            for the interface between the Control Plane and the CATS Forwarder.</t>
          </li>
          <li>
            <t>The CATS traffic-classifier table provides interfaces for the functionality of the C-TC
            component, which can be used for communication between the Control Plane and the CATS Forwarder.
            The Control Plane can distribute directly CATS traffic-classifier table to the CATS Forwarder,
            allowing the CATS Forwarder to proactively select paths according to forwarding policies.</t>
          </li>
          <li>
            <t>The CATS service-metric table provides interfaces for the C-SMA component, which can be
            used for communication between the Control Plane and the CATS Forwarder, as well as for
            transmitting service metric information from the C-SMA to the Control Plane. It is also
            used for forwarding service metric information from the Control Plane to the CATS Forwarder.</t>
          </li>
          <li>
            <t>The CATS notify table is used by the management layer component and can be utilized
            for the CATS Forwarder to report events to the Control Plane.</t>
          </li>
        </ul>
        <t>The full tree diagram of the "ietf-cats" YANG module is provided in <xref target="full-tree"/>.
           And the <xref target="fig-yang-org-hier"/> is overall tree structure of the CATS YANG module:</t>
        <figure anchor="fig-yang-org-hier">
          <name>Yang Organization and Hierarchy</name>
          <artwork><![CDATA[
 module: ietf-cats
   augment /rt:routing:
     +--rw cats
        +--rw base
        |     ...
        |  
        +--rw traffic-classifiers
        |     ...
        |  
        +--rw service-metrics
        |     ...
        |
        +---n notify
              ...
          ]]></artwork>
        </figure>
        <section anchor="cats-base">
         <name>CATS Base</name>
           <figure anchor="fig-yang-base-tree">
             <name>Base Configuration Tree View</name>
             <artwork><![CDATA[
        +--rw base
        |  +--rw enable?              boolean
        |  +--rw update-interval?     uint32
        |  +--rw metric-limits?       uint32
        |  +--rw flow-limits?         uint32
        |  +--rw flow-timeout?        uint32
        |  +--rw service-policy* [cs-id]
        |     +--rw cs-id             cs-id
        |     +--rw policy-type?      enumeration
            ]]></artwork>
           </figure>
           <t>In the base shown in <xref target="fig-yang-base-tree"/>, you can set
           the 'enable' attribute to enable/disable CATS function on
           a per-device basis. When set to false, the CATS function component is shut down.</t>
           <t>You can set the 'update-interval' parameter to determine the interval at which
           the C-SMA notifies the C-PS of metric changes. The default value for this interval is 30 seconds.</t>
           <t>You can set the maximum number of metric table entries by configuring 'metric-limits'.</t>
           <t>You can set the maximum number of flow tables by configuring 'flow-limits'.</t>
           <t>When flow tables have been inactive for a long period of time, it is necessary to age
           out the stale state entries. This can be achieved by configuring 'flow-timeout' to control
           the aging time of flow tables.</t>
           <t>You can set the 'service-policy' table for traffic steering, which includes affinity-based,
           service-metric-based, network-metric-based, and combined service-metric and network-metric-based
           steering.</t>
        </section>
        <section anchor="cats-tc">
         <name> CATS Traffic-classifier</name>
           <figure anchor="fig-yang-tc-tree">
             <name>Traffic-classifier Tree View</name>
             <artwork><![CDATA[
        +--rw traffic-classifiers 
        |  +--rw traffic-classifier* [cs-id]
        |     +--rw cs-id                cs-id
        |     +--rw description?         string
        |     +--rw server-port?         uint16
        |     +--rw protocol?            uint8
        |     +--ro matched-packets?     yang:zero-based-counter64
        |     +--ro matched-bytes?       yang:zero-based-counter64
            ]]></artwork>
           </figure>
           <t>The CATS traffic-classifier table is used to define the features of the service
           and to classify the traffic, as shown in <xref target="fig-yang-tc-tree"/>.</t>
           <t>The 'cs-id' is used to uniquely identify a CATS service, and the 'description'
           serves to document its content.</t>
           <t>The 'server-port' defines the application port for a CATS service. This port
           number matches the destination port in the IP packets of data flows destined for the service.</t>
           <t>The 'protocol' defines the application transport protocol for a CATS service.
           This protocol number matches the protocol in the IP packets of data flows destined for the service.</t>
           <t>The 'matched-packets' and 'matched-bytes' indicate the statistics of traffic
           matching the specified service.</t>
        </section>
        <section anchor="cats-sm">
         <name>CATS Service-metric</name>
           <figure anchor="fig-yang-sm-tree">
             <name>Service-metric Tree View</name>
             <artwork><![CDATA[
        +--rw service-metrics
        |  +--rw service-metric* [cs-id csci-id source-type]
        |     +--rw cs-id               cs-id
        |     +--rw csci-id             csci-id
        |     +--rw source-type         enumeration
        |     +--rw priority?           uint8
        |     +--rw affinity?           uint8
        |     +--rw location?           inet:ip-address
        |     +--rw metrics
        |     |  +--rw metric* [metric-type]
        |     |     +--rw metric-type       enumeration
        |     |     +--rw metric-value?     uint32
        |     +--ro forwarded-packets?      yang:zero-based-counter64
        |     +--ro forwarded-bytes?        yang:zero-based-counter64
            ]]></artwork>
           </figure>
           <t>The CATS service-metric table is used to control the delivery service metrics
           on the control plane, as shown in <xref target="fig-yang-sm-tree"/>,
           thereby generating the forwarding table on the forwarding
           plane in conjunction with network metrics.</t>
           <t>The 'cs-id' is used to uniquely identify a CATS service, and the 'csci-id' is
           used to represent an instance of that service. The 'source-type' indicates the source
           protocol of this service metric information, such as a static protocol.</t>
           <t>The 'priority' indicates the priority of different service instances of the same
           service, and the 'affinity' indicates the affinity between this service and its
           service site.</t>
           <t>The 'location' indicates the IP address of the service site where this service
           instance resides. And the 'metrics' indicates different types of service metric values.</t>
           <t>The 'forwarded-packets' and 'forwarded-bytes' indicate the statistics of traffic
           forwarded by the specified service metric entry.</t>
        </section>
        <section anchor="cats-notify">
         <name>CATS Notify</name>
           <figure anchor="fig-yang-notify-tree">
             <name>Notify Tree View</name>
             <artwork><![CDATA[
        +---n notify
           +--ro metric-limit-reached?     boolean
           +--ro flow-limit-reached?       boolean
            ]]></artwork>
           </figure>
           <t>When the number of CATS (metric or flow) table entries reaches the maximum and when the number
           of entries goes from maximum to not being maximum, an event notification will be
           sent indicating the change, as shown in <xref target="fig-yang-notify-tree"/>.</t>
        </section>
      </section>
    </section>
    <section anchor="cats-yang-module">
        <name>CATS YANG Module</name>
        <sourcecode type="yang" markers="true" name="ietf-cats@2026-06-25.yang"><![CDATA[
module ietf-cats {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-cats";
  prefix cats;

  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349: A YANG Data Model for Routing
                 Management (NMDA Version)";
  }

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types, Section 4";
  }

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types, Section 3";
  }

  organization
    "IETF Computing-Aware Traffic Steering (CATS) Working Group";

  contact
    "WG Web:  https://datatracker.ietf.org/group/cats
     WG List: CATS <mailto:cats@ietf.org>

     Editor:  Huijuan Yao
              <mailto:yaohuijuan@chinamobile.com>
     Editor:  Changwang Lin
              <mailto:linchangwang.04414@h3c.com>
     Editor:  Zhenqiang Li
              <mailto:lizhenqiang@chinamobile.com>
     Editor:  Quan Xiong
              <mailto:xiong.quan@zte.com.cn>
     Editor:  Luis M. Contreras
              <mailto:luismiguel.contrerasmurillo@telefonica.com>";

  description
    "This module describes a YANG model for managing the CATS
     system.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.

     Copyright (c) 2026 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).

     All revisions of IETF and IANA published modules can be found
     at the YANG Parameters registry group
     (https://www.iana.org/assignments/yang-parameters).

     This version of this YANG module is part of RFC XXXX; see the
     RFC itself for full legal notices.";

  revision 2026-06-25 {
    description
      "Initial Version";
    reference
      "RFC XXXX: YANG Data Model for CATS";
   }

  typedef cs-id {
    type union {
      type uint32;
      type inet:ipv4-address;
      type inet:ipv6-address;
    }
    description
      "This type is for CATS CS-ID.";
    reference
      "RFC XXXX: YANG Data Model for CATS";
  }

  typedef csci-id {
    type union {
      type uint32;
      type inet:ipv4-address;
      type inet:ipv6-address;
    }
    description
      "This type is for CATS CSCI-ID.";
    reference
      "RFC XXXX: YANG Data Model for CATS";
  }

  grouping service-policy-type {
    description
      "Service policy type";
    leaf policy-type {
      type enumeration {
        enum base-on-affinity {
          value 0;
          description "Base on affinity";
        }
        enum base-on-sm-only {
          value 1;
          description "Base on service metric only";
        }
        enum base-on-nm-only {
          value 2;
          description "Base on network metric only";
        }
        enum base-on-sm-nm {
          value 3;
          description 
            "Base on the combination of service metric and network
             metric";
        } 
      }
      description "Service policy type";
    }
  }

  augment "/rt:routing" {
    description
      "This augments the CATS configuration.";
    container cats {
      description
        "Support for the CATS configuration.";
      container base {
        description
          "CATS base configuration.";
        leaf enable {
          type boolean;
          description
            "Enable CATS";
        }
        leaf update-interval {
          type uint32;
          units "seconds";
          default "30";
          description
            "Update interval of CATS metric. A value of 0
             indicates that metrics are sent only when a
             significant change occurs and not on a periodic
             basis.";
        }
        leaf metric-limits {
          type uint32;
          description
            "CATS metric entry limit";
        }
        leaf flow-limits {
          type uint32;
          description
            "CATS flow entry limit";
        }
        leaf flow-timeout {
          type uint32;
          units "seconds";
          default "120";
          description
            "CATS flow timeout when no flow. A value of 0 means
             that the flow does not time out due to inactivity
             (i.e., infinite timeout), and must be terminated
             explicitly (e.g., via signaling or administrative
             action).";
        }
        list service-policy {
          key "cs-id";
          description
            "CATS service policy";
          leaf cs-id {
            type cs-id;
            description
              "The cs-id";
          }
          uses service-policy-type;
        }
      }

      container traffic-classifiers {
        description
          "CATS traffic-classifier feature";
        list traffic-classifier {
          key "cs-id";
          description
            "CATS traffic-classifier feature";
          leaf cs-id {
            type cs-id;
            description
              "CATS CS-ID";
          }
          leaf description {
            type string;
            description
              "The description of this service, example: http";
          }
          leaf server-port {
            type uint16;
            description
              "Server-port of the service, matches the
               destination port in the IP packets of data
               flows destined for the service.";
          }
          leaf protocol {
            type uint8;
            description
              "The protocol of the service.";
          }
          leaf matched-packets {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of packets matching the specified
               service.";
          }
          leaf matched-bytes {
            type yang:zero-based-counter64;
            config false;
            description
              "The byte number of packets matching the specified
               service.";
          }
        }
      }

      container service-metrics {
        description
          "CATS service metric entry";
        list service-metric {
          key "cs-id csci-id source-type";
          description
            "CATS service metric entry";
          leaf cs-id {
            type cs-id;
            description
              "CATS cs-id";
          }
          leaf csci-id {
            type csci-id;
            description
              "CATS csci-id";
          }
          leaf source-type {
            type enumeration {
              enum static {
                value 0;
                description "Static configuration";
              }
            }
            description
              "The source type of the service computing metric";
          }
          leaf priority {
            type uint8;
            description
              "The server priority, the smaller the value,
               the higher the priority.";
          }
          leaf affinity {
            type uint8;
            description
              "The server affinity, the higher the value,
               the higher the affinity.";
          }
          leaf location {
            type inet:ip-address;
            description
              "The server location";
          }
          container metrics {
            description
              "The service metric";
            list metric {
              key "metric-type";
              description "Different types of service.";
              leaf metric-type {
                type enumeration {
                  enum delay {
                    value 0;
                    description
                      "Calculate the metric based on transmission
                       delay, where the metric value is the delay
                       time in milliseconds."; 
                  }
                  enum service-ratio {
                    value 1;
                    description
                      "Calculate the metric based on business
                       capacity, where the metric value is the
                       current capacity percentage.";
                  }
                  enum memory-ratio {
                    value 2;
                    description
                      "Calculate the metric based on memory
                       utilization percentage, where the metric
                       value is the current memory utilization
                       percentage";
                  }
                }
                description "The metric type";
                reference
                  "RFC YYYY: CATS Metrics Definition";
              }
              leaf metric-value {
                type uint32;
                description "The metric value";
              }
            }
          }
          leaf forwarded-packets {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of packets forwarded by the specified
               service";
          }
          leaf forwarded-bytes {
            type yang:zero-based-counter64;
            config false;
            description
              "The byte number of packets forwarded by the specified
               service";
          }
        }
      }
      notification notify {
        description "The event notify";
        leaf metric-limit-reached {
          type boolean;
          description "Metric entry limit reached";
        }
        leaf flow-limit-reached {
          type boolean;
          description "Flow entry limit reached";
        }
      }
    }
  }
}
        ]]></sourcecode>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This section is modeled after the template described in Section 3.7.1
      of <xref target="RFC9907"/>.</t>

      <t>The "ietf-cats" YANG module defines a data model that is designed to be accessed
      via YANG-based management protocols, such as the Network Configuration Protocol
      (NETCONF) <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>.
      These YANG-based management protocols (1) have to use a secure transport layer
      (e.g., Secure Shell (SSH) <xref target="RFC4252"/>, TLS <xref target="RFC8446"/>,
      and QUIC <xref target="RFC9000"/>) and (2) have to use mutual authentication.</t>

      <t>The Network Configuration Access Control Model (NACM) <xref target="RFC8341"/> 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).
      All writable data nodes are likely to be sensitive or vulnerable in some network environments.
      Write operations (e.g., edit-config) and delete operations to these data nodes without
      proper protection or authentication can
      have a negative effect on network operations. The following subtrees and data nodes have particular
      sensitivities/vulnerabilities:</t>
      <ul spacing="normal">
        <li>
          <t>/cats:base/cats:enable</t>
        </li>
        <li>
          <t>/cats:base/cats:update-interval</t>
        </li>
        <li>
          <t>/cats:base/cats:metric-limits</t>
        </li>
        <li>
          <t>/cats:base/cats:flow-limits</t>
        </li>
        <li>
          <t>/cats:base/cats:flow-timeout</t>
        </li>
        <li>
          <t>/cats:base/cats:service-policy/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:base/cats:service-policy/cats:policy-type</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:description</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:server-port</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:protocol</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:csci-id</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:source-type</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:priority</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:affinity</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:location</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:metrics/cats:metric/cats:metric-type</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:metrics/cats:metric/cats:metric-value</t>
        </li>
      </ul>
      <t>For these augmentations to ietf-routing.yang, the ability to delete, add,
      and modify CATS base configuration, traffic classifier configuration and service
      metric configuration would allow traffic to be misrouted.</t>

      <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.
      Specifically, the following subtrees and data nodes have particular sensitivities/vulnerabilities:</t>
      <ul spacing="normal">
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:matched-packets</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:matched-bytes</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:forwarded-packets</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:forwarded-bytes</t>
        </li>
        <li>
          <t>/cats:notify/cats:metric-limit-reached</t>
        </li>
        <li>
          <t>/cats:notify/cats:flow-limit-reached</t>
        </li>
      </ul>
      <t>Exposing the notification will expose the CATS table information of the network device.
      This may be undesirable due to the fact that such exposure may facilitate other attacks.
      Additionally, network operators MAY consider their CATS table information to be sensitive
      confidential data.</t>
      <t>All the security considerations for writable and readable data nodes defined
      in <xref target="RFC8349"/> apply to the augmentations described herein.</t>

      <t>There are no particularly sensitive RPC or action operations.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>The IANA is requested to assign the following URI in the "IETF XML Registry"
      <xref target="RFC3688"/>:</t>
      <artwork type="ascii-art"><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-cats
   Registrant Contact: The IESG.
   XML: N/A; the requested URI is an XML namespace.
      ]]></artwork>
      <t>This document registers the following YANG module in the "YANG Module Names"
      registry <xref target="RFC6020"/>:</t>
      <artwork type="ascii-art"><![CDATA[
   Name:  ietf-cats
   Maintained by IANA?  N
   Namespace:  urn:ietf:params:xml:ns:yang:ietf-cats
   Prefix:  cats
   Reference:  RFC XXXX
      ]]></artwork>
    </section>
    <!-- <section anchor="acknowledgements">
      <name>Acknowledgements</name>
    </section> -->
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8344.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8639.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
        <reference anchor="RFC9911" target="https://www.rfc-editor.org/info/rfc9911">
          <front>
            <title>Common YANG Data Types</title>
            <author initials="J." surname="Schoenwaelder" fullname="Juergen Schoenwaelder" role="editor">
              <organization/>
            </author>
            <date year="2025" month="December"/>
          </front>
          <refcontent>RFC 9911, DOI 10.17487/RFC9911</refcontent>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9907.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-cats-framework.xml"/>
      </references>
    </references>

    <section anchor="full-tree">
      <name>Full Tree</name>
      <artwork type="ascii-art"><![CDATA[
module: ietf-cats
  augment /rt:routing:
    +--rw cats
       +--rw base
       |  +--rw enable?            boolean
       |  +--rw update-interval?   uint32
       |  +--rw metric-limits?     uint32
       |  +--rw flow-limits?       uint32
       |  +--rw flow-timeout?      uint32
       |  +--rw service-policy* [cs-id]
       |     +--rw cs-id          cs-id
       |     +--rw policy-type?   enumeration
       +--rw traffic-classifiers
       |  +--rw traffic-classifier* [cs-id]
       |     +--rw cs-id              cs-id
       |     +--rw description?       string
       |     +--rw server-port?       uint16
       |     +--rw protocol?          uint8
       |     +--ro matched-packets?   yang:zero-based-counter64
       |     +--ro matched-bytes?     yang:zero-based-counter64
       +--rw service-metrics
       |  +--rw service-metric* [cs-id csci-id source-type]
       |     +--rw cs-id                cs-id
       |     +--rw csci-id              csci-id
       |     +--rw source-type          enumeration
       |     +--rw priority?            uint8
       |     +--rw affinity?            uint8
       |     +--rw location?            inet:ip-address
       |     +--rw metrics
       |     |  +--rw metric* [metric-type]
       |     |     +--rw metric-type     enumeration
       |     |     +--rw metric-value?   uint32
       |     +--ro forwarded-packets?   yang:zero-based-counter64
       |     +--ro forwarded-bytes?     yang:zero-based-counter64
       +---n notify
          +--ro metric-limit-reached?   boolean
          +--ro flow-limit-reached?     boolean
      ]]></artwork>
    </section>

    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
      <name>Contributors</name>
      <t>TBD</t>
      <!-- <contact initials="x." surname="xxx" fullname="xxxxxx">
        <organization>xxx</organization>
        <address>
          <postal>
            <country>xxx</country>
          </postal>
          <email>xxx</email>
        </address>
      </contact> -->
    </section>
  </back>

</rfc>
