<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp    "&#160;">
<!ENTITY zwsp   "&#8203;">
<!ENTITY nbhy   "&#8209;">
<!ENTITY wj     "&#8288;">
]>
<?xml-model href="rfc7991bis.rnc"?>
<rfc
        xmlns:xi="http://www.w3.org/2001/XInclude"
        docName="draft-ietf-opsawg-collected-data-manifest-17"
        category="std"
        ipr="trust200902"
        obsoletes=""
        updates=""
        submissionType="IETF"
        xml:lang="en"
        tocInclude="true"
        sortRefs="true"
        symRefs="true"
        version="3" >
  <front>
    <title abbrev="Telemetry Data Manifest">A Data Manifest for Contextualized Telemetry Data</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-opsawg-collected-data-manifest-17"/>
    <author fullname="Benoit Claise" initials="B" surname="Claise">
      <organization>Everything OPS &amp; Arrcus</organization>
      <address>
        <postal>
          <country>Belgium</country>
        </postal>
        <email>benoit@everything-ops.net</email>
      </address>
    </author>
    <author fullname="Jean Quilbeuf" initials="J" surname="Quilbeuf ">
      <organization>Huawei</organization>
      <address>
        <email>jean.quilbeuf@huawei.com</email>
      </address>
    </author>
    <author fullname="Diego R. Lopez" initials="D" surname="Lopez ">
      <organization>Telefonica I+D</organization>
      <address>
        <postal>
          <street>Don Ramon de la Cruz, 82</street>
          <city>Madrid  28006</city>
          <country>Spain</country>
        </postal>
        <email>diego.r.lopez@telefonica.com</email>
      </address>
    </author>
    <author fullname="Ignacio Dominguez Martinez-Casanueva" initials="I" surname="Dominguez Martinez-Casanueva">
      <organization>Telefonica</organization>
      <address>
        <postal>
          <postalLine>Ronda de la Comunicacion, S/N</postalLine>
          <postalLine>28050 Madrid</postalLine>
          <postalLine>Spain</postalLine>
        </postal>
        <email>i.domingumar@gmail.com</email>
      </address>
    </author>
    <author fullname="Thomas Graf" initials="T. " surname="Graf">
      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zurich</city>
          <code>8045</code>
          <country>Switzerland</country>
        </postal>
        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="15"/>
    <area>OPS</area>
    <workgroup>OPSAWG</workgroup>
    <abstract>
      <t>
        Network platforms use Network Telemetry, such as YANG-Push (RFC 8641), to continuously stream information, including both counters and state information.
        This document describes the metadata that ensure that the collected data can be interpreted correctly.
        This document specifies the Data Manifest, composed of two YANG data
        models (the Platform Manifest and the non-normative Data Collection Manifest).
        These YANG modules are specified at the network level (e.g., network controllers) to provide a model that encompasses several network platforms.
        The Data Manifest must be streamed and stored along with the data, up to the collection and analytics systems to keep the collected data fully usable by the data scientists and relevant tools.
        Additionally, this document specifies an augmentation of the YANG-Push model to include the actual collection period, in case it differs from the configured collection period.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>
        Network platforms use Network Telemetry <xref target="RFC9232"/>, such as YANG-Push <xref target="RFC8641"/>, to continuously stream information, including both counters and state information.
        The information to be streamed, and how often, is governed by a subscription <xref target="RFC8641"/>, a concept that is also central to this document.
      </t>
      <t>
        In this document, metadata denotes the contextual information about the platform and the collection process that is needed to interpret the streamed data, as opposed to the data values themselves.
        This document specifies what needs to be kept as metadata to ensure that the collected data can still be interpreted correctly throughout the collection and network analytics toolchain. When streaming YANG-structured data with YANG-Push, there is a semantic definition in the corresponding YANG module definition.
        This is the semantic information for the collected data nodes: While this semantic is absolutely required to correctly decode and interpret the data, understanding the network platform and collection environment context information is equally important to interpret the data.
      </t>
      <t>
        One part of this information is the actual collection period, as opposed to the configured collection period.
        On some platforms, that period can be adjusted by the platform, for instance to reduce the load incurred by collecting and sending the telemetry.
        To later make use of the collected data, getting this actual collection period is crucial.
        This document defines a YANG model augmenting the YANG-Push model <xref target="RFC8641"/> to expose the actual collection period in <xref target="data-manifest-statistics-module"/>.
      </t>
      <t>
        This document introduces the Data Manifest, which is composed of two YANG modules <xref target="RFC7950"/>, namely, the Platform Manifest and the Data Collection
        Manifest, to keep the collected data usable by the data scientists and relevant tools.
      </t>
      <t>
        The Platform Manifest contains information characterizing the platform streaming the telemetry information, while the Data Collection Manifest contains the required information to characterize how and when the telemetry information was metered.
        The Platform Manifest is specified in <xref target="platform-manifest"/>.
        An example of a Data Collection Manifest is provided in <xref target="data-collection-manifest"/>.
        The latter module is non-normative due to the lack of design-time schema mount in YANG (see <xref target="RFC8528" section="1"/>) and is therefore included in the appendix.
      </t>
      <t>         
        These two  YANG modules do not expose any new information but rather define what should be exposed by a platform streaming or storing telemetry data.
        Some related YANG modules have been specified to retrieve the platform capabilities such as:
      </t>
      <ul>
        <li>
          "YANG Library" <xref target="RFC8525"/>.
        </li>
        <li>
          "YANG Modules Describing Capabilities for Systems and Datastore Update Notifications" <xref target="RFC9196"/> for the platform capabilities regarding the production and export of telemetry data.
        </li>
        <li>
          <xref target="I-D.claise-netconf-metadata-for-collection"/>, which is based on <xref target="RFC9196"/> to define the optimal settings to stream specific items (i.e., per path).
        </li>
      </ul>
      <t>
        These related YANG modules are important to discover the capabilities before applying the telemetry configuration (such as on-change subscription). Some of their content is part of the context for the streamed data.
      </t>
      <t>
        This document covers only metadata about the collection context for the telemetry.
        The collected data is likely to be transformed into usable indicators for the network.
        The list of such transformation operations applied to the data is often called data lineage.
        Supplying the data lineage for the computed indicators is out of scope of this document.
      </t>
      <t>
        This document enables retrieving the context in which a particular piece of data was collected, without having to access the platform that emitted the telemetry.
        This retrieval requires three elements:
      </t>
      <ul>
        <li>the time at which the data was observed;</li>
        <li>the originating platform;</li>
        <li>the subscription through which the data arrived.</li>
      </ul>
      <t>
        The approach described in this document assumes that an underlying database records the history of both the data and the Data Manifest, enabling the data analyst to temporally match the data and the Data Manifest.
        Therefore, the approach presented here focuses on providing a way to match a platform and a subscription identifier to the collection context.
        This is consistent with most of the YANG modules for devices, which focus on describing the current state of the device, rather than the evolution of that state through time.
      </t>

    </section>
    <section anchor="terminology">
      <name>Terminology </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>
      <t>
        This document reuses the term "Network Telemetry" as defined in <xref target="RFC9232"/>.
      </t>
      <t>
        This document also reuses the subscription-related terminology defined in <xref target="RFC8641"/>.
      </t>
      <t>
        Platform: equipment in the network able to produce telemetry data.
      </t>
      <t>
        Data Manifest: The platform and data-collection context needed to correctly interpret collected telemetry.
      </t>
      <t>
        Platform Manifest: part of the Data Manifest that characterizes the platform producing the telemetry information.
      </t>
      <t>
        Data Collection Manifest: part of the Data Manifest that characterizes how and when the telemetry information was metered.
      </t>
      <t>
        Datapoint: an instance of data collected via Network Telemetry at a specific time.
      </t>
      <t>
        Collector: software that receives the stream of telemetry.
      </t>
      <t>
        Data lineage: the sequence of transformation operations applied to the collected data to produce derived indicators.
      </t>
    </section>
    <section anchor="use-cases">
      <name>Use Cases</name>

       <section anchor="network-analytics">
         <name>Network Analytics</name>
         <t>
           Streamed information from network platforms is used for network analytics, incident detection, and in the closed control loop for network automation.
           See <xref target="RFC9940"/> for definition of some of these terms.
           This streamed data can be stored in a time-series database (TSDB) or processed in a real-time streaming processor for further analysis.
        </t>
        <t>
          As an example, a database could store a time series representing the evolution of a specific counter collected from a network platform.
          When analyzing the data, a network operator/data scientist must understand the context information for these data:
        </t>
         <ul>
           <li>
             The counter definition, typically as defined in the YANG model.
           </li>
           <li>
             The network platform vendor, model, and OS.
           </li>
           <li>
             The collection parameters.
           </li>
         </ul>
         <t>
           Characterizing the source used for producing the data (vendor, platform, and OS) is useful to complement the data.
           As an example, knowing the exact data source software specification might reveal a particularity in the observed data, explained by a specific bug, a specific bug fix, or simply a particular specific behavior.
           This is also necessary to ensure the reliability of the collected data.
           On top of that, for YANG-Push <xref target="RFC8641"/>, it is crucial to know the set of YANG modules supported by the platform, along with their deviations.
           In some cases, there might even be some backwards incompatible changes in built-in modules (i.e., vendor proprietary modules) between one OS version to the next one.
           This information is captured by means of the Platform Manifest (see <xref target="platform-manifest"/>).
        </t>
         <t>
           From a collection parameters point of view, the data scientists analyzing the collected data must know whether the counter was requested from the network platform as on-change or at specific cadence <xref target="RFC8641"/>.
           Indeed, an on-change collection explains why there is a single value as opposed to a time series.
           In case of periodic collection, this exact cadence might not be observable in the time series.
           Indeed, this time series might report some values as 0 or might even omit some values.
           The reason for this behavior might be diverse: the network
           platform may be under stress, with a too small observation period, compared to the minimum-observable-period <xref target="I-D.claise-netconf-metadata-for-collection"/>.
           Knowing the conditions under which a counter was collected and streamed (along with the platform details) will help in drawing suitably informed conclusions.
           As an example, some platform might erroneously report a value of 0 for counters when the collection period is too short with respect to the capabilities of the platform.
           Without context, this value of 0 might lead to a wrong conclusion that the corresponding counter dropped to zero.
        </t>
       </section>

       <section anchor="new-device-onboarding">
         <name>New Device Onboarding</name>
         <t>
           When a new device is onboarded, operators must check that the new device streams data (e.g., with YANG-Push),
           that the Network Telemetry data is of the appropriate form for the device, that the data is correctly collected at the data collector,
           and finally that the data can be analyzed (compared with other similar devices).
           For the last point, the Data Manifest, which must be linked to the data up to the collection and analytics system,
           contains the relevant information, notably in the case where the telemetry subscriptions are not configured by the
           telemetry collectors.
        </t>
       </section>

      <section anchor="data-mesh-principles-in-networking" >
        <name>Data Mesh Principles in Networking</name>
        <t>
           The concepts behind the data mesh (<xref target="DataMesh"/>, <xref target="DataMeshRA"/>) are:
        </t>
        <ul>
          <li>
            Data as a Product: The "Domain" owners are responsible for providing the data in a useful way (discoverable through a catalog, addressable with a permanent and unique address, understandable with well-defined semantics, trustworthy and truthful, self-describing for easy consumption, interoperable by supporting standards, secure, self-contained, etc.) and should treat consumers of that data as customers.
            It requires and relies on the "Domain Ownership" principle.
          </li>
          <li>
            Domain Ownership: Architecturally and organizationally align business, technology, and analytical data, following the line of responsibility.
            The Data Mesh principles adopt the boundary of a bounded context to individual data products where each domain is responsible for (and owns) its data and models.
          </li>
          <li>
            Self-serve Data Platform: This fosters the sharing of cross-domain data to create extra value.
          </li>
          <li>
            Federated Computational Governance: Describes the operating model and approach to establishing global policies across a mesh of data products.
          </li>
        </ul>
        <t>
          The four principles above describe the full Data Mesh model and are included here for context; of these, the one this document directly supports is the "Data as a Product" principle. The Data Manifest fulfills this principle through the two YANG data models defined in this document, the Platform Manifest and the Data Collection Manifest, which, along with the data, provide all the necessary information in a self-describing way for easy consumption.
        </t>
       </section>
    </section>

    <section anchor="data-manifest-statistics-module">
      <name>The "ietf-yp-current-period" YANG module</name>
      <t>
        Some platforms will adjust the collection period depending on their capabilities and current load.
        The YANG module in this section augments the "periodic" container that "ietf-yang-push" <xref target="RFC8641"/> adds to the subscription list of the "ietf-subscribed-notifications" module <xref target="RFC8639"/>, with the operational leaf "current-period", next to the configured "period" and "anchor-time".
        For a periodic subscription, this leaf reports the collection period currently used, i.e., the interval between successive observations of the subscribed data.
        The configured "period" is the nominal interval at which the publisher observes the subscribed data for each update, consistent with <xref target="RFC8641"/>, under which each periodic update carries a snapshot of the subscribed data at the time of the update.
        Reporting the period explicitly lets a receiver tell a deliberate adjustment apart from missing data, without inferring it from the timing of the received updates, which depends on optional metadata such as the observation timestamp of <xref target="I-D.ietf-netconf-notif-envelope"/>.
        A receiver can cross-check the reported value against the observation timestamps of successive updates <xref target="I-D.ietf-netconf-notif-envelope"/>.
        The leaf describes when the data is observed, not when each update is generated and sent, and it may differ from the configured "period".
        The leaf applies to every periodic subscription, typically those collecting the data; it is part of that subscription's state, which can be collected directly or through the Data Collection Manifest (<xref target="data-collection-manifest"/>), preferably with on-change subscriptions (<xref target="collecting_dm"/>).
      </t>
      <t>
        Reporting "current-period" does not modify the subscription's configured "period" or "anchor-time".
        The publisher remains subject to the reliability and notification requirements of Sections <xref target="RFC8641" section="3.4" sectionFormat="bare"/> and <xref target="RFC8641" section="3.11.1" sectionFormat="bare"/> of <xref target="RFC8641"/>.
        Reporting this leaf MUST NOT replace any notification required by those procedures.
        <xref target="RFC8641"/> prefers that a publisher decline, when the subscription is established, a request it cannot meet (Section <xref target="RFC8641" section="3.11.2" sectionFormat="bare"/>).
        The leaf addresses an accepted subscription whose period the publisher cannot sustain, for example because the load has changed.
      </t>
      <t>
        Changes to the subscription's periodic schedule use the applicable subscription modification procedures in <xref target="RFC8639"/> and <xref target="RFC8641"/>.
        Update boundaries continue to follow <xref target="RFC8641" section="4.2"/>, using the supplied "anchor-time" or, when none is supplied, the creation time of the initial update record.
      </t>
      <t>
        A change to "current-period" is a change to the Data Collection Manifest.
        Its applicability to collected datapoints is determined using the effective-time and history requirements in <xref target="mapping_dm"/>.
      </t>
      <t>
        <xref target="current-period-tree"/> contains the YANG tree diagram <xref target="RFC8340"/> of the "ietf-yp-current-period" module.
      </t>
      <figure anchor="current-period-tree" >
        <name>YANG tree diagram for "ietf-yp-current-period" module</name>
        <artwork type="ascii-art"><![CDATA[
module: ietf-yp-current-period

  augment /sn:subscriptions/sn:subscription/yp:update-trigger
            /yp:periodic/yp:periodic:
    +--ro current-period?   yp:centiseconds
     ]]></artwork>
      </figure>
      <t>
        The code of the "ietf-yp-current-period" YANG module is given below.
      </t>
      <sourcecode name="ietf-yp-current-period@2026-10-24.yang" type="yang" markers="true"><![CDATA[
module ietf-yp-current-period {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-yp-current-period";
  prefix yp-cp;

  import ietf-subscribed-notifications {
    prefix sn;
    reference
      "RFC 8639: Subscription to YANG Notifications";
  }
  import ietf-yang-push {
    prefix yp;
    // RFC Ed.: remove revision-date, needed here for datatracker
    // to properly validate the module, because the latest version
    // on the server is not the ratified one and validation fails.
    revision-date 2019-09-09;
    reference
      "RFC 8641: Subscription to YANG Notifications for Datastore
       Updates";
  }

  organization
    "IETF OPSAWG (Operations and Management Area Working Group)";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Author:   Benoit Claise   <mailto:benoit@everything-ops.net>
     Author:   Jean Quilbeuf   <mailto:jean.quilbeuf@huawei.com>
     Author:   Diego R. Lopez  <mailto:diego.r.lopez@telefonica.com>
     Author:   Ignacio Dominguez Martinez-Casanueva
     <mailto:i.domingumar@gmail.com>
     Author:   Thomas Graf     <mailto:thomas.graf@swisscom.com>";
  description
    "This module augments ietf-subscribed-notifications and
     ietf-yang-push with the current-period leaf reporting the actual
     collection period, as opposed to the configured one.

     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-10-24 {
    description
      "Initial revision";
    reference
      "RFC XXXX: A Data Manifest for Contextualized Telemetry Data";
  }

  augment "/sn:subscriptions/sn:subscription"
        + "/yp:update-trigger/yp:periodic/yp:periodic" {
    description
      "Adds current collection period";
    leaf current-period {
      type yp:centiseconds;
      units "centiseconds";
      config false;
      description
        "The period currently used between two successive observation
         times of the subscribed data for a periodic subscription,
         i.e., the realized collection period. It may differ from the
         configured 'period' (RFC 8641) when the publisher cannot
         meet the configured cadence, for instance under overload.
         When this leaf is not reported for a periodic subscription,
         the configured 'period' is in effect. A reported value is a
         positive period; the value zero is not meaningful.";
    }
  }
}
    ]]>
      </sourcecode>
    </section>
    <section anchor="platform-manifest">
      <name>Platform Manifest</name>
        <section anchor="platform-manifest-model-tree">
          <name>Overview of the Model</name>
          <t>
            <xref target="platform-manifest-tree"/> contains the YANG tree diagram of the "ietf-platform-manifest" module.
          </t>
          <figure anchor="platform-manifest-tree">
            <name>YANG tree diagram for ietf-platform-manifest module</name>
            <artwork type="ascii-art"><![CDATA[
module: ietf-platform-manifest
  +--ro platforms
     +--ro platform* [id]
        +--ro id                  string
        +--ro name?               string {yang-catalog}?
        +--ro vendor?             string {yang-catalog}?
        +--ro vendor-pen?         uint32 {yang-catalog}?
        +--ro software-version?   string {yang-catalog}?
        +--ro software-flavor?    string {yang-catalog}?
        +--ro os-version?         string {yang-catalog}?
        +--ro os-type?            string {yang-catalog}?
        +--ro system {ietf-system}?
        |  +--ro contact?    string
        |  +--ro hostname?   inet:domain-name
        |  +--ro location?   string
        +--ro system-state {ietf-system}?
        |  +--ro platform
        |     +--ro os-name?      string
        |     +--ro os-release?   string
        |     +--ro os-version?   string
        |     +--ro machine?      string
        +--ro module-set* [name]
        |  +--ro name                  string
        |  +--ro module* [name]
        |  |  +--ro name         yang:yang-identifier
        |  |  +--ro revision?    revision-identifier
        |  |  +--ro namespace    inet:uri
        |  |  +--ro location*    inet:uri
        |  |  +--ro submodule* [name]
        |  |  |  +--ro name        yang:yang-identifier
        |  |  |  +--ro revision?   revision-identifier
        |  |  |  +--ro location*   inet:uri
        |  |  +--ro feature*     yang:yang-identifier
        |  |  +--ro deviation*   -> ../../module/name
        |  +--ro import-only-module* [name revision]
        |     +--ro name         yang:yang-identifier
        |     +--ro revision     union
        |     +--ro namespace    inet:uri
        |     +--ro location*    inet:uri
        |     +--ro submodule* [name]
        |        +--ro name        yang:yang-identifier
        |        +--ro revision?   revision-identifier
        |        +--ro location*   inet:uri
        +--ro schema* [name]
        |  +--ro name          string
        |  +--ro module-set*   -> ../../module-set/name
        +--ro datastore* [name]
           +--ro name      ds:datastore-ref
           +--ro schema    -> ../../schema/name
            ]]></artwork>
          </figure>
        <t>
          The YANG module contains a list of Platform Manifests (in 'platforms/platform'), indexed by the identifier of the platform.
          That identifier should be defined by the network manager so that each platform emitting Network Telemetry has a unique identifier.
          There are several documents about managing the inventory of the network, e.g., <xref target="I-D.ietf-ivy-network-inventory-yang"/>.
          The platform identifier should be the same as the identifier used in inventories or the 'node-id' in <xref target="RFC8345"/>.
          As an example, the identifier could be the 'sysName' from <xref target="RFC3418"/>.
          Selecting the correct identifier out of the existing works in IETF is out of scope for this document.
        </t>
        <t>
          The scope of the "ietf-platform-manifest" module is the scope of the data collection, i.e., a given network, therefore it contains a collection of Platform Manifests, as opposed to the device scope, which would contain a single Platform Manifest.
          For a device-level implementation the same module is used, including a single entry in 'platforms/platform', corresponding to the local view of the network from the device point of view.
        </t>
        <t>
          The Platform Manifest platform details are provided via one or
          both of two optional feature sets.
          When the 'yang-catalog' feature is supported, the parameters
          ('name', 'vendor', 'vendor-pen', 'software-version',
          'software-flavor', 'os-version', and 'os-type') are inspired
          from the YANG Catalog (reproduced in <xref target="yang-catalog-module"/>)
          so that the YANG Catalog could be used to retrieve the YANG
          modules later.
          The vendor of the platform can be identified via its name
          'vendor' or its PEN number 'vendor-pen', as described in
          <xref target="RFC9371"/>.
          When the 'ietf-system' feature is supported, the parameters
          are sourced from the RFC 7317 ietf-system module
          (system/contact, system/hostname, system/location, and
          system-state/platform).
        </t>
        <t>
          An implementation of the 'ietf-platform-manifest' module MUST
          support at least one of the following features:
        </t>
        <ul>
          <li>
            'yang-catalog': provides platform details as defined in the
            YANG Catalog schema reproduced in <xref target="yang-catalog-module"/>.
          </li>
          <li>
            'ietf-system': provides platform details sourced from the
            RFC 7317 ietf-system module (system/contact, system/hostname,
            system/location, and system-state/platform).
          </li>
        </ul>
        <t>
          When both the 'yang-catalog' and 'ietf-system' features are supported, the 'os-version' leaf appears twice with distinct semantics:
          'platforms/platform/os-version' conveys the YANG-Catalog-aligned operating-system version, whereas
          'platforms/platform/system-state/platform/os-version' conveys the running system's operational version level as defined in <xref target="RFC7317"/>.
          These two values serve different purposes and are not expected to be identical.
        </t>
        <t>
          More generally, when both feature sets are supported they describe overlapping aspects of the platform (notably its operating-system identity) using different leafs: the 'yang-catalog' leafs report YANG Catalog-aligned metadata, while the 'ietf-system' leafs report the running system's state per <xref target="RFC7317"/>.
          These are populated independently and are complementary rather than competing; no precedence is defined between them.
        </t>
        <t>
          The Platform Manifest also includes the contents of the YANG Library <xref target="RFC8525"/>.
          That module set is particularly useful to retrieve the YANG modules associated to a subscription by analyzing the xpath filters or the subtree filters.
          In XPath filters, the prefixes are by default YANG module names (see the description of the leaf 'stream-xpath-filter' in <xref target="RFC8639" section="4"/>).
          Subtree filters are based on namespaces.
        </t>
      </section>
      <section anchor="platform-manifest-model">
        <name>"ietf-platform-manifest" YANG module</name>
        <t>
          This section defines the "ietf-platform-manifest" YANG module.
        </t>
        <sourcecode name="ietf-platform-manifest@2026-10-24.yang" type="yang" markers="true"><![CDATA[
module ietf-platform-manifest {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-platform-manifest";
  prefix p-mf;

  import ietf-yang-library {
    prefix yanglib;
    reference
      "RFC 8525: YANG Library";
  }
  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types";
  }

  organization
    "IETF OPSAWG (Operations and Management Area Working Group)";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Author:   Benoit Claise   <mailto:benoit@everything-ops.net>
     Author:   Jean Quilbeuf   <mailto:jean.quilbeuf@huawei.com>
     Author:   Diego R. Lopez  <mailto:diego.r.lopez@telefonica.com>
     Author:   Ignacio Dominguez Martinez-Casanueva
     <mailto:i.domingumar@gmail.com>
     Author:   Thomas Graf     <mailto:thomas.graf@swisscom.com>";
  description
    "This module describes the platform information to be used as
     context of data collection from a given network element. The
     contents of this model must be streamed and stored along with
     the data streamed and stored from the network element so that
     the platform context of the data collection can be retrieved
     when the data is used for analysis.

     The data content of this model changes infrequently, but it
     can change during operation, for example the hostname,
     contact, location, licensing-related software flavor, or the
     set of supported schemas, and not only at a software upgrade
     or reboot.

     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.

     An implementation of this module MUST support at least one of
     the features 'yang-catalog' or 'ietf-system'.

     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-10-24 {
    description
      "Initial revision";
    reference
      "RFC XXXX: A Data Manifest for Contextualized Telemetry Data";
  }

  feature yang-catalog {
    description
      "The implementation provides platform details following the
       YANG Catalog conventions (name, vendor, vendor-pen,
       software-version, software-flavor, os-version, os-type).";
  }

  feature ietf-system {
    description
      "The implementation provides platform details sourced from
       the RFC 7317 ietf-system system-state/platform container
       (os-name, os-release, os-version, machine).";
    reference
      "RFC 7317: A YANG Data Model for System Management";
  }

  grouping platform-yang-catalog {
    description
      "Platform details as stored in the YANG Catalog.
       Used when feature yang-catalog is supported.";
    leaf name {
      type string;
      description
        "Model of the platform from which data is collected.";
    }
    leaf vendor {
      type string;
      description
        "Organization that implements that platform.";
    }
    leaf vendor-pen {
      type uint32;
      description
        "Vendor's registered Private Enterprise Number";
      reference
        "RFC 9371: Registration Procedures for Private Enterprise
         Numbers (PENs)";
    }
    leaf software-version {
      type string;
      description
        "Name of the version of software. With respect to most
         network device appliances, this will be the operating system
         version. But for other YANG module implementation, this
         would be a version of appliance software. Ultimately, this
         should correspond to a version string that will be
         recognizable by the consumers of the platform.";
    }
    leaf software-flavor {
      type string;
      description
        "A variation of a specific version where YANG model support
         may be different.  Depending on the vendor, this could be a
         license, additional software component, or a feature set.";
    }
    leaf os-version {
      type string;
      description
        "Version of the operating system using this module. This is
         primarily useful if the software implementing the module is
         an application that requires a specific operating system
         version.";
    }
    leaf os-type {
      type string;
      description
        "Type of the operating system using this module. This is
         primarily useful if the software implementing the module is
         an application that requires a specific operating system
         type.";
    }
  }

  grouping platform-ietf-system {
    description
      "Platform details sourced from the RFC 7317 ietf-system
       module: system/contact, system/hostname, system/location,
       and system-state/platform.";
    reference
      "RFC 7317: A YANG Data Model for System Management";
    container system {
      description
        "System group configuration.";
      reference
        "RFC 7317: A YANG Data Model for System Management,
         Section 3.1";
      leaf contact {
        type string;
        description
          "The administrator contact information for the system.";
        reference
          "RFC 7317: A YANG Data Model for System Management,
           Section 3.1";
      }
      leaf hostname {
        type inet:domain-name;
        description
          "The name of the host. This name can be a single domain
           label or the fully qualified domain name of the host.";
        reference
          "RFC 7317: A YANG Data Model for System Management,
           Section 3.1";
      }
      leaf location {
        type string;
        description
          "The system location.";
        reference
          "RFC 7317: A YANG Data Model for System Management,
           Section 3.1";
      }
    }
    container system-state {
      config false;
      description
        "System group operational state.";
      reference
        "RFC 7317: A YANG Data Model for System Management,
         Section 3.1";
      container platform {
        description
          "Contains vendor-specific information for identifying
           the system platform and operating system.";
        reference
          "RFC 7317: A YANG Data Model for System Management,
           Section 3.1";
        leaf os-name {
          type string;
          description
            "The name of the operating system in use.";
          reference
            "RFC 7317: A YANG Data Model for System Management,
             Section 3.1";
        }
        leaf os-release {
          type string;
          description
            "The current release level of the operating system.";
          reference
            "RFC 7317: A YANG Data Model for System Management,
             Section 3.1";
        }
        leaf os-version {
          type string;
          description
            "The current version level within the release of the
             operating system.";
          reference
            "RFC 7317: A YANG Data Model for System Management,
             Section 3.1";
        }
        leaf machine {
          type string;
          description
            "A vendor-specific identifier string for the hardware
             of the managed device.";
          reference
            "RFC 7317: A YANG Data Model for System Management,
             Section 3.1";
        }
      }
    }
  }

  container platforms {
    config false;
    description
      "Top container including all platforms in scope. If this model
       is hosted on a single device, it should contain a single entry
       in the list. At the network level, it should contain an entry
       for every monitored platform.";
    list platform {
      key "id";
      description
        "Contains information about the platform that allows
         identifying and understanding the individual data collection
         information.";
      leaf id {
        type string;
        description
          "Identifies a given platform on the network, for instance
           the 'sysName' of the platform. The 'id' has to be unique
           within the network scope at every point in time. The same
           id can point to different platform if they are not
           simultaneously part of the network, e.g., when a device
           associated to a particular id is replaced.";
      }
      uses platform-yang-catalog {
        if-feature "yang-catalog";
      }
      uses platform-ietf-system {
        if-feature "ietf-system";
      }
      uses yanglib:yang-library-parameters;
    }
  }
}
            ]]>
        </sourcecode>
      </section>
    </section>

    <section anchor="mapping" >
      <name>Data Manifest and the Collected Data</name>
      <t>
        This section focuses on associating the collected data to the Data Manifest.
        As this document specifically focuses on giving context on data collected via Network Telemetry, it is assumed that a Network Telemetry system is available.
        Another premise of this document is the storage of the collected data into a database for later use.
        This document assumes that such a database exists and can be used for storing the Data Manifest.
      </t>
      <section anchor="collecting_dm">
        <name>Collecting the Data Manifest</name>
        <t>
          The Data Manifest MUST be streamed and stored along with the collected data so that the collected data can be interpreted correctly.
          If the collected data are moved to a different place (typically a database), the companion Data Manifest MUST follow the collected data.
          The Data Manifest MUST be updated when the Data Manifest information changes, for example, when a router is upgraded, when a new Network Telemetry subscription is configured, or when the Network Telemetry subscription parameters change.
          The Data Manifest can itself be considered as a time series, and stored similarly to the collected data.
          These requirements concern the information that is kept and its retrievability, not the design of the storage system: a time-series database, a relational database, or files all satisfy them if the manifest versions that applied to a datapoint can be retrieved as described in <xref target="mapping_dm"/>.
          A manifest regenerated from the current state of the platform does not satisfy them, since it would not reflect the context at collection time.
        </t>
        <t>
          This document recommends reusing existing Network Telemetry systems (in-band approach) to lower the efforts for implementing this approach.
          To enable a platform supporting Network Telemetry to also support the Data Manifest, this platform supports
          the model from Section <xref target="platform-manifest" format="counter"/> and, optionally, the non-normative example model from Appendix <xref target="data-collection-manifest" format="counter"/>.
          The collection of the Data Manifest MUST be explicitly configured by the collector by requesting the relevant subscriptions.
          These subscriptions MUST include the Platform Manifest. Where the Data Collection Manifest (the non-normative example model of Appendix <xref target="data-collection-manifest" format="counter"/>) is implemented, the collector also subscribes to it, possibly limited to the subscriptions for which the context needs to be retrieved later.
          <xref target="inband-example"/> shows how the in-band approach would work while storing to a TSDB.
        </t>
        <t>
          Each type of manifest has its own rough frequency of update: the Platform Manifest when the platform information it represents changes, and the Data Collection Manifest when a subscription is modified or when operational state such as "current-period" changes.
          The Data Manifest SHOULD be streamed with the YANG-Push on-change feature <xref target="RFC8641"/> (also called event-driven telemetry) whenever possible.
        </t>
        <t>
          Most of the Platform Manifest changes infrequently, but its contents can change during operation, for example the hostname, contact, location, licensing-related software flavor, or the set of supported schemas, and not only at a software upgrade or reboot.
          The Platform Manifest therefore needs to be re-collected whenever the information it represents changes, which the YANG-Push on-change feature makes possible, rather than relying on reboot detection alone.
        </t>
        <t>
          The collector MUST obtain a complete initial snapshot of the Platform Manifest and, where implemented, the relevant Data Collection Manifest before treating historical associations as definitive.
          An on-change YANG-Push subscription can provide this baseline using "sync-on-start" set to "true" <xref target="RFC8641"/>.
        </t>
        <t>
          Where on-change subscriptions are used to preserve exact manifest history, they should cover all relevant context changes, use a "dampening-period" of zero, and not exclude any change type (such as "replace" or "delete") that can alter the manifest.
          A publisher can accept an on-change subscription while supporting on-change for only some of the selected nodes <xref target="RFC8641"/>; changes to the other nodes are then not reported.
          If intermediate changes are unavailable, the affected history MUST be treated as incomplete.
        </t>
        <t>
          A reboot is not signalled by a "subscription-terminated" notification: the reasons listed in <xref target="RFC8639" section="2.7.3"/> do not include a reboot, and a rebooting publisher is not positioned to send one.
          A collector instead learns of a possible reboot when the transport session of a dynamic subscription is lost, or when a configured subscription is re-announced with a "subscription-started" notification (<xref target="RFC8639" section="2.7.1"/>).
          Following a platform restart or replacement, the collector MUST refresh the relevant manifests.
          Following transport reconnection, subscription resumption, or another collection discontinuity, it MUST likewise refresh them unless continuity of the relevant manifest history has been established, for example through the hostname and sequence number of <xref target="I-D.ietf-netconf-notif-envelope"/>.
        </t>
        <t>
          When an "incomplete-update" indication <xref target="RFC8641"/> or another loss of manifest history is detected, the collector MUST obtain a new complete baseline using a mechanism applicable to the subscription, for example the "resync-subscription" RPC for an on-change subscription created with "establish-subscription" <xref target="RFC8641"/>.
          A new baseline restores knowledge of the current context; it does not, by itself, reconstruct missing historical changes.
          Datapoints in an unrecovered interval remain subject to the uncertainty rules in <xref target="mapping_dm"/>.
        </t>
        <t>
          Regarding the Data Collection Manifest, the elements common to all subscriptions, such as the stream definitions and the common filters, might be updated less frequently than the subscriptions.
          Relying on YANG-Push on-change feature enables keeping an up-to-date version of the Data Collection Manifest.
        </t>
        <t>
          The underlying storage system should accommodate the various rates at which different parts of the Data Manifest are updated.
          In particular, storing the Platform Manifest should be optimized to avoid duplicating repeated content and only storing a new version when there is a change in the manifest.
        </t>
      </section>

      <section anchor="mapping_dm">
        <name>Mapping Collected Data to the Data Manifest</name>
        <t>
          As explained in the introduction, three elements are necessary to identify the Data Manifest associated to a datapoint:
        </t>
        <ul>
          <li>the time at which the data was observed on the device, </li>
          <li>the originating platform sending the data, and</li>
          <li>the identifier of the subscription that produced the data.</li>
        </ul>
        <t>
          These elements can be either known to the collector, if it is the
          one configuring the collection, or retrieved via dedicated headers as proposed, e.g., in <xref target="I-D.ietf-netconf-notif-envelope"/>.
          The timestamp used here is the observation time, i.e., when the data was observed on the device, as distinct from the event time at which the update was emitted.
          To enable later retrieval of the Data Manifest associated to a datapoint, the collector MUST keep the subscription identifier, the platform identifier, and the observation timestamp in the metadata of the collected values.
          The collector MUST also retain the timestamps and continuity information needed to determine the applicability of stored manifest versions (for example, the hostname and sequence number of <xref target="I-D.ietf-netconf-notif-envelope"/>).
        </t>
        <t>
          A manifest change has an effective time: the time at which the changed context became applicable to the collected data.
          This time needs to be expressed on a time base comparable with the datapoint observation timestamps.
          The notification emission time and the collector reception time should not be substituted for the effective time unless their equivalence has been established.
        </t>
        <t>
          When using <xref target="I-D.ietf-netconf-notif-envelope"/>, a change reported after the subscription is established, for example to the hostname in the Platform Manifest, is carried in a "push-change-update" with "ietf-yp-observation:point-in-time" set to "state-changed"; this document uses its observation timestamp ("ietf-yp-observation:timestamp") as the effective time of that change.
          This is the time at which the change was observed, which can be later than the time at which it became effective.
          Changes with different effective times are best reported separately if their individual applicability is to be preserved.
          A dampening period combines the changes made within it into a single update record <xref target="RFC8641"/>, so a subscription for which individual change times matter should not use one.
        </t>
        <t>
          An initial or resynchronization snapshot establishes a baseline.
          Its effective time is the time at which its state was observed or, for the initial snapshot of an on-change subscription with "sync-on-start" set to "true" carried with <xref target="I-D.ietf-netconf-notif-envelope"/>, the time given by its "ietf-yp-observation:timestamp" with "ietf-yp-observation:point-in-time" set to "initial-state", as defined in that document.
          The collector should not infer that this baseline also applied before that time unless retained history establishes that applicability.
        </t>
        <t>
          For a datapoint observed at time T, the collector selects the Platform Manifest matching the platform identifier and, where implemented, the Data Collection Manifest matching both the platform and subscription identifiers.
          Within each applicable history, it selects the latest version whose effective time is at or before T.
          This association is definitive only when the collector has established a baseline and a complete relevant change history through T.
        </t>
        <t>
          Manifest updates can arrive after the datapoints they describe.
          The collector needs to accommodate such updates, either by deferring the association or by treating an existing association as provisional and revising it when necessary.
          Receipt of a datapoint, or the absence of a manifest update, does not establish that the manifest history is complete through the observation time of the datapoint.
        </t>
        <t>
          Missing updates, unreported intermediate changes, or insufficient timestamp accuracy can prevent a unique association.
          In those cases, the collector MUST preserve an indication that the context is unknown or provisional, rather than presenting the last received manifest as definitively applicable.
          These indications are collector metadata; this document does not define their encoding.
        </t>
        <t>
          Platform and subscription identifiers are not necessarily unique over time: a subscription identifier may be reassigned to a new subscription, and a platform identifier, which identifies a role rather than a specific device (<xref target="operational-considerations"/>), may be taken over by a replacement device.
          A replacement platform or a newly created subscription using a previous identifier MUST NOT automatically inherit the previous instance's manifest history.
        </t>
        <t>
          When the collector learns that an identifier has been reused, it MUST record a new instance boundary and establish a fresh baseline for the relevant manifests, even if their contents are unchanged; the boundary does not require duplicating unchanged manifest content.
          Earlier history remains distinguishable from the new instance's history.
          How the collector learns of a reuse is deployment-specific: the (re-)establishment of the subscription (<xref target="collecting_dm"/>) is one signal, and an operational event such as a device replacement is another.
          A reuse that is not learned of is covered by the next paragraph.
          Like the other indications described above, the instance boundary is collector metadata, and this document does not define its encoding.
        </t>
        <t>
          Identifier and timestamp matching is sufficient only when the applicable instance and its validity interval can be determined unambiguously.
          If the transition time is unknown, or timestamps cannot distinguish the instances, the collector treats the affected datapoints as having unknown or provisional context, as described above.
          A fresh baseline is not assigned retrospectively to datapoints preceding its observation time without supporting history, even when its effective time is earlier.
        </t>
        <t>
          The reliability of the collection of the Data Manifest is the same as the reliability of the data collection itself, since the Data Manifest is like any other data.
        </t>
      </section>
    </section>
    <section anchor="operational-considerations">
      <name>Operational Considerations</name>
       <t>
         The Data Manifest is partially standardized in this document since only the Platform Manifest has a normative YANG module.
         <xref target="model-tree"/> explains why the Data Collection Manifest cannot be normative at the current time.
         In practice, the Data Collection Manifest might be difficult to implement due to the dependency on YANG Schema Mount and the lack of a normative YANG module.
         In that case, the solution proposed in the next paragraph covers the creation of the Data Collection Manifest.
       </t>
       <t>
         It is expected that the Data Manifest is streamed directly from the network equipment, along with YANG-Push <xref target="RFC8641"/> data.
         However, if the equipment Network Telemetry does not yet support the YANG modules from the Data Manifest specified in this document, the telemetry collector could populate the Data Manifest from available information collected from the platform.
         This latter option requires efforts on the Network Telemetry data collection side, as the information gathered in the Data Manifest proposed in this document could be scattered among various standard and vendor-specific YANG modules <xref target="RFC8199"/>, that depend on the platform.
       </t>
       <t>
         The current approach relies on the hostname for identifying platforms, which identifies a role rather than a particular piece of hardware.
         As a consequence, there is no simple solution for obtaining the Data Manifest of a given piece of hardware reused for different roles in the same network.
         In general, the problem of having consistent metadata among various protocols is still an open problem as detailed in "An Update of Operators Requirements on Network Management Protocols and Modelling" <xref target="I-D.ietf-nmop-rfc3535-20years-later"/>.
       </t>
       <t>
         The requirement that an implementation support at least one of the 'yang-catalog' or 'ietf-system' features (<xref target="platform-manifest-model-tree"/>) is a conformance requirement on implementations: YANG provides no way to mandate that at least one feature from a set be supported, so this constraint cannot be expressed in, or checked by, the schema.
         A module with neither feature enabled would still validate, but the resulting Platform Manifest conveys no platform details beyond the platform identifier, so implementations are expected to support at least one.
       </t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>
        This section is modeled after the template described in <xref target="RFC9907" section="3.7.1"/>.
      </t>
      <t>
        The YANG modules defined in this document are designed to be accessed via YANG-based management protocols, such as 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="RFC9846"/>, 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>
        All data nodes in these modules are read-only (config false), i.e., operational state in the sense of the Network Management Datastore Architecture <xref target="RFC8342"/>; the modules define no writable data nodes and no RPC or action operations.
      </t>
      <t>
        Some of the readable data nodes in the "ietf-platform-manifest" module may be considered sensitive or vulnerable in some network environments.
        It is thus important to control read access (e.g., via get or notification) to these data nodes. Specifically, the following subtrees and data nodes have particular sensitivities/vulnerabilities:
      </t>
      <ul>
        <li>
          <tt>platforms/platform</tt> contains details about the platform that an attacker could use to find the known vulnerabilities of the platform.
        </li>
      </ul>
      <t>
        Some of the readable data nodes in the "ietf-yp-current-period" module may be considered sensitive or vulnerable in some network environments.
        It is thus important to control read access (e.g., via get or notification) to these data nodes. Specifically, the following subtrees and data nodes have particular sensitivities/vulnerabilities:
      </t>
      <ul>
        <li>
          <tt>current-period</tt> exposes the actual data collection period, and hence the collection schedule. An attacker that learns when data is collected, and in particular when it is not, could time malicious activity to fall in the gaps between collections to reduce the likelihood of detection.
        </li>
      </ul>
      <t>
        Because this approach reuses an existing telemetry system, the additional exposure lies in the new content carried in the manifests.
        Read access to the module data nodes is controlled by NACM as described above.
        The manifests and the collected data are, however, typically also retained in downstream systems, such as a TSDB, whose access-control capabilities vary and may be coarse-grained or absent.
        The secure transport that protects the data in transit does not extend to this retained copy.
        Operators should therefore store the manifests and the collected data only in systems able to enforce access control appropriate to the sensitivity of the data; where the storing system cannot, the data should be protected by compensating controls, such as restricting network and operator access to the store and encrypting the data at rest.
        Reporting only the metadata appropriate for the deployment (as discussed below) further limits this exposure.
      </t>
      <t>
        A telemetry system can usually be configured to report some of these metadata items and not others.
        Operators should expose only the metadata appropriate for their environment: where an item, such as the platform details or the collection period, would reveal information that is sensitive in a given deployment, the corresponding data node should not be reported.
      </t>
      <t>
        Integrity matters for all the information defined or used here (the Platform Manifest, the Data Collection Manifest, and the collected data they describe), both while in transit and while stored.
        Undetected modification can lead to incorrect interpretation of the data: an attacker could conceal activity by altering or removing context, or cause incorrect conclusions by making correct data appear anomalous.
        In transit, integrity is provided by the secure transport required above.
        For the stored copy, integrity and provenance can be protected by a signing mechanism such as <xref target="I-D.ietf-opsawg-yang-provenance"/> and/or by the integrity controls of the storing system.
        Operators should ensure that the stored manifests and collected data are integrity-protected.
      </t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>RFC Ed.: replace XXXX with actual RFC number and remove this note.</t>
      <t>
        IANA is requested to register the following URIs in the "ns" subregistry within the "IETF XML Registry" <xref target="RFC3688"/>:
      </t>
      <artwork>
 URI: urn:ietf:params:xml:ns:yang:ietf-platform-manifest
 Registrant Contact:  The IESG.
 XML: N/A; the requested URI is an XML namespace.

 URI: urn:ietf:params:xml:ns:yang:ietf-yp-current-period
 Registrant Contact:  The IESG.
 XML: N/A; the requested URI is an XML namespace.
      </artwork>
      <t>
        IANA is requested to register the following YANG modules in the "YANG Module Names" subregistry <xref target="RFC6020"/> within the "YANG Parameters" registry.
      </t>
      <artwork>
 Name: ietf-platform-manifest
 Maintained by IANA?  N
 Namespace: urn:ietf:params:xml:ns:yang:ietf-platform-manifest
 Prefix: p-mf
 Reference: RFC XXXX

 Name: ietf-yp-current-period
 Maintained by IANA?  N
 Namespace: urn:ietf:params:xml:ns:yang:ietf-yp-current-period
 Prefix: yp-cp
 Reference: RFC XXXX
      </artwork>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7317.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8525.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8639.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9911.xml"/>
    </references>
    <references title="Informative References">
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3418.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7951.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8199.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8343.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8345.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8528.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8792.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9846.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9196.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9232.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9371.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.claise-netconf-metadata-for-collection.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-notif-envelope.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-opsawg-yang-provenance.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.kll-yang-label-tsdb.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-ivy-network-inventory-yang.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9940.xml"/>
      <xi:include href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9907.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-nmop-rfc3535-20years-later.xml"/>
      <reference anchor="DataMesh" target="https://www.datamesh-architecture.com/">
        <front>
          <title>Datamesh Architecture</title>
          <author/>
        </front>
      </reference>
      <reference anchor="DataMeshRA" target="https://doi.org/10.1007/978-3-031-79059-1_21">
        <front>
          <title>Towards a Data Mesh Reference Architecture</title>
          <author initials="D." surname="van der Werf"/>
          <author initials="J." surname="Moreira"/>
          <author initials="J.P.S." surname="Piest"/>
          <date year="2025"/>
        </front>
        <seriesInfo name="DOI" value="10.1007/978-3-031-79059-1_21"/>
        <refcontent>Enterprise Design, Operations, and Computing. EDOC 2024 Workshops, Lecture Notes in Business Information Processing, vol. 537, Springer, Cham</refcontent>
      </reference>
      <reference anchor="yanglint" target="https://github.com/CESNET/libyang">
        <front>
          <title>Yanglint</title>
          <author/>
        </front>

      </reference>
    </references>
    <section anchor="data-collection-manifest">
      <name>Data Collection Manifest</name>
      <t> This section is non-normative.</t>
      <section anchor="model-tree">
        <name>Overview of the Model</name>
        <t>
          <xref target="data-collection-manifest-tree"/> contains the YANG tree diagram <xref target="RFC8340"/> of the "example-collection-manifest" module.
          The module relies upon the YANG Schema mount <xref target="RFC8528"/> to reuse existing YANG modules describing the current data collection status.
          This module is an example, i.e. non-normative, as YANG Schema mount does not support design-time schema mount.
          <xref target="schema-mount-version"/> explains how the YANG tree is obtained.
        </t>
        <figure anchor="data-collection-manifest-tree">
          <name>YANG tree diagram for example-collection-manifest module</name>
          <artwork type="ascii-art"><![CDATA[
module: example-collection-manifest
  +--ro data-collections
     +--mp data-collection* [platform-id]
        +--ro platform-id    -> /p-mf:platforms/p-mf:platform/p-mf:id
        +--ro streams/
        |  +--ro stream* [name]
        |     +--ro name           string
        |     +--ro description?   string
        +--ro filters/
        |  +--ro stream-filter* [name]
        |  |  +--ro name             string
        |  |  +--ro (filter-spec)?
        |  |     +--:(stream-subtree-filter)
        |  |     +--:(stream-xpath-filter)
        |  |        +--ro stream-xpath-filter?   yang:xpath1.0
        |  |                {xpath}?
        |  +--ro selection-filter* [filter-id]
        |     +--ro filter-id        string
        |     +--ro (filter-spec)?
        |        +--:(datastore-subtree-filter)
        |        +--:(datastore-xpath-filter)
        |           +--ro datastore-xpath-filter?   yang:xpath1.0
        |                   {sn:xpath}?
        +--ro subscriptions/
          +--ro subscription* [id]
             +--ro id                  subscription-id
             +--ro (target)
             |  +--:(stream)
             |  |  +--ro (stream-filter)?
             |  |  |  +--:(by-reference)
             |  |  |  |  +--ro stream-filter-name
             |  |  |  |          stream-filter-ref
             |  |  |  +--:(within-subscription)
             |  |  |     +--ro (filter-spec)?
             |  |  |        +--:(stream-subtree-filter)
             |  |  |        +--:(stream-xpath-filter)
             |  |  |           +--ro stream-xpath-filter?
             |  |  |                   yang:xpath1.0 {xpath}?
             |  |  +--ro stream             stream-ref
             |  +--:(datastore)
             |     +--ro datastore             identityref
             |     +--ro (selection-filter)?
             |        +--:(by-reference)
             |        |  +--ro selection-filter-ref
             |        |          selection-filter-ref
             |        +--:(within-subscription)
             |           +--ro (filter-spec)?
             |              +--:(datastore-subtree-filter)
             |              +--:(datastore-xpath-filter)
             |                 +--ro datastore-xpath-filter?
             |                         yang:xpath1.0 {sn:xpath}?
             +--ro stop-time?          yang:date-and-time
             +--ro encoding?           encoding
             +--ro receivers
             |  +--ro receiver* [name]
             |     +--ro name                      string
             |     +--ro sent-event-records?
             |     |       yang:zero-based-counter64
             |     +--ro excluded-event-records?
             |     |       yang:zero-based-counter64
             |     +--ro state                     enumeration
             +--ro (update-trigger)?
                +--:(periodic)
                |  +--ro periodic!
                |     +--ro period            centiseconds
                |     +--ro anchor-time?      yang:date-and-time
                |     +--ro current-period?   yp:centiseconds
                +--:(on-change) {on-change}?
                   +--ro on-change!
                      +--ro dampening-period?   centiseconds
                      +--ro sync-on-start?      boolean
                      +--ro excluded-change*    change-type
              ]]></artwork>
        </figure>
        <t>
          The 'data-collections' container contains the information related to each YANG-Push subscription.
          As for the Platform Manifest, these subscriptions are indexed by the 'platform-id', so that all subscriptions in the network can be represented at the network level without any conflict.
        </t>
        <t>
          As most of the information related to YANG-Push subscription
          <xref target="RFC8639"/> and <xref target="RFC8641"/> is stored in the "ietf-yang-push" module, these modules are mounted.
          These modules have a part common to all subscriptions of the platform, stored in the 'streams' and 'filters' containers.
          The information about subscriptions themselves are stored in the 'subscriptions/subscription' list, indexed by a subscription identifier.
        </t>
        <t>
          In the 'periodic' container of the subscription object, next to the configured 'period', the 'current-period' indicates the period currently used between two successive observations of the subscribed data.
          That leaf can therefore only be present when the subscription is periodic.
          The current period might differ from the configured period if the platform implements a mechanism to increase the collection period when it is overloaded.
          Having the current period information is crucial to understand if telemetry is missing because of a bug or a packet loss or simply because it was dynamically adjusted by the platform.
        </t>
        <t>
          The 'current-period' data node is added by the module 'ietf-yp-current-period' presented in <xref target="data-manifest-statistics-module"/>.
          This module augments the 'periodic' container that 'ietf-yang-push' adds to the subscription list from the module 'ietf-subscribed-notifications'.
          It is mounted as well via the YANG Schema Mount mechanism.
          The module for the Data Collection Manifest is presented in <xref target="module-code"/>.
        </t>
      </section>
      <section anchor="module-code">
        <name>The "example-collection-manifest" YANG module</name>
        <t>
          This section includes the code of the "example-collection-manifest" YANG module.
          The extension data file for YANG schema mount is provided in <xref target="schema-mount-version"/>.
          The Data Collection Manifest should conform to the model obtained by combining these two specifications.
        </t>
        <sourcecode name="example-collection-manifest@2026-10-24.yang"
                    type="yang"><![CDATA[
module example-collection-manifest {
  yang-version 1.1;
  namespace "http://example.com/example-collection-manifest";
  prefix ex-d-mf;

  import ietf-platform-manifest {
    prefix p-mf;
    reference
      "RFC XXXX: A Data Manifest for Contextualized Telemetry
                 Data";
  }
  import ietf-yang-schema-mount {
    prefix yangmnt;
    reference
      "RFC 8528: YANG Schema Mount";
  }

  organization
    "IETF OPSAWG (Operations and Management Area Working Group)";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>
     Author:   Benoit Claise   <mailto:benoit@everything-ops.net>
     Author:   Jean Quilbeuf   <mailto:jean.quilbeuf@huawei.com>
     Author:   Diego R. Lopez  <mailto:diego.r.lopez@telefonica.com>
     Author:   Ignacio Dominguez Martinez-Casanueva
     <mailto:i.domingumar@gmail.com>
     Author:   Thomas Graf     <mailto:thomas.graf@swisscom.com>";
  description
    "This module describes the context of data collection from a
     given network element. The contents of this model must be
     streamed along with the data streamed from the network
     element so that the context of the data collection can
     be retrieved later.

     This module must be completed with
     ietf-platform-manifest
     to capture the whole context of a data collection session.

     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-10-24 {
    description
      "Initial revision";
    reference
      "RFC XXXX: A Data Manifest for Contextualized Telemetry Data";
  }

  container data-collections {
    config false;
    description
      "Contains the configuration and statistics for the collected
       data, per node in the network.";
    list data-collection {
      key "platform-id";
      description
        "Defines the information for each collected object.";
      leaf platform-id {
        type leafref {
          path "/p-mf:platforms/p-mf:platform/p-mf:id";
        }
        description
          "Identifier of the platform collecting the data. This
           identifier is the same as the one in the Platform
           Manifest.";
      }
      yangmnt:mount-point "yang-push-collection" {
        description
          "This mount point must mount the following modules and
           their dependencies:
             * ietf-subscribed-notifications
             * ietf-yang-push
             * ietf-yp-current-period.
           This mount point must not mount any other modules.";
        reference
          "RFC 8639: Subscription to YANG Notifications
           RFC 8641: Subscription to YANG Notifications for datastore
                     updates";
      }
    }
  }
}
    ]]>
        </sourcecode>
      </section>
    </section>
    <?rfc needLines="100"?>
    <section removeInRFC="true">
      <name>Changes between revisions</name>
      <t>v16 -> v17 </t>
      <ul>
        <li>address IESG feedback</li>
        <li>Moved 'current-period' into the 'periodic' container (augment target changed, 'when' statement removed)</li>
        <li>Clarified what 'current-period' reports and its relation to RFC 8641 (Section 4)</li>
        <li>Added effective-time, baseline, late-update and uncertain-context rules (Section 6.2)</li>
        <li>Added restart, resynchronization and identifier-reuse handling (Sections 6.1 and 6.2)</li>
        <li>Strengthened the Security Considerations for stored data (access control, integrity)</li>
        <li>Updated references: added RFC 7950, RFC 7951 and RFC 8342; RFC 8528 now informative; RFC 9846 replaces RFC 8446; draft-ietf-netconf-notif-envelope replaces draft-netana-netconf-notif-envelope</li>
        <li>Appendix E now uses the RFC 9911 revisions of the common type modules</li>
        <li>Updated the module revision dates to 2026-10-24</li>
      </ul>
      <t>v15 -> v16 </t>
      <ul>
        <li>address the genart directorate review</li>
      </ul>
      <t>v14 -> v15 </t>
      <ul>
        <li>address the YANG doctor and SecDir reviews</li>
      </ul>
      <t>v13 -> v14 </t>
      <ul>
        <li>Removed duplicated text in the Security Considerations section</li>
      </ul>
      <t>v12 -> v13 </t>
      <ul>
        <li>Section 6.1 MUST now applies only to the Platform Manifest</li>
        <li>Removed the 1..1023 string length bounds</li>
        <li>Noted the distinct semantics of the duplicated os-version leaf</li>
        <li>Explained why a platform adjusts rather than rejects the collection (Section 4; superseded in v17)</li>
        <li>Tightened the Data Manifest definition</li>
        <li>Added no-writable-node/no-RPC statements to the Security Considerations</li>
        <li>Noted that "at least one feature" is not schema-enforceable</li>
        <li>Dropped the model-catalog reference from the yang-catalog feature</li>
        <li>Security template reference updated to RFC 9907; transport aligned with its Section 3.7.1 (SSH now RFC 4252)</li>
        <li>Fixed the example namespace mismatch (module vs YANG library)</li>
        <li>Updated the provenance reference to draft-ietf-opsawg-yang-provenance</li>
        <li>Editorial: module-name typo, RFC spacing, "concepts", mailto:, empty Contributors removed, example revision date</li>
      </ul>
      <t>v11 -> v12 </t>
      <ul>
        <li>Moved the non-normative Data Collection Manifest to the appendix (Appendix A)</li>
        <li>Clarified that the example is valid only when the 'yang-catalog' feature is enabled</li>
      </ul>
      <t>v10 -> v11 </t>
      <ul>
        <li>Added features 'yang-catalog' and 'ietf-system' to the Platform Manifest: platform details can be sourced from the YANG Catalog fields or the RFC 7317 ietf-system model, and at least one feature must be supported</li>
        <li>Added RFC 7317 and RFC 9911 as normative references</li>
        <li>Added the RFC 8174 key-words boilerplate to the ietf-platform-manifest module; updated the copyright year to 2026</li>
        <li>Updated the example</li>
      </ul>
      <t>v09 -> v10 </t>
      <ul>
        <li>Address Mahesh comments</li>
      </ul>
      <t>v08 -> v09 </t>
      <ul>
        <li>Removed unused ref, move 9232 to informational</li>
        <li>Answer Joe's comments in Operational Consideration (which is re-renamed by the way)</li>
      </ul>
      <t>v07 -> v08 </t>
      <ul>
        <li>Address comments from Thomas</li>
      </ul>
      <t>v06 -> v07 </t>
      <ul>
        <li>Operational +(and management) considerations (draft-opsarea-rfc5706bis)</li>
        <li>Make current period config false</li>
        <li>Explicit that data collection is non-normative</li>
        <li>Adjust security section to RFC8407bis new template</li>
        <li>Other comments from Med</li>
      </ul>
      <t>v05 -> v06 </t>
      <ul>
        <li>Example can be validated using yanglint</li>
        <li>Applied details comments from Joe and Med</li>
        <li>Making the "current-period" update more generic and mentioning it in the introduction</li>
        <li>Section 7 (previously 5) reworked to clarify how data manifest is collected and retrieved from a datapoint</li>
        <li>Remove use of YANG schema mount for the platform manifest and change data collection manifest to example</li>
      </ul>
      <t>v04 -> v05 </t>
      <ul>
        <li>Remove references to full-include draft, use schema mount.</li>
        <li>Explain link with schema node id</li>
      </ul>
      <t>v03 -> v04 </t>
      <ul>
        <li>State that data lineage is out of scope</li>
        <li>Replace copy-pasted version of the modules with schema mount version, use full-embed for the "real" one</li>
        <li>Schema mount version is the fallback plan if full:embed is not there fast enough.</li>
        <li>Update examples accordingly</li>
      </ul>
      <t>v02 -> v03 </t>
      <ul>
        <li>Explicit that modules are network (Controller) level</li>
        <li>InfluxDB example changed to TSDB example aligned with <xref target="I-D.kll-yang-label-tsdb"/></li>
        <li>Minor edits i.e. network element -> platform , object -> data node</li>
      </ul>
      <t> v01 -> v02 </t>
      <ul>
        <li>Updated example with latest version of the model.</li>
      </ul>
      <t>
        v00 (WG adoption) - v01
      </t>
      <ul>
        <li>Solve integrity issue by delegating to <xref target="I-D.ietf-opsawg-yang-provenance"/>.</li>
      </ul>
      <t>
        v05 -> v06
      </t>
      <ul>
        <li> Remove YANG packages </li>
        <li> Switch YANG models from device view to network view </li>
        <li> Add PEN number to identify vendors </li>
        <li> Intro rewritten with uses cases</li>
        <li> Added an "Operational Considerations" section </li>
        <li> Switch from MDT to YANG-push</li>
      </ul>
      <t>
        v04 -> v05
      </t>
      <ul>
        <li> First version of example scenario</li>
        <li> Updated affiliation</li>
        <li> Updated YANG module names to ietf-platform-manifest and ietf-data-collection-manifest </li>
        <li> Unify used terms as defined in the terminology section</li>
        <li> Replaced 'device' with 'platform' </li>
        <li> Split Section 5 into two sections for better readibility</li>
      </ul>
      <t>
        v03 -> v04
      </t>
      <ul>
        <li> Fix xym error</li>
        <li> Moved terminology after introduction</li>
        <li> Clarified the role of the module</li>
      </ul>
      <t>
        v02 -> v03
      </t>
      <ul>
        <li> Add when clause in YANG model</li>
        <li> Fix validation errors on YANG modules</li>
        <li> Augment YANG library to handle semantic versioning</li>
      </ul>
      <t>
        v01 -> v02
      </t>
      <ul>
        <li> Alignment with YANGCatalog YANG module: name, vendor </li>
        <li> Clarify the use of YANG instance file </li>
        <li> Editorial improvements </li>
      </ul>
      <t>
        v00 -> v01
      </t>
      <ul>
        <li> Adding more into data platform: yang packages, whole yanglib module to specify datastores </li>
        <li> Setting the right type for periods: int64 -> uint64 </li>
        <li> Specify the origin datastore for mdt subscription </li>
        <li> Set both models to config false </li>
        <li> Applying text comments from Mohamed Boucadair </li>
        <li> Adding an example of data-manifest file </li>
        <li> Adding rationale for reusing telemetry system for collection of the manifests </li>
        <li> Export manifest with on-change telemetry as opposed to YANG instance file </li>
      </ul>
      <t>
        v00
      </t>
      <ul>
        <li> Initial version </li>
      </ul>
    </section>
    <section anchor="example">
      <name>Example</name>
      <t>
        <xref target="manifest-example"/> shows an example, encoded in JSON <xref target="RFC7951"/>, of both a Platform Manifest and corresponding Data Collection Manifests.
        The list of YANG modules in the 'yang-library' container is kept empty for brevity.
      </t>
      <figure anchor="manifest-example">
        <name>Example of Data Manifest</name>
        <artwork><![CDATA[
{
  "ietf-platform-manifest:platforms": {
    "platform": [
      {
        "id": "PE1",
        "name": "PE1",
        "vendor": "ACME",
        "vendor-pen": 32473,
        "software-version": "3.14",
        "os-version": "2.79",
        "os-type": "ACME OS"
      }
    ]
  },
  "example-collection-manifest:data-collections": {
    "data-collection": [
      {
        "platform-id": "PE1",
        "ietf-subscribed-notifications:subscriptions": {
          "subscription": [
            {
              "id": 4242,
              "ietf-yang-push:datastore":
                                       "ietf-datastores:operational",
              "ietf-yang-push:datastore-xpath-filter":
                     "/ietf-interfaces:interfaces/interface/enabled",

              "ietf-yang-push:on-change": {},
              "receivers": {
                "receiver": [
                  {
                    "name": "yp-collector",
                    "state": "active"
                  }
                ]
              }
            },
            {
              "id": 4243,
              "ietf-yang-push:datastore":
                                       "ietf-datastores:operational",
              "ietf-yang-push:datastore-xpath-filter":
        "/ietf-interfaces:interfaces/interface/statistics/in-octets",
              "ietf-yang-push:periodic": {
                "period": 1000,
                "ietf-yp-current-period:current-period": 2000
              },
              "receivers": {
                "receiver": [
                  {
                    "name": "yp-collector",
                    "state": "active"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
  ]]></artwork>
      </figure>
      <t>
        <xref target="manifest-example"/> contains the Data Collection Manifest for two XPath subscriptions.
        With the Data Collection Manifest for the first one, with subscription identifier 4242, the exact semantics of the collected path, here the administrative status of the network interfaces, can be obtained by looking up the module in the yang-library of the corresponding Platform Manifest, to obtain the exact revision of ietf-interfaces used at collection time.
        Also, the "on-change" container indicates that data will be sent only if there is a change, thus not receiving data indicates that the administrative status of the interface did not change.
      </t>
      <t>
        The other example of a Data Collection Manifest, with subscription identifier 4243, shows how a periodic subscription is reported.
        In that example, the 'current-period' indicates that the configured period of 10s (1000 centiseconds) could not be attained and is now of 20s, for instance because the device is overloaded.
      </t>
      <t>
        <xref target="validate-example"/> gives the command line for validating this example using <xref target="yanglint"/>.
      </t>
    </section>
    <section anchor="inband-example">
      <name>An Example Based on Model-Driven Telemetry</name>
      <t>
        In this example, the goal is to collect the administrative status and number of received bytes for the interfaces of a fictional ACME device, and store the result in a TSDB.
        The metrics are collected using YANG-Push, which is configured by specifying their XPaths and when they should be collected (periodically or on-change).
        More precisely, the Xpaths to collect are "/ietf-interfaces:interfaces/interface/enabled" on every change and "/ietf-interfaces:interfaces/interface/statistics/in-octets" every 10 seconds.
        The paths here are referring to the YANG module from <xref target="RFC8343"/>.
        The configuration of YANG-Push is out of scope for this document.
        Since they don't have the same trigger, each of the path must be collected in its own subscription.
        <xref target="collection_example"/> presents an example for such a collection.
      </t>
      <figure anchor="collection_example">
        <name>Example of Collection From a Device to a TSDB</name>
        <artwork type="ascii-art"><![CDATA[
     +------------+                +--------+
     |   MDT      |--------------> |  TSDB  |
     | Collector  |                +--------+
     +------------+
          ^
          |
          |
      +---------+
      | Device  |
      +---------+
          ]]></artwork>
      </figure>
      <t>
        In the scenario depicted in <xref target="collection_example"/>, the collector receives YANG-Push data from the device and stores it into a TSDB.
        This section first presents a version without Data Manifest and then how to enrich it with the Data Manifest.
      </t>
      <t>
        Examples rely on the notation from <xref target="I-D.kll-yang-label-tsdb"/> to represent how the data is stored in the TSDB.
        Without the Data Manifest, the result of the collection would be stored as showed in <xref target="influx_before"/>.
        The "host" label indicates the devices from which the data is collected and the YANG keys are included as well.
        Here the interface "eth0" is enabled and received 1234 octets.
        In that case, the value is stored, without any way to know how the value was obtained.
      </t>
      <figure anchor="influx_before">
          <name>Storing Datapoints without Data Manifest</name>
          <artwork type="ascii-art"><![CDATA[
 * Metric: interfaces_interface_enabled
 * Value: True
 * Labels:
   - host: "PE1"
   - interfaces_interface_name: "eth0"
--
 * Metric: interfaces_interface_statistics_in_octets
 * Value: 1234
 * Labels:
   - host: "PE1"
   - interfaces_interface_name: "eth0"
          ]]></artwork>
      </figure>
      <t>
        An option for keeping the Data Manifest with the data is to store it directly into the TSDB.
        In that case, the collector can subscribe to the data exported by the module presented in this document and store it as other metrics.
        For the Platform Manifest, assuming the platform identifier is "PE1", the collector subscribes to the path "ietf-platform-manifest:platforms/platform[id=PE1]".
        For the Data Collection Manifests, the collector subscribes to the path "example-collection-manifest:data-collections/data-collection[platform-id="PE1"]/ietf-subscribed-notifications:subscriptions/subscription[id=X]" where X is the subscription identifier of existing subscriptions.
        With the approach from <xref target="I-D.kll-yang-label-tsdb"/>, the corresponding subtrees would be split into a set of datapoints, one per leaf.
        <xref target="influx_manifest"/> shows two examples of storing leafs in a TSDB.
        The first leaf is the vendor PEN number, which is part of the Platform Manifest.
        The second leaf is the Xpath filter used for subscription to the interface status.
      </t>
      <figure anchor="influx_manifest">
        <name>Example of storing Platform and Data Collection Manifest: Vendor PEN and Xpath filter.</name>
        <artwork><![CDATA[
 * Metric: platforms_platform_vendor_pen
 * Value: 32473
 * Labels:
   - host: "PE1"
   - platforms_platform_id: "PE1"
--
 * Metric: data_collections_data_collection_subscriptions_
           subscription_datastore_xpath_filter
 * Value: "/ietf-interfaces:interfaces/interface/enabled"
 * Labels:
   - host: "PE1"
   - data_collections_data_collection_platform_id: "PE1"
   - data_collections_data_collection_subscriptions_
     subscription_id: 4242
         ]]></artwork>
      </figure>
      <t>
          In the labels, the "host" might be different from the "platforms_platform_id" in case the collector is the one assembling it, i.e. for devices that do not support the Data Manifest.
          In that case, the value of this label could be the hostname of the collector.
          The host value does not matter for retrieving the Data Manifest as the platform identifier is the meaningful field.
      </t>
      <t>
        In this example, retrieving the Platform Manifest associated to a collected datapoint is done by looking for datapoints that have the label "platforms_platform_id" equal to the value of the host for that collected datapoint.
        In order to link a datapoint with the corresponding Data Collection Manifest, an additional label for the subscription identifier is required.
        For instance, the same datapoints as in <xref target="influx_before"/> could be stored as in <xref target="influx_after"/>.
      </t>
      <figure anchor="influx_after">
        <name>Storing datapoints with information to retrieve the Data Manifest</name>
        <artwork type="ascii-art"><![CDATA[
 * Metric: interfaces_interface_enabled
 * Value: True
 * Labels:
   - host: "PE1"
   - interfaces_interface_name: "eth0"
   - data_collections_data_collection_subscriptions_
     subscription_id: 4242
--
 * Metric: interfaces_interface_statistics_in_octets
 * Value: 1234
 * Labels:
   - host: "PE1"
   - interfaces_interface_name: "eth0"
   - data_collections_data_collection_subscriptions_
     subscription_id: 4243
          ]]></artwork>
      </figure>
      <t>
        From the "interfaces_interface_enabled" datapoint, one can retrieve the corresponding Data Collection Manifest by looking for datapoints whose subscription-id label equals 4242.
      </t>
      <t>
        Various optimizations could be done, such as relying on on-change subscription to modify only the leafs that changed.
        In that way, the amount of data needed for updating and storing the Data Manifest in the TSDB would be limited.
      </t>

    </section>
    <section anchor="schema-mount-version">
      <name>Generating YANG Tree Diagrams</name>
      <t>
        This section provides the files needed to generate the YANG tree diagram <xref target="RFC8340"/> from  <xref target="data-collection-manifest-tree"/>.
        The diagram was obtained using yanglint <xref target="yanglint"/> version 2.1.80, using the YANG Schema Mount <xref target="RFC8528"/>.
        It was manually edited to remove parts irrelevant to this document such as data nodes from imported modules, notifications and RPCs.
      </t>
      <t>
        In order to get a tree diagram involving YANG Schema Mount with yanglint, two data files are required, in addition to the YANG module, its dependencies and the YANG modules to be mounted.
        The first required file is the extension data, containing the YANG library to use at the mount point, this file is provided below as "data-collection-extension-data.xml".
        The second required file is the YANG library to use at the top-level context, this file is provided below as "data-collection-toplevel-yanglib.xml".
        Lines of these two files that are too long for this document are folded using the single backslash strategy of <xref target="RFC8792"/>; they need to be unfolded, for example with the "rfcfold" script of <xref target="RFC8792"/>, before use.
        The following command was used to obtain the YANG tree diagram (before manual editing).
      </t>
      <sourcecode type="bash">
        yanglint -f tree \
        -x data-collection-extension-data.xml \
        -Y data-collection-toplevel-yanglib.xml \
        example-collection-manifest@2026-10-24.yang
      </sourcecode>
      <sourcecode anchor="data-collection-extension-data" name="data-collection-extension-data.xml" type="xml" markers="true"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
              xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
  <module-set>
    <name>mountee-set</name>
    <module>
      <name>ietf-subscribed-notifications</name>
      <revision>2019-09-09</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-subscribed-notific\
ations</namespace>
      <feature>xpath</feature>
    </module>
    <module>
      <name>ietf-yang-push</name>
      <revision>2019-09-09</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-push</namespa\
ce>
      <feature>on-change</feature>
    </module>
    <module>
      <name>ietf-yp-current-period</name>
      <revision>2026-10-24</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yp-current-period<\
/namespace>
    </module>
    <module>
      <name>ietf-datastores</name>
      <revision>2018-02-14</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-datastores</namesp\
ace>
    </module>
    <module>
      <name>ietf-yang-library</name>
      <revision>2019-01-04</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-library</name\
space>
    </module>
    <import-only-module>
      <name>ietf-inet-types</name>
      <revision>2025-12-22</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-inet-types</namesp\
ace>
    </import-only-module>
    <import-only-module>
      <name>ietf-interfaces</name>
      <revision>2018-02-20</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-interfaces</namesp\
ace>
    </import-only-module>
    <import-only-module>
      <name>ietf-ip</name>
      <revision>2018-02-22</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-ip</namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-netconf-acm</name>
      <revision>2018-02-14</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-netconf-acm</names\
pace>
    </import-only-module>
    <import-only-module>
      <name>ietf-network-instance</name>
      <revision>2019-01-21</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-network-instance</\
namespace>
    </import-only-module>
    <import-only-module>
      <name>ietf-restconf</name>
      <revision>2017-01-26</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-restconf</namespac\
e>
    </import-only-module>
    <import-only-module>
      <name>ietf-yang-patch</name>
      <revision>2017-02-22</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-patch</namesp\
ace>
    </import-only-module>
    <import-only-module>
      <name>ietf-yang-types</name>
      <revision>2025-12-22</revision>
      <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-types</namesp\
ace>
    </import-only-module>
  </module-set>
  <schema>
    <name>test-schema</name>
    <module-set>mountee-set</module-set>
  </schema>
  <datastore>
    <name>ds:running</name>
    <schema>test-schema</schema>
  </datastore>
  <datastore>
    <name>ds:operational</name>
    <schema>test-schema</schema>
  </datastore>
  <content-id>2</content-id>
</yang-library>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
  <module-set-id>2</module-set-id>
</modules-state>
<schema-mounts
  xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount">
  <mount-point>
    <module>example-collection-manifest</module>
    <label>yang-push-collection</label>
    <shared-schema/>
  </mount-point>
</schema-mounts>
]]>
      </sourcecode>
      <sourcecode anchor="data-collection-toplevel-yanglib" name="data-collection-toplevel-yanglib.xml" type="xml" markers="true"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
              xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
    <module-set>
        <name>main-set</name>
        <module>
            <name>ietf-datastores</name>
            <revision>2018-02-14</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-datastores</\
namespace>
        </module>
        <module>
            <name>ietf-yang-library</name>
            <revision>2019-01-04</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-library\
</namespace>
        </module>
        <module>
            <name>ietf-yang-schema-mount</name>
            <revision>2019-01-14</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-schema-\
mount</namespace>
        </module>
        <module>
            <name>example-collection-manifest</name>
            <revision>2026-10-24</revision>
            <namespace>http://example.com/example-collection-manifes\
t</namespace>
        </module>
        <module>
            <name>ietf-platform-manifest</name>
            <revision>2026-10-24</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-platform-man\
ifest</namespace>
            <feature>yang-catalog</feature>
        </module>
        <import-only-module>
            <name>ietf-inet-types</name>
            <revision>2025-12-22</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-inet-types</\
namespace>
        </import-only-module>
        <import-only-module>
            <name>ietf-yang-types</name>
            <revision>2025-12-22</revision>
            <namespace>urn:ietf:params:xml:ns:yang:ietf-yang-types</\
namespace>
        </import-only-module>
    </module-set>
    <schema>
        <name>main-schema</name>
        <module-set>main-set</module-set>
    </schema>
    <datastore>
        <name>ds:running</name>
        <schema>main-schema</schema>
    </datastore>
    <datastore>
        <name>ds:operational</name>
        <schema>main-schema</schema>
    </datastore>
    <content-id>1</content-id>
</yang-library>
<modules-state
  xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
  <module-set-id>2</module-set-id>
</modules-state>
]]>
      </sourcecode>
    </section>
    <section anchor="validate-example">
      <name>Validating the Example</name>
      <t>
        This section provides the command line for validating the example in <xref target="manifest-example"/> using <xref target="yanglint"/>.
        The files "data-collection-extension-data.xml" and "data-collection-toplevel-yanglib.xml" are provided in the previous section; unfold them as described there before use.
        The file "manifests-example.json" is the one from <xref target="manifest-example"/>.
      </t>
      <t>
        The Platform Manifest in this example uses the leafs defined
        under the 'yang-catalog' feature ('name', 'vendor',
        'vendor-pen', 'software-version', 'os-version', and 'os-type').
        The example is therefore valid only when the
        'ietf-platform-manifest' module is implemented with the
        'yang-catalog' feature enabled.
      </t>
      <sourcecode type="bash">
yanglint -e -x data-collection-extension-data.xml \
        -Y data-collection-toplevel-yanglib.xml \
        manifests-example.json
      </sourcecode>

    </section>
    <section anchor="yang-catalog-module">
      <name>YANG Catalog Module</name>
      <t>
        To keep this document self-contained and to pin a specific version, this appendix reproduces the YANG Catalog module from which the "yang-catalog" feature leafs are inspired.
        Long lines of the original module have been re-wrapped to fit the line length of this document, using YANG string concatenation for the "pattern" and "path" statements; this does not change the meaning of the module.
      </t>
      <sourcecode name="yang-catalog@2018-04-03.yang" type="yang" markers="true"><![CDATA[
module yang-catalog {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:yang-catalog";
  prefix yc;

  import ietf-yang-types {
    prefix yang;
  }
  import ietf-yang-library {
    prefix yanglib;
  }
  import ietf-inet-types {
    prefix inet;
  }

  organization
    "yangcatalog.org";
  contact
    "Benoit Claise <bclaise@cisco.com>

     Joe Clarke <jclarke@cisco.com>";
  description
    "This module contains metadata pertinent to each YANG module, as
     well as a list of vendor implementations for each module.  The
     structure is laid out in such a way as to make it possible to
     locate metadata and vendor implementation on a per-module basis
     as well as obtain a list of available modules for a given
     vendor's platform and specific software release.";

  revision 2018-04-03 {
    description
      "Bump the YANG version number to 1.1 for the deref XPath
       function.";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2018-01-23 {
    description
      "* Add leafs to track expire modules
       * Correct a bug with leafref dereferencing";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-09-26 {
    description
      "* Add leafs for tracking dependencies and dependents
       * Simplify the generated-from enumerated values
       * Refine the type for compilation-result to be an inet:uri
       * Add leafs for semantic versioning";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-08-18 {
    description
      "* Reorder organization to be with the other module keys
       * Add a belongs-to leaf to track a submodule's parent";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-07-28 {
    description
      "* Revert config false nodes as we need to be able to set these
         via <edit-config>

       * Make conformance-type optional as not all vendors implement
         yang-library

       * Re-add the path typedef";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-07-26 {
    description
      "A number of improvements based on YANG Doctor review:

       * Remove references to 'server' in leafs describing YANG data
       * Fold the augmentation module leafs directly under
         /catalog/modules/module
       * Use identities for protocols instead of an emumeration
       * Make some extractable fields 'config false'
       * Fix various types
       * Normalize enums to be lowercase
       * Add a leaf for module-classification
       * Change yang-version to be an enum
       * Add module conformance, deviation and feature leafs under
         the implementation branches";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-07-14 {
    description
      "Modularize some of the leafs and create typedefs so they
       can be shared between the API input modules.";
    reference "YANG Catalog <https://yangcatalog.org>";
  }
  revision 2017-07-03 {
    description
      "Initial revision.";
    reference
      "
       YANG Catalog <https://yangcatalog.org>";
  }

  /*
   * Identities
   */

  identity protocol {
    description
      "Abstract base identity for a YANG-based protocol.";
  }

  identity netconf {
    base protocol;
    description
      "Protocol identity for NETCONF as described in RFC 6241.";
  }

  identity restconf {
    base protocol;
    description
      "Protocol identity for RESTCONF as described in RFC 8040.";
  }

  typedef email-address {
    type string {
      pattern "[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@"
        + "[a-zA-Z0-9-]+([.][a-zA-Z0-9-]+)*";
    }
    description
      "This type represents a string with an email address.";
  }

  /*
   * Typedefs
   */

  typedef path {
    type string {
      pattern '([A-Za-z]:|[\w-]+(\.[\w-]+)*)?(([/\\][\w@.-]+)+)';
    }
    description
      "This type represents a string with path to the file.";
  }

  typedef semver {
    type string {
      pattern '[0-9]+\.[0-9]+\.[0-9]+';
    }
    description
      "A semantic version in the format of x.y.z, where:

       x = the major version number
       y = the minor version number
       z = the patch version number

       Changes to the major version number denote
       backwards-incompatible changes between two revisions of the
       same module.

       Changes to the minor version number indicate there have been
       new backwards-compatible features introduced in the later
       version of a module.

       Changes to the patch version indicate bug fixes between two
       versions of a module.";
    reference "Semantic Versioning 2.0.0 <http://semver.org/>";
  }

  container catalog {
    description
      "Root container of yang-catalog holding two main branches -
       modules and vendors. The modules sub-tree contains all the
       modules in the catalog and all of their metadata with their
       implementations. The vendor sub-tree holds modules for
       specific vendors, platforms, software-versions, and
       software-flavors. It contains reference to a name and revision
       of the module in order to reference the module's full set of
       metadata.";
    container modules {
      description
        "Container holding the list of modules";
      list module {
        key "name revision organization";
        description
          "Each entry represents one revision of one module
           for one organization.";
        uses yang-lib-common-leafs;
        leaf organization {
          type string;
          description
            "This statement defines the party responsible for this
             module. The argument is a string that is used to specify
             a textual description of the organization(s) under whose
             auspices this module was developed.";
        }
        uses organization-specific-metadata;
        leaf namespace {
          type inet:uri;
          mandatory true;
          description
            "The XML namespace identifier for this module.";
        }
        uses yang-lib-schema-leaf;
        uses catalog-module-metadata;
        list submodule {
          key "name revision";
          description
            "Each entry represents one submodule within the
             parent module.";
          uses yang-lib-common-leafs;
          uses yang-lib-schema-leaf;
        }
        list dependencies {
          key "name";
          description
            "Each entry represents one dependency.";
          uses yang-lib-common-leafs;
          uses yang-lib-schema-leaf;
        }
        list dependents {
          key "name";
          description
            "Each entry represents one dependent.";
          uses yang-lib-common-leafs;
          uses yang-lib-schema-leaf;
        }
        leaf semantic-version {
          type yc:semver;
          description
            "The formal semantic version of a module as provided by
             the module itself. If the module does not provide a
             semantic version, this leaf will not be specified.";
        }
        leaf derived-semantic-version {
          type yc:semver;
          description
            "The semantic version of a module as compared to other
             revisions of the same module. This value is computed
             algorithmically by ordering all revisions of a given
             module and comparing them to look for backwards
             incompatible changes.";
        }
        container implementations {
          description
            "Container holding lists of per-module implementation
             details.";
          list implementation {
            key "vendor platform software-version software-flavor";
            description
              "List of module implementations.";
            leaf vendor {
              type string;
              description
                "Organization that implements this module.";
            }
            leaf platform {
              type string;
              description
                "Platform on which this module is implemented.";
            }
            leaf software-version {
              type string;
              description
                "Name of the version of software. With respect to
                 most network device appliances, this will be the
                 operating system version. But for other YANG module
                 implementation, this would be a version of appliance
                 software. Ultimately, this should correspond to a
                 version string that will be recognizable by the
                 consumers of the platform.";
            }
            leaf software-flavor {
              type string;
              description
                "A variation of a specific version where YANG model
                 support may be different. Depending on the vendor,
                 this could be a license, additional software
                 component, or a feature set.";
            }
            uses shared-implementation-leafs;
            uses yang-lib-implementation-leafs;
          }
        }
      }
    }
    container vendors {
      description
        "Container holding lists of organizations that publish YANG
         modules.";
      list vendor {
        key "name";
        description
          "List of organizations publishing YANG modules.";
        leaf name {
          type string;
          description
            "Name of the maintaining organization -- the name should
             be supplied in the official format used by the
             organization.
             Standards Body examples:
               IETF, IEEE, MEF, ONF, etc.
             Commercial entity examples:
               AT&T, Facebook, <Vendor>
             Name of industry forum examples:
             OpenConfig, OpenDaylight, ON.Lab";
        }
        container platforms {
          description
            "Container holding list of platforms.";
          list platform {
            key "name";
            description
              "List of platforms under specific vendor";
            leaf name {
              type string;
              description
                "Name of the platform";
            }
            container software-versions {
              description
                "Container holding list of versions of software
                 versions.";
              list software-version {
                key "name";
                description
                  "List of version of software versions under
                   specific vendor, platform.";
                leaf name {
                  type string;
                  description
                    "Name of the version of software. With respect to
                     most network device appliances, this will be the
                     operating system version. But for other YANG
                     module implementation, this would be a version
                     of appliance software. Ultimately, this should
                     correspond to a version string that will be
                     recognizable by the consumers of the platform.";
                }
                container software-flavors {
                  description
                    "Container holding list of software flavors.";
                  list software-flavor {
                    key "name";
                    description
                      "List of software flavors under specific
                       vendor, platform, software-version.";
                    leaf name {
                      type string;
                      description
                        "A variation of a specific version where YANG
                         model support may be different. Depending on
                         the vendor, this could be a license,
                         additional software component, or a feature
                         set.";
                    }
                    container protocols {
                      description
                        "List of the protocols";
                      list protocol {
                        key "name";
                        description
                          "YANG-based protocol that is used on the
                           device. New identities are expected to be
                           added to address other YANG-based
                           protocols.";
                        leaf name {
                          type identityref {
                            base yc:protocol;
                          }
                          description
                            "Identity of the YANG-based protocol that
                             is supported.";
                        }
                        leaf-list protocol-version {
                          type string;
                          description
                            "Version of the specific protocol.";
                        }
                        leaf-list capabilities {
                          type string;
                          description
                            "Listed name of capabilities that are
                             supported by the specific device.";
                        }
                      }
                    }
                    container modules {
                      description
                        "Container holding list of modules.";
                      list module {
                        key "name revision organization";
                        description
                          "List of references to YANG modules under
                           specific vendor, platform,
                           software-version, software-flavor. Using
                           these references, the complete set of
                           metadata can be retrieved for each
                           module.";
                        leaf name {
                          type leafref {
                            path "/catalog/modules/module/name";
                          }
                          description
                            "Reference to a name of the module that
                             is contained in specific vendor,
                             platform, software-version,
                             software-flavor.";
                        }
                        leaf revision {
                          type leafref {
                            path "deref(../name)/../revision";
                          }
                          description
                            "Reference to a revision of the module
                             that is contained in specific vendor,
                             platform, software-version,
                             software-flavor.";
                        }
                        leaf organization {
                          type leafref {
                            path "deref(../revision)/../"
                              + "organization";
                          }
                          description
                            "Reference to the authoring organization
                             of the module for the implemented
                              module.";
                        }
                        uses shared-implementation-leafs;
                        uses yang-lib-implementation-leafs;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }

  grouping catalog-module-metadata {
    uses shared-module-leafs;
    leaf compilation-status {
      type enumeration {
        enum passed {
          description
            "All compilers were able to compile this YANG module
             without any errors or warnings.";
        }
        enum passed-with-warnings {
          description
            "All compilers were able to compile this YANG module
             without any errors, but at least one of them caught a
             warning.";
        }
        enum failed {
          description
            "At least one of compilers found an error while
             compiling this YANG module.";
        }
        enum pending {
          description
            "The module was just added to the catalog and compilation
             testing is still in progress.";
        }
        enum unknown {
          description
            "There is not sufficient information about compilation
             status. This Could mean compilation crashed causing it
             not to complete fully.";
        }
      }
      description
        "Status of the module, whether it was possible to compile
         this YANG module or there are still some errors/warnings.";
    }
    leaf compilation-result {
      type inet:uri;
      description
        "Link to the result of the compilation explaining
         specifically what error or warning occurred. This is not
         existing if compilation status is PASSED.";
    }
    leaf prefix {
      type string;
      description
        "Statement of yang that is used to define the prefix
         associated with the module and its namespace. The prefix
         statement's argument is the prefix string that is used as a
         prefix to access a module. The prefix string MAY be used to
         refer to definitions contained in the module, e.g.,
         if:ifName.";
    }
    leaf yang-version {
      type enumeration {
        enum 1.0 {
          description
            "YANG version 1.0 as defined in RFC 6020.";
        }
        enum 1.1 {
          description
            "YANG version 1.1 as defined in RFC 7950.";
        }
      }
      description
        "The optional yang-version statement specifies which version
         of the YANG language was used in developing the module.";
    }
    leaf description {
      type string;
      description
        "This statement takes as an argument a string that contains a
         human-readable textual description of this definition. The
         text is provided in a language (or languages) chosen by the
         module developer; for the sake of interoperability, it is
         RECOMMENDED to choose a language that is widely understood
         among the community of network administrators who will use
         the module.";
    }
    leaf contact {
      type string;
      description
        "This statement provides contact information for the module.
         The argument is a string that is used to specify contact
         information for the person or persons to whom technical
         queries concerning this module should be sent, such as their
         name, postal address, telephone number, and electronic mail
         address.";
    }
    leaf module-type {
      type enumeration {
        enum module {
          description
            "If YANG file contains module.";
        }
        enum submodule {
          description
            "If YANG file contains sub-module.";
        }
      }
      description
        "Whether a file contains a YANG module or sub-module.";
    }
    leaf belongs-to {
      when "../module-type = 'submodule'" {
        description
          "Include the module's parent when it is a submodule.";
      }
      type yang:yang-identifier;
      description
        "Name of the module that includes this submodule.";
    }
    leaf tree-type {
      type enumeration {
        enum split {
          description
            "This module uses a split config/operational state
             layout.";
        }
        enum nmda-compatible {
          description
            "This module is compatible with the Network Management
             Datastores Architecture (NMDA) and combines config and
             operational state nodes.";
        }
        enum transitional-extra {
          description
            "This module is derived as a '-state' module to allow for
             transitioning to a full NMDA-compliant tree structure.";
        }
        enum openconfig {
          description
            "This module uses the Openconfig data element layout.";
        }
        enum unclassified {
          description
            "This module does not belong to any category or can't be
             determined.";
        }
        enum not-applicable {
          description
            "This module is not applicable. For example, because the
             YANG module only contains typedefs, groupings, or is a
             submodule";
        }
      }
      description
        "The type of data element tree used by the module as it
         relates to the Network Management Datastores Architecture.";
      reference "draft-dsdt-nmda-guidelines Guidelines for YANG
                 Module Authors (NMDA)";
    }
    leaf yang-tree {
      when "../module-type = 'module'";
      type inet:uri;
      description
        "This leaf provides a URI that points to the ASCII tree
         format of the module in draft-ietf-netmod-yang-tree-diagrams
         format.";
      reference "See draft-ietf-netmod-yang-tree-diagrams.";
    }
    leaf expires {
      type yang:date-and-time;
      description
        "Date and time of when this module expires (if it expires).
         This will typically be used for modules that have not been
         fully ratified.";
    }
    leaf expired {
      type union {
        type boolean;
        type enumeration {
          enum not-applicable {
            description
              "This module is not and will not be expired.";
          }
        }
      }
      default "false";
      description
        "Whether or not this module has expired. If the current date
         is beyond the expires date, then expired should be true.";
    }
    description
      "Grouping of YANG module metadata that extends the common list
       defined in the YANG Module Library (RFC 7895).";
  }

  grouping organization-specific-metadata {
    container ietf {
      when "../organization = 'ietf'" {
        description
          "Include this container specific metadata of the IETF.";
      }
      leaf ietf-wg {
        type string;
        description
          "Working group that authored the document containing this
           module.";
      }
      description
        "Include this container for the IETF-specific organization
         metadata.";
    }
    description
      "Any organization that has some specific metadata of the yang
       module and want them add to the yang-catalog, should augment
       this grouping. This grouping is for any metadata that can`t be
       used for every yang module.";
  }

  grouping yang-lib-common-leafs {
    leaf name {
      type yang:yang-identifier;
      description
        "The YANG module or submodule name.";
    }
    leaf revision {
      type union {
        type yanglib:revision-identifier;
        type string {
          length "0";
        }
      }
      description
        "The YANG module or submodule revision date.
         A zero-length string is used if no revision statement
         is present in the YANG module or submodule.";
    }
    description
      "The YANG module or submodule revision date.
       A zero-length string is used if no revision statement
       is present in the YANG module or submodule.";
    reference "RFC7895 YANG Module Library : common-leafs grouping";
  }

  grouping yang-lib-schema-leaf {
    leaf schema {
      type inet:uri;
      description
        "Contains a URL that represents the YANG schema
         resource for this module or submodule.
         This leaf will only be present if there is a URL
         available for retrieval of the schema for this entry.";
    }
    description
      "These are a subset of leafs from the yang-library (RFC 7895)
       that provide some extractable fields for catalog modules. The
       module-list grouping cannot be used from yang-library as
       modules themselves cannot have conformance without a server.";
    reference "RFC7895 YANG Module Library : schema-leaf grouping";
  }

  grouping yang-lib-implementation-leafs {
    leaf-list feature {
      type yang:yang-identifier;
      description
        "List of YANG feature names from this module that are
         supported by the server, regardless of whether they are
         defined in the module or any included submodule.";
    }
    list deviation {
      key "name revision";
      description
        "List of YANG deviation module names and revisions
         used by this server to modify the conformance of
         the module associated with this entry.  Note that
         the same module can be used for deviations for
         multiple modules, so the same entry MAY appear
         within multiple 'module' entries.
         The deviation module MUST be present in the 'module'
         list, with the same name and revision values.
         The 'conformance-type' value will be 'implement' for
         the deviation module.";
      uses yang-lib-common-leafs;
    }
    leaf conformance-type {
      type enumeration {
        enum implement {
          description
            "Indicates that the server implements one or more
             protocol-accessible objects defined in the YANG module
             identified in this entry.  This includes deviation
             statements defined in the module.
             For YANG version 1.1 modules, there is at most one
             module entry with conformance type 'implement' for a
             particular module name, since YANG 1.1 requires that,
             at most, one revision of a module is implemented.
             For YANG version 1 modules, there SHOULD NOT be more
             than one module entry for a particular module name.";
        }
        enum import {
          description
            "Indicates that the server imports reusable definitions
             from the specified revision of the module but does
             not implement any protocol-accessible objects from
             this revision.
             Multiple module entries for the same module name MAY
             exist.  This can occur if multiple modules import the
             same module but specify different revision dates in
             the import statements.";
        }
      }
      // Removing the mandatory true for now as not all vendors may
      // have this information if they do not implement yang-library.
      // mandatory true;
      description
        "Indicates the type of conformance the server is claiming
         for the YANG module identified by this entry.";
    }
    description
      "This is a set of leafs extracted from the yang-library that
       are specific to server implementations.";
    reference "RFC7895 YANG Module Library : module-list grouping";
  }

  grouping shared-implementation-leafs {
    leaf os-version {
      type string;
      description
        "Version of the operating system using this module. This is
         primarily useful if the software implementing the module is
         an application that requires a specific operating system.";
    }
    leaf feature-set {
      type string;
      description
        "An optional feature of the software that is required in
         order to implement this module. Some form of this must be
         incorporated in software-version or software-flavor, but can
         be broken out here for additional clarity.";
    }
    leaf os-type {
      type string;
      description
        "Type of the operating system using this module. This is
         primarily useful if the software implementing the module is
         an application that requires a specific operating system.";
    }
    description
      "Grouping of non-key leafs to be used in the module and vendor
       sub-trees.";
  }

  grouping shared-module-leafs {
    leaf generated-from {
      type enumeration {
        enum mib {
          description
            "Module generated from Structure of Management
             Information (SMI) MIB per RFC6643.";
        }
        enum not-applicable {
          description
            "Module was not generated but it was authored manually.";
        }
        enum native {
          description
            "Module generated from platform internal,
             proprietary structure, or code.";
        }
      }
      default "not-applicable";
      description
        "This statement defines weather the module was generated or
         not. Default value is set to not-applicable, which means
         that module was created manualy and not generated.";
    }
    leaf maturity-level {
      type enumeration {
        enum ratified {
          description
            "Maturity of a module that is fully approved (e.g., a
             standard).";
        }
        enum adopted {
          description
            "Maturity of a module that is actively being developed by
             a organization towards ratification.";
        }
        enum initial {
          description
            "Maturity of a module that has been initially created,
             but has no official organization-level status.";
        }
        enum not-applicable {
          description
            "The maturity level is not used for vendor-supplied
             models, and thus all vendor modules will have a maturity
             of not-applicable";
        }
      }
      description
        "The current maturity of the module with respect to the body
         that created it. This allows one to understand where the
         module is in its overall life cycle.";
    }
    leaf document-name {
      type string;
      description
        "The name of the document from which the module was extracted
         or taken; or that provides additional context about the
         module.";
    }
    leaf author-email {
      type yc:email-address;
      description
        "Contact email of the author who is responsible for this
         module.";
    }
    leaf reference {
      type inet:uri;
      description
        "A string that is used to specify a textual cross-reference
         to an external document, either another module that defines
         related management information, or a document that provides
         additional information relevant to this definition.";
    }
    leaf module-classification {
      type enumeration {
        enum network-service {
          description
            "Network Service YANG Module that describes the
             configuration, state data, operations, and notifications
             of abstract representations of services implemented on
             one or multiple network elements.";
        }
        enum network-element {
          description
            "Network Element YANG Module that describes the
             configuration, state data, operations, and notifications
             of specific device-centric technologies or features.";
        }
        enum unknown {
          description
            "In case that there is not sufficient information about
             how to classify the module.";
        }
        enum not-applicable {
          description
            "The YANG module abstraction type is neither a Network
             Service YANG Module nor a Network Element YANG Module.";
        }
      }
      mandatory true;
      description
        "The high-level classification of the given YANG module.";
      reference "RFC8199 YANG Module Classification";
    }
    description
      "These leafs are shared among the yang-catalog and its API.";
  }

  grouping online-source-file {
    leaf owner {
      type string;
      mandatory true;
      description
        "Username or ID of the owner of the version control system
         repository.";
    }
    leaf repository {
      type string;
      mandatory true;
      description
        "The name of the repository.";
    }
    leaf path {
      type yc:path;
      mandatory true;
      description
        "Location within the repository of the module file.";
    }
    leaf branch {
      type string;
      description
        "Revision control system branch or tag to use to find the
         module. If this is not specified, the head of the repository
         is used.";
    }
    description
      "Networked version control system location of the module
       file.";
  }
}
]]></sourcecode>
    </section>
    <section numbered="false">
      <name>Acknowledgements</name>
      <t>
          Thanks to Mohamed Boucadair, Tianran Zhou, Jan Lindblad, Ahmed Elhassany, Joe Clarke, Alex Huang Fang, Zhuoyao Lin, Quifang Ma, Paul Aitken, Mahesh Jethanandani, Elwyn Davies, Hilarie Orman, Susan Hares, Roman Danyliw, Gunter Van de Velde, Deb Cooley, Ketan Talaulikar, Éric Vyncke, Mike Bishop, and Christopher Inacio for their reviews and comments.
       </t>
    </section>
  </back>
</rfc>
<!-- Local Variables: -->
<!-- fill-column:72 -->
<!-- End: -->