<?xml version="1.0" encoding="UTF-8"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc
    category="std"
    docName="draft-zhangb-cats-csma-implementation-02"
    ipr="trust200902"
    consensus="true"
    submissionType="IETF">

  <front>
    <title abbrev="CATS C-SMA/C-PS Snapshots">CATS C-SMA Nomination Snapshot and C-SMA-to-C-PS Transport Bindings</title>

    <author fullname="Bin Zhang" initials="B." surname="Zhang" role="editor">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>Sibilong Street</street>
          <city>Shenzhen</city>
          <region>Guangdong</region>
          <code>518055</code>
          <country>CN</country>
        </postal>
        <email>zhangb@pcl.ac.cn</email>
      </address>
    </author>

    <author fullname="Zongpeng Du" initials="Z." role="editor" surname="Du">
      <organization>China Mobile</organization>
      <address><email>duzongpeng@chinamobile.com</email></address>
    </author>

    <author fullname="Yixuan Yang" initials="Y." surname="Yang" role="editor">
      <organization>Sun Yat-sen University</organization>
      <address>
        <postal>
          <street>Gongchang Street</street>
          <city>Shenzhen</city>
          <region>Guangdong</region>
          <code>518055</code>
          <country>CN</country>
        </postal>
        <email>yangyx277@mail2.sysu.edu.cn</email>
      </address>
    </author>

    <author fullname="Bowen Shen" initials="B." surname="Shen" role="editor">
      <organization>Harbin Institute of Technology</organization>
      <address>
        <postal>
          <street>Taoyuan Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>shenbowen@stu.hit.edu.cn</email>
      </address>
    </author>

    <date year="2026" month="October" day="23"/>

    <area>Routing</area>
    <workgroup>Computing-Aware Traffic Steering</workgroup>
    <keyword>CATS</keyword>
    <keyword>C-SMA</keyword>
    <keyword>snapshot</keyword>

    <abstract>
      <t>This document defines a nomination snapshot published by a CATS Service Metric Agent (C-SMA) to a CATS Path Selector (C-PS). The snapshot carries aggregated service metrics together with a nominated service candidate set.</t>
      <t>The document defines the snapshot contract and two interoperable binding for the C-SMA-to-C-PS interface: a YANG-modeled snapshot delivered over HTTPS using RESTCONF for centralized C-PS deployments, and a BGP-LS service-metadata mapping for distributed deployments in which a C-PS is located at an ingress CATS-Forwarder.</t>
      <t>The SCI-to-C-SMA interface, individual metric definitions, management models, generic OAM, and the C-SMA's internal aggregation, ranking, and caching methods are outside the scope of this document.</t>
    </abstract>
  </front>

  <middle>

    <section title="Introduction" anchor="intro">
      <t>The Computing-Aware Traffic Steering (CATS) framework <xref target="RFC10053"/> assigns the C-SMA the role of collecting service capabilities and status and advertising CS-IDs with metrics to C-PSes. It allows metrics to be reported per service contact instance, as aggregates, or both. The C-PS uses service information together with network information and local policy to select a destination and path. The CATS data model <xref target="I-D.ietf-cats-data-model-00"/> defines service identifiers and metric-type identities. Neither document defines a common C-SMA-to-C-PS snapshot format or its transport encoding.</t>
      <t>This matters when a C-SMA and C-PS are independently implemented: they need to agree on the identity, scope, metric content, and candidate information conveyed by a publication, and on how that information is represented by the selected transport.</t>
      <t>This document specifies the C-SMA-to-C-PS snapshot contract and two major bindings for delivering nomination snapshots from C-SMA to C-PS:</t>
      <t>
        <list style="numbers">
          <t>Centralized C-PS: C-SMA exposes nomination snapshots to a centralized C-PS over HTTPS using RESTCONF, where path computation is performed. This scenario can use a subscription to receive each published snapshot.</t>
          <t>Distributed forwarding-plane selection: Nomination results are advertised directly to CATS ingress forwarding nodes. The ingress forwarding node runs local service-aware path selection, using the service metrics and candidate list carried in BGP updates. This architecture naturally reuses the BGP-LS distribution fabric.</t>
        </list>
      </t>
      <t>This document defines a single abstract nomination snapshot model, and specifies the two alternative transport bindings for carrying this snapshot from C-SMA to C-PS. The upstream SCI-to-C-SMA interface is not defined in this document; it is treated as an input source for C-SMA. If C-SMA and C-PS are co-located and built by a single vendor, their interaction is a private internal interface and this specification is not required. Standardization applies only to cross-node, cross-vendor C-SMA → C-PS interworking.</t>
    </section>
    <section title="Scope" anchor="scope">
      <t>This document contains normative requirements for:</t>
      <t>
        <list style="symbols">
          <t>Abstract semantic model of the C-SMA nomination snapshot, including snapshot identifier, observation window, timestamp, versioning, FULL publication, refresh, invalidation, and withdrawal semantics;</t>
          <t>Rules for identifying successive publications and obtaining a fresh FULL snapshot after synchronization is lost;</t>
          <t>Two proposed transport bindings for the C-SMA → C-PS interface: <list style="letters">
              <t>YANG-modeled nomination snapshot delivered over HTTPS using RESTCONF</t>
              <t>Mapping of nomination snapshot fields into BGP-LS service-metadata TLVs associated with an identified NLRI (Network Layer Reachability Information).</t>
            </list></t>
        </list>
      </t>
      <t>This document explicitly excludes from normative scope:</t>
      <t>
        <list style="symbols">
          <t>SCI-to-C-SMA metric snapshot format and interaction (referenced from a separate specification);</t>
          <t>Individual service metric definitions, metric registry entries;</t>
          <t>Existing CATS YANG configuration and state models beyond the nomination snapshot structure;</t>
          <t>Generic transport protocol characteristics and protocol applicability evaluation;</t>
          <t>Generic session keepalive, fault detection and link recovery from the CATS OAM framework;</t>
          <t>Internal C-SMA logic: aggregation algorithms, nomination ranking logic, cache eviction policies. These are implementation choices.</t>
        </list>
      </t>
      <t>NOTE: An implementation of C-SMA MAY support one or both transport bindings. A deployment selects one binding according to its control-plane architecture. Mixed bindings in the same control domain are permitted but not required.</t>
    </section>

    <section title="Design Rationale" anchor="design-rationale">
      <t>C-SMA's nomination snapshot couples aggregated metrics with a consistent set of nominated service candidates aligned to the same observation window. A YANG data structure can define these fields independently of the protocol that delivers them. For centralized deployments, RESTCONF over HTTPS provides an existing way to deliver YANG-modeled information and subscribed notifications. Binding 1 specifies the subscription sequence and maps notification updates to the snapshot model.</t>
      <t>Instead of creating separate semantic structures for centralized and distributed deployments, this specification decouples the abstract nomination snapshot semantics from the underlying transport.</t>
      <t>
        <list style="symbols">
          <t>For centralized C-PS: a YANG-modeled snapshot is delivered through RESTCONF over HTTPS. Each complete snapshot is carried as one notification, with the subscription procedure and update types specified in Binding 1.</t>
          <t>For distributed selection on CATS ingress forwarding nodes: the same abstract snapshot content is encoded into BGP-LS service attributes, reusing BGP's mature update, withdraw and flooding mechanisms across the routing domain.</t>
        </list>
      </t>
      <t>This approach keeps one consistent nomination data model for C-SMA output, while allowing operators to choose the control-plane distribution mechanism matching their network design.</t>
    </section>

    <section title="Abstract Nomination Snapshot Model (Normative Core)" anchor="abstract-service-snapshot-model">
      <t>A nomination snapshot is published by one C-SMA for one CS-ID. It explicitly identifies the CSCI-IDs covered by its aggregated metrics and candidate list. An SCI-to-C-SMA computing-metric snapshot can provide input to this publication, but this C-SMA-to-C-PS snapshot has a different publisher, scope, and candidate information. The following fields describe that information. The YANG node names correspond to the notification module in Appendix B. It imports the reusable CATS identifier typedefs and metric-type identity from <xref target="I-D.ietf-cats-data-model-00"/>:</t>
      <table>
        <thead>
          <tr>
            <th>Field</th>
            <th>Meaning</th>
            <th>Proposed YANG node</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Publisher identity</td>
            <td>Identity of the C-SMA responsible for the publication.</td>
            <td>publisher-id (required leaf)</td>
          </tr>
          <tr>
            <td>Publisher epoch</td>
            <td>Restart discriminator for the publisher. A new epoch begins a new version sequence.</td>
            <td>publisher-epoch (required yang:uuid leaf)</td>
          </tr>
          <tr>
            <td>CS-ID</td>
            <td>Identifier of the one CATS service described by the snapshot.</td>
            <td>cs-id (required leaf of type cats:cs-id)</td>
          </tr>
          <tr>
            <td>Covered CSCI-IDs</td>
            <td>The service contact instances represented by the aggregated metrics. In a FULL snapshot, this is the complete covered set for this publisher and CS-ID; a candidate must be a member of this set.</td>
            <td>covered-instance (list keyed by csci-id of type cats:csci-id)</td>
          </tr>
          <tr>
            <td>Snapshot ID</td>
            <td>Unsigned 64-bit identifier unique within the publisher epoch for this notification event. It identifies the publication event and is distinct from the version used to order publications for one CS-ID.</td>
            <td>snapshot-id (required leaf)</td>
          </tr>
          <tr>
            <td>Snapshot version</td>
            <td>Monotonically increasing update generation for this publisher, epoch, and CS-ID. It orders successive publications and is distinct from a format or schema version.</td>
            <td>snapshot-version (required uint64 leaf)</td>
          </tr>
          <tr>
            <td>Observation window</td>
            <td>Start and end times of the observation interval represented by the aggregated metrics; the end must follow the start. A metric measured over a different window identifies that window in its metric record.</td>
            <td>window-start and window-end (yang:date-and-time leaves for metric-bearing FULL snapshots)</td>
          </tr>
          <tr>
            <td>Type flag</td>
            <td>FULL snapshot, INVALIDATE signal, or WITHDRAW signal. The full and invalidate forms align conceptually with the SCI snapshot example, while WITHDRAW removes this C-SMA publication. Periodic and change-triggered metric reports use FULL; delta payloads are outside the current profile.</td>
            <td>publication-content (required choice: full-snapshot, invalidated-version, or withdraw)</td>
          </tr>
          <tr>
            <td>Aggregated metric set</td>
            <td>Aggregated values derived from the covered CSCI-IDs and identified by metric-type identities defined in, or derived from the base identity in, the CATS data model <xref target="I-D.ietf-cats-data-model-00"/>. The specification defining each metric identity determines its value type, meaning, and units; this snapshot carries any metric-specific observation window and validity time.</td>
            <td>metric-entry (list keyed by metric-type, with one typed value and optional observation and validity information)</td>
          </tr>
          <tr>
            <td>Nomination candidate list</td>
            <td>Nominated CSCI-IDs drawn from the covered set; each entry includes candidate rank and applicable constraint tags. In a FULL snapshot, this is the complete nominated set for this publisher and CS-ID.</td>
            <td>candidate (list keyed by csci-id of type cats:csci-id, with rank and constraint tags)</td>
          </tr>
          <tr>
            <td>Instance status markers</td>
            <td>For each covered CSCI-ID, its reported availability state, such as available, drained, or failed.</td>
            <td>status under each covered-instance entry</td>
          </tr>
        </tbody>
      </table>
      <t>The YANG representation is a nomination-snapshot notification containing one publication from one publisher for one CS-ID. It is distinct from an SCI-originated computing-metric-snapshot notification: the C-SMA may aggregate input from multiple SCIs and add covered-instance status and nomination results before publishing to the C-PS. The publisher-id, publisher-epoch, cs-id, and snapshot-version identify one publication generation; snapshot-id identifies the event within that epoch. CS-ID and CSCI-ID use the CATS data-model typedefs; publisher-id remains a local identifier. A later version in the same epoch and CS-ID scope denotes a later publication.</t>
      <t>Each covered-instance entry identifies one CSCI-ID and carries its status. Each candidate refers to a covered CSCI-ID; ranks and any constraint tags require defined types and uniqueness rules. A metric-entry contains a CATS metric-type identity and one typed value. The specification defining that identity determines the value branch, units, and validity semantics. The module offers unsigned, decimal, text, and boolean value branches. The module uses a required choice with full-snapshot, invalidated-version, and withdraw cases; the selected case conveys the snapshot type. Window times and metric entries occur only in a FULL snapshot. An INVALIDATE signal identifies the version that is no longer valid; a WITHDRAW signal identifies the publisher and CS-ID whose publication is removed. Deleting a YANG data node is not, by itself, a snapshot withdrawal.</t>
      <t>All transport bindings defined in this document SHALL carry the complete information represented by this abstract model. Interoperability conformance is judged against this abstract model, not against a particular transport encoding. Appendix B contains the YANG module. Binding 1 specifies its JSON notification encoding and subscription sequence, illustrated in <xref target="json-notification-encoding"/>; each metric identity needs an unambiguous value branch and interpretation.</t>
    </section>

    <section title="Snapshot Publication and Refresh Semantics" anchor="snapshot-publication-semantics">
      <t>The reporting policy determines when the C-SMA publishes information. The periodic refresh and significant-change triggers described in <xref target="I-D.zhangb-cats-service-metrics-op" /> may be used for this purpose. A threshold-triggered report is a report caused by a change; it does not imply an INCREMENTAL payload. This document defines the publication content and its meaning on the C-SMA-to-C-PS interface, not the threshold values, reporting interval, or local metric cache.</t>
      <t>A publisher sends a FULL snapshot for each publisher and CS-ID when a C-PS first establishes its view, on a periodic refresh, and after a significant metric, candidate, or instance-status change. Each FULL snapshot contains the complete current covered set, aggregated metric set, instance statuses, and nominated candidate set for that publisher and CS-ID. Its version is greater than the preceding version for the same publisher, epoch, and CS-ID. After restart or loss of version state, the publisher changes its epoch and sends a new FULL snapshot. A new FULL snapshot replaces the preceding publication in that scope.</t>
      <t>If one covered instance becomes unavailable, the publisher issues a new FULL snapshot promptly according to the reporting policy. The snapshot can retain that instance in the covered set with an unavailable status while removing it from the candidate list. That change does not withdraw the publication for the CS-ID.</t>
      <t>INVALIDATE identifies a specified snapshot version in the publisher, epoch, and CS-ID scope whose information must no longer be treated as current. WITHDRAW removes the current publication for the identified publisher and CS-ID. Both are explicit signals; silence, expiry, and deletion of a YANG node are not equivalent to a publisher-issued WITHDRAW. The C-PS determines its local response to unavailable or expired information under its own policy. A publisher that resumes after a lost subscription or other loss of synchronization provides a fresh FULL snapshot before relying on subsequent publications.</t>
      <t>This profile uses complete FULL snapshots for both periodic and change-triggered reporting. It does not define INCREMENTAL payloads. A future extension may add them only with explicit base-version, ordering, and resynchronization rules for each binding.</t>
    </section>

    <section title="Transport Binding 1: YANG Notifications over HTTPS/RESTCONF" anchor="restconf-binding">
      <t>In a centralized deployment, the C-SMA publishes nomination snapshots from its RESTCONF server, and the remote C-PS subscribes to receive them.</t>
      <t>This binding uses the nomination-snapshot notification in Appendix B, encoded as YANG JSON <xref target="RFC7951" /> and delivered through RESTCONF over HTTPS <xref target="RFC8040" />. A C-PS establishes a dynamic subscription to the notification stream using the subscribed-notifications procedure <xref target="RFC8639" /> and its RESTCONF binding <xref target="RFC8650" />. The C-PS obtains the subscription URI and performs the RESTCONF GET that starts the server-sent event stream. Only an authorized C-PS receives these notifications.</t>
      <t>After the subscription becomes active, the C-SMA sends one FULL notification for each CS-ID included in the subscription scope before sending later changes for that CS-ID. It sends later FULL notifications on the periodic and significant-change triggers described in Section 6.1 and Section 8 of <xref target="I-D.zhangb-cats-service-metrics-op" />. Those documents guide reporting frequency; this document does not select threshold values or a heartbeat interval. An INVALIDATE notification names the invalidated version. A WITHDRAW notification removes the publisher's publication for the CS-ID. A candidate's removal from a later FULL notification is not a WITHDRAW.</t>
      <t>The C-PS uses publisher-id, publisher-epoch, cs-id, and snapshot-version to distinguish publications. Within one epoch and CS-ID scope, a FULL notification with a greater version replaces the earlier FULL notification. If the subscription terminates or the C-PS cannot determine whether it missed an event, it establishes a new subscription and uses the initial FULL notifications to rebuild its view. The publisher starts a new epoch after a restart that loses version continuity. The C-PS's selection and local storage policies are outside the scope of this binding.</t>
    </section>

    <section title="Transport Binding 2: Mapping to BGP-LS Service Attribute NLRI (Normative)" anchor="bgp-ls-binding">
      <t>This section proposes a BGP-LS mapping for deployments in which a C-PS at an ingress CATS-Forwarder receives nomination information through BGP-LS distribution. The exact NLRI, TLV definitions, field mapping, and code-point allocations remain to be specified. Appendix A illustrates the intended deployment without defining a wire encoding.</t>
      <t>This profile is limited to a service whose CS-ID maps unambiguously to one service prefix and for which one authorized publisher owns the advertisement for that prefix in the distribution domain. A future BGP-LS encoding would use the corresponding Prefix NLRI and associate a service-metadata TLV in the BGP-LS Attribute with it. The TLV would contain CATS-specific sub-TLVs for Snapshot Context (publisher identity, epoch, CS-ID, snapshot ID, version, and window), Covered Instance and Status, repeated CATS Metric entries, and Candidate entries. The exact TLV and sub-TLV types, lengths, duplicate rules, and code points require IDR coordination and are not assigned here.</t>
      <t>Each BGP UPDATE for the NLRI carries the complete current FULL snapshot in one advertisement. The publisher sends replacement UPDATEs after significant changes and for periodic refresh under the policy described in <xref target="I-D.zhangb-cats-service-metrics-op" />; a threshold-triggered report is still encoded as a FULL snapshot. A changed or unavailable instance is represented in a replacement FULL snapshot and does not withdraw the NLRI. To signal INVALIDATE while retaining the NLRI, the future Snapshot Context sub-TLV needs an explicit invalid indication and the targeted version. WITHDRAW removes the whole publication by withdrawing the NLRI. The encoding must make the publisher and CS-ID scope of that withdrawal unambiguous.</t>
      <t>A BGP-LS receiver can obtain the current complete advertisement after joining or restarting without reconstructing earlier deltas. This profile does not map INCREMENTAL snapshot payloads into ordinary BGP UPDATEs. It does not define a new BGP session behavior or address family. Appendix A illustrates the prefix-addressable case; a general CS-ID or multiple publishers for one prefix require additional identification mechanisms.</t>
    </section>

    <section title="Informative Appendix: Optional gNMI Mapping" anchor="informative-appendix">
      <t>A deployment may use gNMI to expose or subscribe to YANG-modeled snapshot data when its agents and controllers support gNMI, including deployments with a C-SMA on a mobile device. Device mobility alone does not require gNMI. Such a mapping is informative here; it would need to specify the snapshot path, encoding, subscription mode, and correspondence of update and withdrawal events to the abstract snapshot model.</t>
    </section>

    <section title="Security Considerations" anchor="security-considerations">
      <t>The abstract nomination snapshot carries service selection state that affects forwarding behavior. All transport bindings MUST provide authentication, integrity and replay protection.</t>
      <t>
        <list style="symbols">
          <t>HTTPS/RESTCONF transport: authenticate and authorize the C-SMA and C-PS, protect the exchange with TLS, and restrict subscription access to the intended snapshot data;</t>
          <t>BGP-LS transport: distribution must be restricted to authorized CATS nodes and the intended administrative domain. The final BGP-LS encoding must identify mechanisms for publisher authentication, integrity, confidentiality, and freshness; TCP-AO or BGPsec alone does not provide all of these properties.</t>
        </list>
      </t>
    </section>

    <section title="IANA Considerations" anchor="iana">
      <t>The YANG namespace and module name in Appendix B require registration if this document advances. The proposed BGP-LS mapping requires TLV and sub-TLV assignments only after its encoding is specified and reviewed with IDR. No BGP-LS code points are requested by this version.</t>
    </section>

  </middle>

  <back>

      <references title="Normative References">

      <reference anchor="RFC7951"><front><title>JSON Encoding of Data Modeled with YANG</title><author initials="L." surname="Lhotka" fullname="Ladislav Lhotka" /><date year="2016" month="August" /></front><seriesInfo name="RFC" value="7951" /></reference>

      <reference anchor="RFC8040"><front><title>RESTCONF Protocol</title><author initials="A." surname="Bierman" fullname="Andy Bierman" /><date year="2017" month="January" /></front><seriesInfo name="RFC" value="8040" /></reference>

      <reference anchor="RFC8650"><front><title>Dynamic Subscription to YANG Events and Datastores over RESTCONF</title><author initials="E." surname="Voit" fullname="Eric Voit" /><date year="2019" month="November" /></front><seriesInfo name="RFC" value="8650" /></reference>

      <reference anchor="RFC10053">
        <front><title>A Framework for Computing-Aware Traffic Steering (CATS)</title>
        <author initials="C." surname="Li" fullname="Cheng Li" role="editor"/>
        <author initials="Z." surname="Du" fullname="Zongpeng Du"/>
        <author initials="M." surname="Boucadair" fullname="Mohamed Boucadair" role="editor"/>
        <author initials="L. M." surname="Contreras" fullname="Luis M. Contreras"/>
        <author initials="J." surname="Drake" fullname="John Drake"/>
        <date year="2026" month="October"/></front>
        <seriesInfo name="RFC" value="10053"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc10053.txt"/>
      </reference>

      <reference anchor="RFC8639">
        <front><title>Subscription to YANG Notifications</title>
          <author initials="E." surname="Voit" fullname="Eric Voit"/>
          <author initials="A." surname="Clemm" fullname="Alexander Clemm"/>
          <author initials="A." surname="Gonzalez Prieto" fullname="Alberto Gonzalez Prieto"/>
          <date year="2019" month="September"/></front>
        <seriesInfo name="RFC" value="8639"/>
        <format type="TXT" target="https://www.rfc-editor.org/rfc/rfc8639.txt"/>
      </reference>

      <reference anchor="RFC9911">
        <front><title>Common YANG Data Types</title>
          <author initials="J." surname="Schoenwaelder" fullname="Juergen Schoenwaelder"/>
          <date year="2025" month="December"/></front>
        <seriesInfo name="RFC" value="9911"/>
      </reference>

      <reference anchor="I-D.ietf-cats-data-model-00">
        <front><title>Data Model for Computing-Aware Traffic Steering (CATS)</title>
          <author initials="H." surname="Yao" fullname="Huijuan Yao"/>
          <author initials="C." surname="Lin" fullname="Changwang Lin"/>
          <author initials="Z." surname="Li" fullname="Zhenqiang Li"/>
          <author initials="Q." surname="Xiong" fullname="Quan Xiong"/>
          <author initials="L. M." surname="Contreras" fullname="Luis M. Contreras"/>
          <date year="2026" month="September" day="23"/></front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-cats-data-model-00"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-cats-data-model-00.txt"/>
      </reference>
    </references>
    <references title="Informative References">
      <reference anchor="I-D.zhangb-cats-service-metrics-op">
        <front><title>Computing Service Metrics Operation and Joint Service Selection under CATS</title>
          <author initials="B." surname="Zhang" fullname="Bin Zhang"/>
          <author initials="Y." surname="Dai" fullname="Yina Dai"/>
          <author initials="Z." surname="Du" fullname="Zongpeng Du"/>
          <author initials="G." surname="Zeng" fullname="Guanming Zeng"/>
          <author initials="C." surname="Miao" fullname="Chuanyang Miao"/>
          <date year="2026" month="October" day="10"/></front>
        <seriesInfo name="Internet-Draft" value="draft-zhangb-cats-service-metrics-op-06"/>
        <format type="TXT" target="https://www.ietf.org/archive/id/draft-zhangb-cats-service-metrics-op-06.txt"/>
      </reference>
    </references>
    <section title="Illustrative BGP-LS Distribution Scenario" anchor="bgp-ls-scenario">
      <t>This appendix is informative. It illustrates a possible mapping for a service whose CS-ID is unambiguously associated with an IP prefix. The names and values below are examples; no NLRI, TLV, sub-TLV, or code point is allocated by this appendix.</t>
      <t>Suppose CS-ID 42 is associated with service prefix 2001:db8:42::/48. C-SMA csma-1 publishes a FULL snapshot covering CSCI-IDs 101 and 102. The snapshot identifies its publisher, CS-ID, snapshot ID and version, observation window, aggregated metric records, and instance status markers. Its candidate list nominates 101 at rank 1 and 102 at rank 2.</t>
      <t>For this prefix-addressable case, a future BGP-LS binding could associate a Prefix NLRI for 2001:db8:42::/48 with a service-metadata TLV in the BGP-LS Attribute. Proposed CATS-specific sub-TLVs within that container would carry Snapshot Context (including csma-1, 42, and snapshot identification), Covered Instance entries for 101 and 102, the CATS Metric entries, Candidate entries with their ranks, and Instance Status entries. The service prefix alone identifies 42 only where that binding is configured or otherwise specified unambiguously; a general CS-ID requires an explicit encoding or another suitable NLRI.</t>
      <t>If 102 becomes unavailable, csma-1 publishes a later FULL snapshot for the same service. Its covered set still includes 102, its status marks 102 unavailable, and its candidate list contains only 101. In the illustrated BGP-LS approach, a new UPDATE replaces the attributes for the same NLRI with this complete current snapshot. Removal of the entire publication would instead withdraw that NLRI. Removing one candidate does not by itself withdraw the service NLRI.</t>
      <t>The authorized BGP-LS distribution domain delivers the advertisement to an ingress CATS-Forwarder hosting a C-PS. The C-PS receives the snapshot information and combines it with network information under its own selection policy. An eventual binding specification needs to define the exact container and sub-TLV encodings, duplicate and unknown-type handling, size limits, authorization, and the relationship between the NLRI and CS-ID.</t>
    </section>

    <section title="YANG Module for C-SMA Nomination Snapshots" anchor="yang-module">
      <t>This YANG module defines the C-SMA-to-C-PS notification used by Binding 1. It imports cats:cs-id, cats:csci-id, and cats:metric-type-base from the CATS data model <xref target="I-D.ietf-cats-data-model-00"/>. It also imports ietf-yang-types <xref target="RFC9911"/> for yang:uuid and yang:date-and-time. The metric-value choice and snapshot-specific fields remain defined here. This module is separate from any SCI-to-C-SMA notification model.</t>
      <figure><artwork><![CDATA[
module ietf-cats-nomination-snapshot {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-cats-nomination-snapshot";
  prefix cats-ns;

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

  import ietf-cats {
    prefix cats;
    reference
      "draft-ietf-cats-data-model-00: Data Model for Computing-Aware
       Traffic Steering (CATS)";
  }

  organization "IETF CATS Working Group";
  contact "WG mailing list: cats@ietf.org";
  description
    "C-SMA to C-PS nomination snapshot notifications.  This module
     does not define the SCI to C-SMA reporting interface or metric
     definitions.  CS-ID, CSCI-ID, and metric-type reuse the ietf-cats
     module.  Snapshot-specific fields are defined here.";

  revision 2026-10-23 {
    description "Initial draft revision.";
  }

  notification nomination-snapshot {
    description
      "One publication from a C-SMA for one CS-ID.  The publisher
       sends a full notification at subscription establishment,
       periodically, and after a significant change.";

    leaf publisher-id {
      type string { length "1..max"; }
      mandatory true;
      description "Identity of the publishing C-SMA.";
    }
    leaf publisher-epoch {
      type yang:uuid;
      mandatory true;
      description
        "Changes when the publisher restarts or loses its version
         state.  A new epoch starts a new version sequence.";
    }
    leaf cs-id {
      type cats:cs-id;
      mandatory true;
      description "Service described by this publication.";
    }
    leaf snapshot-id {
      type uint64;
      mandatory true;
      description
        "Identifier unique within the publisher epoch for this
         notification event.";
    }
    leaf snapshot-version {
      type uint64;
      mandatory true;
      description
        "Publication generation for this publisher, epoch, and
         CS-ID.  It increases for each event in that scope.";
    }

    choice publication-content {
      mandatory true;
      description "The publication operation and its content.";

      case full {
        container full-snapshot {
          presence "This event publishes a complete current snapshot.";
          must "count(candidate[not(csci-id = ../covered-instance/csci-id)]) = 0" {
            error-message "Every candidate must be a covered instance.";
          }
          description
            "Replaces the previous publication for the same
             publisher and CS-ID.";
          leaf window-start {
            type yang:date-and-time;
            mandatory true;
            description "Start of the aggregate observation window.";
          }
          leaf window-end {
            type yang:date-and-time;
            mandatory true;
            description
              "End of the aggregate observation window, later than
               window-start.";
          }
          list covered-instance {
            key "csci-id";
            min-elements 1;
            description
              "Complete set of instances represented by this full
               snapshot's aggregate metrics.";
            leaf csci-id {
              type cats:csci-id;
              description "Covered service contact instance.";
            }
            leaf status {
              type enumeration {
                enum available;
                enum drained;
                enum failed;
                enum unknown;
              }
              mandatory true;
              description "Reported instance availability.";
            }
          }
          list metric-entry {
            key "metric-type";
            description
              "One aggregate value per metric-type identity.  The specification defining that identity determines the appropriate value branch, unit, statistics, and validity semantics.";
            leaf metric-type {
              type identityref {
                base cats:metric-type-base;
              }
              description "Metric type defined in ietf-cats or derived from its metric-type-base identity.";
            }
            choice metric-value {
              mandatory true;
              case unsigned {
                leaf unsigned-value { type uint64; }
              }
              case decimal {
                leaf decimal-value {
                  type decimal64 { fraction-digits 6; }
                }
              }
              case text {
                leaf text-value { type string; }
              }
              case boolean {
                leaf boolean-value { type boolean; }
              }
            }
            leaf window-start {
              type yang:date-and-time;
              description "Metric-specific window start, if different.";
            }
            leaf window-end {
              type yang:date-and-time;
              description "Metric-specific window end, if different.";
            }
            leaf valid-until {
              type yang:date-and-time;
              description "End of the metric's stated validity.";
            }
          }
          list candidate {
            key "csci-id";
            unique "rank";
            description
              "Complete nominated set for this publication.  Every
               candidate must also be a covered instance.";
            leaf csci-id {
              type cats:csci-id;
              description "Nominated service contact instance.";
            }
            leaf rank {
              type uint16 { range "1..max"; }
              mandatory true;
              description "Publisher's nomination order; 1 is first.";
            }
            leaf-list constraint-tag {
              type string;
              description
                "An applicable constraint tag.  Tag syntax and
                 semantics require a separate definition.";
            }
          }
        }
      }
      case invalidate {
        leaf invalidated-version {
          type uint64;
          mandatory true;
          description
            "Version whose information is no longer valid in the
             identified publisher, epoch, and CS-ID scope.";
        }
      }
      case withdraw {
        leaf withdraw {
          type empty;
          description
            "Remove the publisher's current publication for the
             identified CS-ID.  This is not candidate removal.";
        }
      }
    }
  }
}
          ]]></artwork></figure>
    </section>

    <section title="JSON Notification Encoding" anchor="json-notification-encoding">
      <t>This appendix illustrates the JSON encoding of the nomination-snapshot YANG notification from Appendix B when Binding 1 delivers it over RESTCONF. Each example shows the JSON notification body inside one server-sent event; the RESTCONF event stream adds the <tt>data:</tt> prefix and event framing described in <xref target="RFC8040"/>. The JSON member names and values follow <xref target="RFC7951"/>. These examples illustrate the existing binding and introduce no additional fields or update semantics.</t>
      <t>The following FULL notification publishes version 7 for CS-ID 42. The CATS data-model typedefs allow numeric CS-ID and CSCI-ID values. The metric-type identity is qualified by the module in which it is defined. The uint64 snapshot identifiers and metric value are JSON strings, while the uint32 CS-ID and CSCI-IDs and the uint16 rank are JSON numbers.</t>
      <figure><artwork><![CDATA[
{
  "ietf-restconf:notification": {
    "eventTime": "2026-10-23T10:00:01Z",
    "ietf-cats-nomination-snapshot:nomination-snapshot": {
      "publisher-id": "csma-1",
      "publisher-epoch": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
      "cs-id": 42,
      "snapshot-id": "1001",
      "snapshot-version": "7",
      "full-snapshot": {
        "window-start": "2026-10-23T09:59:00Z",
        "window-end": "2026-10-23T10:00:00Z",
        "covered-instance": [
          { "csci-id": 101, "status": "available" },
          { "csci-id": 102, "status": "available" }
        ],
        "metric-entry": [
          {
            "metric-type": "ietf-cats:metric-delay",
            "unsigned-value": "12"
          }
        ],
        "candidate": [
          { "csci-id": 101, "rank": 1 },
          { "csci-id": 102, "rank": 2 }
        ]
      }
    }
  }
}
      ]]></artwork></figure>
      <t>After CSCI-ID 102 becomes unavailable, the C-SMA publishes another FULL snapshot for the same CS-ID. Version 8 still lists 102 as covered, marks it failed, and nominates only 101. This complete notification replaces version 7; removing one candidate does not withdraw the publication.</t>
      <figure><artwork><![CDATA[
{
  "ietf-restconf:notification": {
    "eventTime": "2026-10-23T10:01:01Z",
    "ietf-cats-nomination-snapshot:nomination-snapshot": {
      "publisher-id": "csma-1",
      "publisher-epoch": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
      "cs-id": 42,
      "snapshot-id": "1002",
      "snapshot-version": "8",
      "full-snapshot": {
        "window-start": "2026-10-23T10:00:00Z",
        "window-end": "2026-10-23T10:01:00Z",
        "covered-instance": [
          { "csci-id": 101, "status": "available" },
          { "csci-id": 102, "status": "failed" }
        ],
        "metric-entry": [
          {
            "metric-type": "ietf-cats:metric-delay",
            "unsigned-value": "12"
          }
        ],
        "candidate": [
          { "csci-id": 101, "rank": 1 }
        ]
      }
    }
  }
}
      ]]></artwork></figure>
      <t>The next notification invalidates version 8 in the same publisher, epoch, and CS-ID scope. It does not carry a FULL snapshot or a candidate list.</t>
      <figure><artwork><![CDATA[
{
  "ietf-restconf:notification": {
    "eventTime": "2026-10-23T10:02:00Z",
    "ietf-cats-nomination-snapshot:nomination-snapshot": {
      "publisher-id": "csma-1",
      "publisher-epoch": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
      "cs-id": 42,
      "snapshot-id": "1003",
      "snapshot-version": "9",
      "invalidated-version": "8"
    }
  }
}
      ]]></artwork></figure>
      <t>The following notification withdraws the publication for CS-ID 42. The <tt>withdraw</tt> leaf has YANG type <tt>empty</tt> and is therefore encoded as <tt>[null]</tt> in JSON.</t>
      <figure><artwork><![CDATA[
{
  "ietf-restconf:notification": {
    "eventTime": "2026-10-23T10:03:00Z",
    "ietf-cats-nomination-snapshot:nomination-snapshot": {
      "publisher-id": "csma-1",
      "publisher-epoch": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
      "cs-id": 42,
      "snapshot-id": "1004",
      "snapshot-version": "10",
      "withdraw": [null]
    }
  }
}
      ]]></artwork></figure>
    </section>

    <section title="Acknowledgments" anchor="ack">
      <t>The authors thank the CATS working group for their valuable feedback and contributions to this document.</t>
    </section>
  </back>

</rfc>
<!-- （注：内容由AI生成） -->
