<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,               
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.             
    There has to be one entity for each item to be referenced.                    
    An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2697 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2697.xml">
<!ENTITY RFC2698 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2698.xml">
<!ENTITY RFC6020 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc tocompact="yes"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-netmod-node-tags-01" ipr="trust200902"
     updates="8407">
  <front>
    <title abbrev="Data Object Tags">Self Describing Data Object Tags</title>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>bill.wu@huawei.com</email>
      </address>
    </author>

    <author fullname="Benoit Claise" initials="B." surname="Claise">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street>De Kleetlaan 6a b1</street>

          <city>Diegem</city>

          <code>1831</code>

          <country>Belgium</country>
        </postal>

        <email>bclaise@cisco.com</email>
      </address>
    </author>

    <author fullname="Peng Liu" initials="P." surname="Liu">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>32 Xuanwumen West St, Xicheng District</street>

          <city>Beijing</city>

          <code>10053</code>
        </postal>

        <email>liupengyjy@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Zongpeng Du" initials="Z." surname="Du">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>32 Xuanwumen West St, Xicheng District</street>

          <city>Beijing</city>

          <code>10053</code>
        </postal>

        <email>duzongpeng@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Mohamed Boucadair" initials="M." surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street>Rennes 35000</street>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <date year="2021"/>

    <area>OPS Area</area>

    <workgroup>NETMOD Working Group</workgroup>

    <abstract>
      <t>This document defines a method to tag data objects associated with
      operation and management data in YANG Modules. This YANG data object
      tagging method can be used to classify data objects from different YANG
      modules and identify characteristics data. It also can provide input,
      instruction, indication to selection filter and filter queries of
      operational state on a server during a "pub/sub" service for YANG
      datastore updates. When the state of all subscriptions of a particular
      Subscriber to be fetched is huge, the amount of data to be streamed out
      to the destination can be greatly reduced and only targeted to the
      characteristics data. These data object tags may be registered as well
      as assigned during the module definition; assigned by implementations;
      or dynamically defined and set by users.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>As described in [I.D-ietf-netmod-module-tags], the use of tags for
      classification and organization is fairly ubiquitous not only within
      IETF protocols, but in the internet itself (e.g., "#hashtags"). A module
      tag defined in [I.D-ietf-netmod-module-tags] is a string associated only
      with a module name at module level.</t>

      <t>At the time of writing this document (2020), there are many data
      models that have been specified or are being specified by various
      different SDOs and Open Souce community. They cover many of the
      networking protocols and techniques. However data objects defined by
      these technology specific data models might represent a portion of
      fault, configuration, accounting, performance, security management
      categories information at different locations in various different ways,
      lack consistent classification criteria and representation for a
      specific service, feature or data source.</t>

      <t>This document defines self-describing data object tags and associates
      them with data objects within YANG module, which <list style="symbols">
          <t>Provide dictionary meaning for specific targeted data
          objects;</t>

          <t>Indicate relationship between data objects within the same YANG
          module or from different YANG modules;</t>

          <t>Identify key performance metric data objects and the absolute
          XPath expression identifying the element path to the node;</t>
        </list>The self describing data object tags can be used by the client
      to classify data objects from different YANG modules and identify
      characteristics data. In addition, it can provide input, instruction,
      indication to selection filter and filter queries of configuration or
      operational state on a server based on these data object tags, .e.g.,
      return specific object type of operational state related to
      system-management. NETCONF clients can discover data objects with self
      describing data object tags supported by a NETCONF server via
      &lt;get-schema&gt; operation. The self describing data object tag
      capability can also be advertised via Capability Notification Model
      [I-D.netconf-notification-capabilities] by the NETCONF server or some
      place where offline document are kept. These data object tags may be
      registered as well as assigned during the module definition; assigned by
      implementations; or dynamically defined and set by users.</t>

      <t>This document defines a YANG module [RFC7950] which augments module
      tag model and provides a list of data object entries to allow for adding
      or removing of self describing tags as well as viewing the set of self
      describing tags associated with specific data objects within YANG
      modules.</t>

      <t>This document defines an extension statement to be used to indicate
      self describing tags that SHOULD be added by the module implementation
      automatically (i.e., outside of configuration).</t>

      <t>This document also defines an IANA registry for tag prefixes as well
      as a set of globally assigned tags.</t>

      <t><xref target="guideline"/> provides guidelines for authors of YANG
      data models.</t>

      <t>The YANG data model in this document conforms to the Network
      Management Datastore Architecture defined in [RFC8342].</t>

      <section title="Self Describing Data Object Tags Use Case">
        <section title="Massive Data Object Collection">
          <t>Among data object tags, the opm (object, property, metric) tags
          can be used to tackle massive data objects collection and only
          capture YANG data objects associated with performance metrics data
          modelled with YANG (See <xref target="opm"/>).</t>

          <figure anchor="opm"
                  title="The Relation between Object, Property and Metric">
            <artwork>                  /----\
                 /Object\
  +-------------+   Tag  +---------------+------------------+
  |               \- +-/                 |                  |
  |        +---------V--------+    have  |                  |
  |        | YANG Data Node   &lt;----------+-----+            |
  |        | /Data Object 1   |          |     |            |
  |        +--A-------------A-+          |     |            |
  |           |have         |have        |     |            |
  |           |             |            |     |            |
+-V-----------+-----+     +-+------------V+  +-+------------V+
|   YANG Data Node  |     | YANG Data Node|  | YANG Data Node|
|  /Data Object 2   |     | /Data Object 3|  | /Data Object 4|
+---A------ --- ----+     +-A----------- -+  +-A----------- -+
    |                       |                  |
    |                     /-+-\              /-+-\
  /-+--\                 Metric \           Metric \
 Property               |  Tag  |          |  Tag  |
 \ Tag  /                 \-^-/              \-^-/
  \----/                    |                  |
                            |      /----\      |
                            |     /Metric\     |
                            +----|  Group +----|
                                  \  Tag /
                                   \- --/</artwork>
          </figure>

          <t>In <xref target="opm"/>, object can contain other objects called
          subobjects. Both object and subobjects can be modeled as YANG data
          nodes [RFC7950]. Object can be one of container, leaf-list and list.
          subobject tagged with property tag is a leaf node. subobject tagged
          with metric tag can be one of container, leaf-list, list, leaf node.
          A data Object contains one single object tag, or one single object
          tag and one single property tag, or one single object tag and one
          single metric tag. A data Object also can contain one single Metric
          Group tag and/or one single multi-source tag.</t>

          <t>The use of opm tags would be to help filter discrete categories
          of YANG data objects scattered across the same or different YANG
          modules supported by a device and capture all network performance
          data or all property data in the single view of the truth (see <xref
          target="opm-tab"/>). In <xref target="opm-tab"/>, tunnel-svc data
          object is a container node in the tunnel-pm module and can be seen
          as the root object for property tagged subobjects (e.g.,
          tunnel-svc/create-time) and metric tagged subobjects
          (e.g.,tunnel-svc/avg-latency). Name, create-time, modified-time are
          property tagged subobjects under tunnel-svc container.
          Avg-latency,packet -loss are metric tagged subobjects under
          tunnel-svc container node. Take tunnel-svc data object and
          tunnel-svc/name data object as an example, tunnel-svc data object
          has one single object tag (i.e., ietf:object) while tunnel-svc/name
          data object has one object tag (ietf:object) and one property
          subobject tag (i.e., ietf:property). In addition, not all metric
          subobjects need to be tagged, e.g., only specific category (e.g.,
          loss related) metric subobjects need to be tagged with metric-group
          tag which can further reduce amount data to be fetched.</t>

          <figure anchor="opm-tab"
                  title="Example of OPM Tags Used in the YANG Module">
            <artwork>+------------------------+--------------------------------------------+
|      Data              |  Object    Property     Metric      Module |
|      Object            |   Tag        Tag         Tag         Name  |
+------------------------+--------------------------------------------+
|                        |  ietf:                                     |
|tunnel-svc              |  object                           tunnel-pm|
|                        |  ietf:     ietf:                           |
|tunnel-svc/name         |  object    property               tunnel-pm|
|                        |  ietf:     ietf:                           |
|tunnel-svc/create-time  |  object    property               tunnel-pm|
|                        |  ietf:     ietf:                           |
|tunnel-svc/modified-time|  object    property               tunnel-pm|
|                        |                                            |
|tunnel-svc/avg-latency  | ietf:                  ietf:      tunnel-pm|
|                        | object                 metric              |
|tunnel-svc/packet-loss  | ietf:                  ietf:      tunnel-pm|
|                        | object                 metric              |
|tunnel-svc/min-latency  | ietf:                  ietf:      tunnel-pm|
|                        | object                 metric              |
|tunnel-svc/ max-latency |                        ietf:      tunnel-pm|
|                        |                        metric              |
+------------------------+--------------------------------------------+
</artwork>
          </figure>

          <t>If data objects in these YANG modules are suitably tagged and
          learnt by the client from a live server, the client can retrieve
          paths to all targeted data objects and then use an XPath query
          defined [RFC8639] [RFC8641] to list all tagged data objects which
          reflect network characteristics.</t>
        </section>
      </section>

      <section title="Terminology">
        <section title="Requirements Notation">
          <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 [RFC2119] [RFC8174] when, and only when, they
          appear in all capitals, as shown here.</t>
        </section>

        <section title="Glossary">
          <t><list hangIndent="6" style="hanging">
              <t hangText="OPM">- Object Property Metric</t>
            </list></t>
        </section>
      </section>
    </section>

    <!-- intro -->

    <section title="Data Object Tag Values">
      <t>All data object tags SHOULD begin with a prefix indicating who owns
      their definition. An IANA registry (<xref target="prefix"/>) is used to
      support registering data object tag prefixes. Currently 3 prefixes are
      defined.</t>

      <t>No further structure is imposed by this document on the value
      following the registered prefix, and the value can contain any YANG type
      'string' characters except carriage-returns, newlines and tabs.
      Therefore, designers, implementers, and users are free to add or not add
      any structure they may require to their own tag values.</t>

      <section title="IETF Tags Prefix">
        <t>An IETF tag is a data object tag that has the prefix "ietf:". All
        IETF data object tags are registered with IANA in a registry defined
        later in this document (<xref target="tag"/>).</t>
      </section>

      <section title="Vendor Tags Prefix">
        <t>A vendor tag is a tag that has the prefix "vendor:". These tags are
        defined by the vendor that implements the module, and are not
        registered; however, it is RECOMMENDED that the vendor include extra
        identification in the tag to avoid collisions such as using the
        enterprise or organization name following the "vendor:" prefix (e.g.,
        vendor:vendor-defined-classifier).</t>
      </section>

      <section title="User Tags Prefix">
        <t>A user tag is any tag that has the prefix "user:". These tags are
        defined by the user/administrator and are not meant to be registered.
        Users are not required to use the "user:" prefix; however, doing so is
        RECOMMENDED as it helps avoid prefix collisions.</t>
      </section>

      <section title="Reserved Tags Prefix">
        <t>Any tag not starting with the prefix "ietf:", "vendor:" or "user:"
        is reserved for future use. These tag values are not invalid, but
        simply reserved in the context of specifications (e.g., RFCs).</t>
      </section>
    </section>

    <section title="Data Object Tag Management">
      <t>Tags can become associated with a data object within YANG module in a
      number of ways. Tags may be defined and associated at the module design
      time, at implementation time without the need of live server, or via
      user administrative control . As the main consumer of data object tags
      are users, users may also remove any tag from a live server, no matter
      how the tag became associated with a data object within a YANG
      module.</t>

      <section title="Module Design Tagging">
        <t>A data object definition MAY indicate a set of data object tags to
        be added by the module implementer. These design time tags are
        indicated using a set of extension statements which include:<list
            style="hanging">
            <t hangText="opm-tag extension statement:">Classify management and
            operation data into object, property subobject and metric
            subobject three categories. Object can contain other objects
            called subobjects. Property and metric objects are both subobjects
            belonging to specific object. Both object and subobjects can be
            modeled as data nodes [RFC7950]. Object can be one of container,
            leaf-list and list. Property subobject is a leaf node. Metric
            subobject can be one of container, leaf-list, list, leaf. Object
            contains zero or many property subobjects, zero or many metric
            subobjects. See opm-tag example in <xref target="opm-tab"/> and
            <xref target="opm-example"/>.</t>

            <t hangText="metric-group extension statement:">Provide meric
            subobjects classification (e.g., loss, jitter, delay) within the
            YANG module.</t>

            <t hangText="multi-source-tag extension statement:">Identify
            multi-source aggregation type (e.g., aggregated, non-aggregated)
            related to metric subobject. 'aggregated' multi-source aggregation
            type allows a large number of measurements on metric subobjects
            from different sources of the same type (e.g.,line card, each
            subinterface of aggregated Ethernet interface) being combined into
            aggregated statistics and report as one metric subobject.
            'non-aggregated' multi-source aggregation type allows measurement
            from each source of the same type (e.g.,line card, each
            subinterface of aggregated Ethernet interface) be reported
            separately.</t>
          </list>Among these extension statements, the metric-group,
        multi-source-tag extension statements are context information related
        and can be used to correlate data object from the different
        modules.</t>

        <t>If the data node is defined in an IETF standards track document,
        the data object tags MUST be IETF Tags (2.1). Thus, new data object
        can drive the addition of new IETF tags to the IANA registry defined
        in <xref target="iana"/>, and the IANA registry can serve as a check
        against duplication.</t>
      </section>

      <section title="Implementation Tagging">
        <t>An implementation MAY include additional tags associated with data
        object within a YANG module. These tags SHOULD be IETF Tags (i.e.,
        registered) or vendor specific tags.</t>
      </section>

      <section title="User Tagging">
        <t>Data object tags of any kind, with or without a prefix, can be
        assigned and removed by the user from a live server using normal
        configuration mechanisms. In order to remove a data object tag from
        the operational datastore, the user adds a matching "masked-tag" entry
        for a given data object within the ietf-data-object-tags Module.</t>
      </section>
    </section>

    <section title="Data Object Tags Module Structure">
      <section title="Data Object Tags Module Tree">
        <t>The tree associated with the "ietf-data-object-tags" module
        follows. The meaning of the symbols can be found in [RFC8340].</t>

        <figure>
          <artwork>module: ietf-data-object-tags
  augment /tags:module-tags/tags:module:
    +--rw data-object-tags
       +--rw data-object* [object-name]
          +--rw object-name    nacm:node-instance-identifier
          +--rw tag*           tags:tag
          +--rw masked-tag*    tags:tag                    </artwork>
        </figure>
      </section>
    </section>

    <section title="YANG Module">
      <figure>
        <artwork>&lt;CODE BEGINS&gt; file "ietf-data-object-tags@2019-05-03.yang"
module ietf-data-object-tags {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-data-object-tags";
  prefix ntags;

  import ietf-netconf-acm {
    prefix nacm;
  }
  import ietf-module-tags {
    prefix tags;
  }

  organization
    "IETF NetMod Working Group (NetMod)";
  contact
    "WG Web:  &lt;https://tools.ietf.org/wg/netmod/&gt;
     WG List: &lt;mailto:netmod@ietf.org&gt;
     Editor:  Qin Wu &lt;mailto:bill.wu@huawei.com&gt;
     Editor:  Benoit Claise &lt;mailto:bclaise@cisco.com&gt;
     Editor:  Peng Liu &lt;mailto:liupengyjy@chinamobile.com&gt;
     Editor:  Zongpeng Du &lt;mailto:duzongpeng@chinamobile.com&gt;
     Editor:  Mohamed Boucadair &lt;mailto:mohamed.boucadair@orange.com&gt;";
  description
    "This module describes a mechanism associating self-describing
     tags with YANG data object within YANG modules. Tags may be IANA
     assigned or privately defined.

     Copyright (c) 2020 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 Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

  revision 2019-05-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: Self Describing Data Object Tags";
  }

  extension opm-tag {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'. This extension statement
       is used by module authors to indicate the opm tags that SHOULD be
       added automatically by the system. Opm Tag is used to classify
       operation and management data into object, property subobject, and metric 
       subobject three categories. Object can contain other objects called subobjects.
       Property and metric objects are both subobjects belonging to specific object. 
       Both object and subobjects can be modeled as data nodes. Object can be one of 
       container, leaf-list and list. Property subobject is a leaf node. Metric subobject 
       can be one of container, leaf-list, list, leaf. Object contains zero or many 
       property subobjects, zero or many metric subobjects. As such the origin of the
       value for the pre-defined tags should be set to 'system'[RFC8342].";
  }

  extension metric-group {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'.The metric-group can be
       used to provide metric subobject classification 
       (e.g., loss, jitter, packet loss) within the YANG module.";
  }

  extension multi-source-tag {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'.The multi-source-tag can be
       used to identify  multi-source aggregation type (e.g., aggregated, 
       non-aggregated) related to metric subobject. 

      'aggregated' multi-source aggregation type allows a large number of 
      measurements on metric subobjects from different sources of the same 
      type (e.g.,line card, each subinterface of aggregated Ethernet interface) 
      being combined into aggregated statistics and report as one metric subobject 
      value. 'non-aggregated' multi-source aggregation type allows measurement from 
      each source of the same type (e.g.,line card, each subinterface of aggregated 
      Ethernet interface) be reported separately.";
   }

  augment "/tags:module-tags/tags:module" {
    description
      "Augment the Module Tags module with data object tag attributes";
    container data-object-tags {
      description
        "Contains the list of data objects and their associated data object tags";
      list data-object {
        key "object-name";
        description
          "A list of data objects and their associated data object tags";
        leaf object-name {
          type nacm:node-instance-identifier;
          mandatory true;
          description
            "The YANG data object name.";
        }
        leaf-list tag {
          type tags:tag;
          description
            "Tags associated with the data object within the YANG module. See
             the IANA 'YANG Data Object Tag Prefixes' registry for reserved
             prefixes and the IANA'IETF YANG Data Object Tags' registry for
             IETF tags.

             The 'operational' state [RFC8342] view of this list is
             constructed using the following steps:

             1) System tags (i.e., tags of 'system' origin) are added.
             2) User configured tags (i.e., tags of 'intended' origin)
             are added.
             3) Any tag that is equal to a masked-tag is removed.";
        }
        leaf-list masked-tag {
          type tags:tag;
          description
            "The list of tags that should not be associated with the data
             object within the YANG module. The user can remove (mask) tags from the
             operational state datastore [RFC8342] by adding them to
             this list. It is not an error to add tags to this list
             that are not associated with the data object within YANG module,
             but they have no operational effect.";
        }
      }
    }
  }
}
&lt;CODE ENDS&gt;</artwork>
      </figure>
    </section>

    <section anchor="guideline" title="Guidelines to Model Writers">
      <t>This section updates [RFC8407].</t>

      <section title="Define Standard Tags">
        <t>A module MAY indicate, using data object tag extension statements,
        a set of data object tags that are to be automatically associated with
        data object within the module (i.e., not added through
        configuration).</t>

        <figure anchor="opm-example" title="Data object tag example">
          <artwork> module example-module-A {
        //...
        import ietf-data-node-tags { prefix ntags; }
        container top {
          ntags:opm-tag "ietf:object";
         list X {
           leaf foo {
           ntags:opm-tag "ietf:property";
            }
          }
        container Y {
          leaf bar {
          ntags:opm-tag "ietf:metric";
          }
      }
    }
  // ...
 }</artwork>
        </figure>

        <t>The module writer can use existing standard data object tags, or
        use new data object tags defined in the data object definition, as
        appropriate. For IETF standardized modules, new data object tags MUST
        be assigned in the IANA registry defined below, see Section <xref
        target="tag"/>.</t>
      </section>
    </section>

    <section anchor="iana" title="IANA Considerations">
      <section anchor="prefix" title="YANG Data Object Tag Prefixes Registry">
        <t>IANA is asked to create a new registry "YANG Data Object Tag
        Prefixes" grouped under a new "Protocol" category named "YANG Data
        Object Tag Prefixes".</t>

        <t>This registry allocates tag prefixes. All YANG Data Object Tags
        SHOULD begin with one of the prefixes in this registry.</t>

        <t>Prefix entries in this registry should be short strings consisting
        of lowercase ASCII alpha-numeric characters and a final ":"
        character.</t>

        <t>The allocation policy for this registry is Specification Required
        [RFC8126]. The Reference and Assignee values should be sufficient to
        identify and contact the organization that has been allocated the
        prefix.</t>

        <t>The initial values for this registry are as follows.</t>

        <figure>
          <artwork>   +----------+----------------------------------+-----------+----------+
   | Prefix   | Description                      | Reference | Assignee |
   +----------+----------------------------------+-----------+----------+
   | ietf:    | IETF Tags allocated in the IANA  | [This     | IETF     |
   |          | IETF YANG Data Object Tags registry document]|          |
   |          |                                  |           |          |
   |vendor:   | Non-registered tags allocated by | [This     | IETF     |
   |          | the module implementer.          | document] |          |
   |          |                                  |           |          |
   | user:    | Non-registered tags allocated by | [This     | IETF     |
   |          | and for the user.                | document] |          |
   +----------+----------------------------------+-----------+----------+</artwork>
        </figure>

        <t>Other standards organizations (SDOs) wishing to allocate their own
        set of tags should allocate a prefix from this registry.</t>
      </section>

      <section anchor="tag" title="IETF YANG Data Object Tags Registry">
        <t>IANA is asked to create 3 new registries "IETF OPM Tags","IETF
        Metric Group Tags","IETF Multiple Source Tags" grouped under a new
        "Protocol" category. These 3 registries should be included below "YANG
        Data Object Tag Prefixes" when listed on the same page.</t>

        <t>3 registries allocate tags that have the registered prefix "ietf:".
        New values should be well considered and not achievable through a
        combination of already existing IETF tags.</t>

        <t>The allocation policy for these three registries is IETF Review
        [RFC8126].</t>

        <t>The initial values for these three registries are as follows.</t>

        <figure>
          <artwork>   +----------------------------+--------------------------+-----------+
   | OPM Tag                    | Description              | Reference |
   +----------------------------+--------------------------+-----------+
   |                            |                          |           |
   | ietf:object                |Represent specific object | [This     |
   |                            |type(e.g., interfaces).   | document] |
   |                            |                          |           |
   | ietf:property              |Represent  a property     | [This     |
   |                            |subobject (e.g.,ifindex)  | document] |
   |                            |assoiciated with specific |           |
   |                            |object (e.g.,interfaces). |           |
   |                            |                          |           |
   | ietf:metric                |Represent metric subobject| [This     |
   |                            |(e.g., ifstatistics)      | document] |
   |                            |associated with specific  |           |
   |                            | object(e.g.,interfaces)  |           |
   +----------------------------+--------------------------+-----------+
   +----------------------------+--------------------------+-----------+
   | Metric Group Tag           | Description              | Reference |
   +----------------------------+--------------------------+-----------+
   | ietf:delay                 |Represent the metric group| [This     |
   |                            |which metric subobjects   | document] | 
   |                            |belong to (i.e., delay)   |           |        
   |                            |                          |           |
   | ietf:jitter                |Represent the metric group| [This     |
   |                            |which metric subobjects   |document]  |
   |                            |belong to (i.e., jitter)  |           |
   |                            |                          |           |
   | ietf:loss                  |Represent the metric group| [This     |
   |                            |which metric subobjects   | document] |
   |                            |belong to (i.e.,loss)     |           |
   +----------------------------+--------------------------+-----------+
   +----------------------------+--------------------------+-----------+
   | Multiple Source Tag        | Description              | Reference |
   +----------------------------+--------------------------+-----------+
   |ietf:non-agg                |Relate to multiple source | [This     |
   |                            |aggregation type(i.e.,    | document] |
   |                            |aggregated statistics)    |           |
   |                            |                          |           |
   |ietf:agg                    |Relate to multiple source | [This     |
   |                            |aggregation type(i.e., non| document] |
   |                            |aggregated statistics)    |           |
   +----------------------------+--------------------------+-----------+</artwork>
        </figure>

        <t>Each YANG data object can have one opm tag, zero or one
        metric-group tag, zero or one multi-source tag.</t>
      </section>

      <section anchor="xml" title="Updates to the IETF XML Registry">
        <t>This document registers a URI in the "IETF XML Registry" [RFC3688].
        Following the format in [RFC3688], the following registration has been
        made:</t>

        <figure>
          <artwork>   URI:
      urn:ietf:params:xml:ns:yang:ietf-data-object-tags
   Registrant Contact:
      The IESG.
   XML:
      N/A; the requested URI is an XML namespace.</artwork>
        </figure>
      </section>

      <section anchor="module"
               title="Updates to the YANG Module Names Registry">
        <t>This document registers one YANG module in the "YANG Module Names"
        registry [RFC6020]. Following the format in [RFC6020], the following
        registration has been made:</t>

        <figure>
          <artwork>   name:
      ietf-data-object-tags
   namespace:
      urn:ietf:params:xml:ns:yang:ietf-data-object-tags
   prefix:
      ntags
   reference:
      RFC XXXX (RFC Ed.: replace XXX with actual RFC number and remove
      this note.)</artwork>
        </figure>
      </section>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>The YANG module defined in this memo is designed to be accessed via
      the NETCONF protocol [RFC6241]. The lowest NETCONF layer is the secure
      transport layer and the mandatory-to-implement secure transport is SSH
      [RFC6242].</t>

      <t>This document adds the ability to associate data object tag meta-data
      with data object within the YANG modules. This document does not define
      any actions based on these associations, and none are yet defined, and
      therefore it does not by itself introduce any new security
      considerations.</t>

      <t>Users of the data object tag meta-data may define various actions to
      be taken based on the data object tag meta-data. These actions and their
      definitions are outside the scope of this document. Users will need to
      consider the security implications of any actions they choose to
      define.</t>
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank Ran Tao for his major contributions
      to the initial modeling and use cases. The authors would also like to
      acknowledge the comments and suggestions received from Juergen
      Schoenwaelder, Andy Bierman, Lou Berger,Jaehoon Paul Jeong, Wei Wang,
      Yuan Zhang, Ander Liu, Peng Liu, YingZhen Qu, Boyuan Yan.</t>
    </section>

    <section title="Contributors">
      <figure>
        <artwork>      Liang Geng
      China Mobile
      32 Xuanwumen West St, Xicheng District
      Beijing  10053

      Email: gengliang@chinamobile.com</artwork>
      </figure>
    </section>

    <!---->
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119.xml"?>

      <?rfc include="reference.RFC.8174.xml"?>

      <?rfc include="reference.RFC.7950.xml"?>

      <?rfc include="reference.RFC.8342.xml"?>

      <?rfc include="reference.RFC.8407.xml"?>

      <?rfc include="reference.RFC.8126.xml"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.3688.xml"?>

      <?rfc include="reference.RFC.6020.xml"?>

      <?rfc include="reference.RFC.6241.xml"?>

      <?rfc include="reference.RFC.6242.xml"?>

      <?rfc include="reference.RFC.8340.xml"?>

      <?rfc include="reference.RFC.8639.xml"?>

      <?rfc include="reference.RFC.8641.xml"?>
    </references>

    <section title="NETCONF Example">
      <t>The following is a fictional NETCONF example result from a query of
      the data object tags list. For the sake of brevity only a few module and
      associated data object results are imagined.</t>

      <figure>
        <artwork>&lt;ns0:data xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
  &lt;t:module-tags xmlns:t="urn:ietf:params:xml:ns:yang:ietf-module-tags"&gt;
    &lt;t:module&gt;
       &lt;t:name&gt;ietf-interfaces&lt;/t:name&gt;
       &lt;s:data-object-tags xmlns:s="urn:ietf:params:xml:ns:yang:ietf-data-object-tags"&gt;
        &lt;s:data-object&gt;
         &lt;s:object-name&gt;/if:interfaces/if:interface&lt;/s:object-name&gt;
         &lt;s:tag&gt;ietf:object&lt;/s:tag&gt;
        &lt;/s:data-object&gt;
       &lt;s:data-object&gt;
        &lt;s:object-name&gt;/if:interfaces/if:interface/if:last-change&lt;/s:object-name&gt;
        &lt;s:tag&gt;ietf:property&lt;/s:tag&gt;
       &lt;/s:data-object&gt;
        &lt;s:data-object&gt;
         &lt;s:object-name&gt;
          /if:interfaces/if:interface/if:statistics/if:in-errors
         &lt;/s:object-name&gt;
         &lt;s:tag&gt;ietf:metric&lt;/s:tag&gt;
        &lt;/s:data-object&gt;
      &lt;/s:data-object-tags&gt;
    &lt;/t:module&gt;
    &lt;t:module&gt;
       &lt;t:name&gt;ietf-ip&lt;/t:name&gt;
       &lt;s:data-object-tags xmlns:s="urn:ietf:params:xml:ns:yang:ietf-data-object-tags"&gt;
       &lt;s:data-object&gt;
         &lt;s:object-name&gt;/if:interfaces/if:interface/ip:ipv4&lt;/s:object-name&gt;
         &lt;s:tag&gt;ietf:object&lt;/s:tag&gt;
       &lt;/s:data-object&gt;
       &lt;s:data-object&gt;
         &lt;s:object-name&gt;/if:interfaces/if:interface/ip:ipv4/ip:enable&lt;/s:object-name&gt;
         &lt;s:tag&gt;ietf:property&lt;/s:tag&gt;
       &lt;/s:data-object&gt;
        &lt;s:data-object&gt;
        &lt;s:object-name&gt;/if:interfaces/if:interface/ip:ipv4/ip:mtu&lt;/s:object-name&gt;
        &lt;s:tag&gt;ietf:metric&lt;/s:tag&gt;
       &lt;/s:data-object&gt;
      &lt;/s:data-object-tags&gt;
    &lt;/t:module&gt;
  &lt;/t:module-tags&gt;
&lt;/ns0:data&gt;</artwork>
      </figure>
    </section>

    <section title="Non-NMDA State Module">
      <t>As per [RFC8407] the following is a non-NMDA module to support
      viewing the operational state for non-NMDA compliant servers.</t>

      <figure>
        <artwork>&lt;CODE BEGINS&gt; file "ietf-data-object-tags-state@2019-05-03.yang"
module ietf-data-object-tags-state {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-data-object-tags-state";
  prefix ntags-s;

  import ietf-netconf-acm {
    prefix nacm;
  }
  import ietf-module-tags {
    prefix tags;
  }
  organization
    "IETF NetMod Working Group (NetMod)";
  contact
    "WG Web:  &lt;https://tools.ietf.org/wg/netmod/&gt;
     WG List: &lt;mailto:netmod@ietf.org&gt;
     Editor:  Qin Wu &lt;mailto:bill.wu@huawei.com&gt;
     Editor:  Benoit Claise &lt;mailto:bclaise@cisco.com&gt;
     Editor:  Peng Liu &lt;mailto:liupengyjy@chinamobile.com&gt;
     Editor:  Zongpeng Du &lt;mailto:duzongpeng@chinamobile.com&gt;";
  description
    "This module describes a mechanism associating self-describing
     tags with YANG data object within YANG modules. Tags may be IANA
     assigned or privately defined.

     Copyright (c) 2020 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 Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

  revision 2019-05-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: Self Describing Data Object Tags";
  }

  extension opm-tag {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'. This extension statement
       is used by module authors to indicate the opm tags that SHOULD be
       added automatically by the system. Opm Tag is used to classify
       operation and management data into object, property subobject, and metric 
       subobject three categories. Object can contain other objects called subobjects.
       Property and metric objects are both subobjects belonging to specific object. 
       Both object and subobjects can be modeled as data nodes. Object can be one of 
       container, leaf-list and list. Property subobject is a leaf node. Metric subobject 
       can be one of container, leaf-list, list, leaf. Object contains zero or many 
       property subobjects, zero or many metric subobjects. As such the origin of the value 
       for the pre-defined tags should be set to 'system'[RFC8342].";
  }
  extension metric-group {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'.The metric-group can be
       used to provide metric subobject classification
       (e.g., loss, jitter, packet loss)within the YANG module.";
  }
  extension multi-source-tag {
    argument tag;
    description
      "The argument 'tag' is of type 'tag'.The multi-source-tag can be
       used to identify  multi-source aggregation type (e.g., aggregated, 
       non-aggregated) related to metric subobject. 

      'aggregated' multi-source aggregation type allows a large number of 
      measurements on metric subobjects from different sources of the same 
      type (e.g.,line card, each subinterface of aggregated Ethernet interface) 
      being combined into aggregated statistics and report as one metric subobject 
      value. 'non-aggregated' multi-source aggregation type allows measurement from 
      each source of the same type (e.g.,line card, each subinterface of aggregated 
      Ethernet interface) be reported separately.";
   }

  augment "/tags:module-tags/tags:module" {
    description
      "Augment the Module Tags module with data object tag attributes.";
    container data-object-tags {
      config false;
      status deprecated;
      description
        "Contains the list of data objects and their associated self describing tags.";
      list data-object {
        key "object-name";
        status deprecated;
        description
          "A list of data objects and their associated self describing tags.";
        leaf object-name {
          type nacm:node-instance-identifier;
          mandatory true;
          status deprecated;
          description
            "The YANG data object name.";
        }
        leaf-list tag {
          type tags:tag;
          status deprecated;
          description
            "Tags associated with the data object within the YANG module. See
             the IANA 'YANG Data Object Tag Prefixes' registry for reserved
             prefixes and the IANA'IETF YANG Data Object Tags' registry for
             IETF tags.

             The 'operational' state [RFC8342] view of this list is
             constructed using the following steps:

             1) System tags (i.e., tags of 'system' origin) are added.
             2) User configured tags (i.e., tags of 'intended' origin)
             are added.
             3) Any tag that is equal to a masked-tag is removed.";
        }
        leaf-list masked-tag {
          type tags:tag;
          status deprecated;
          description
            "The list of tags that should not be associated with the data
             object within the YANG module. The user can remove (mask) tags from the
             operational state datastore [RFC8342] by adding them to
             this list. It is not an error to add tags to this list
             that are not associated with the data object within YANG module,
             but they have no operational effect.";
        }
      }
    }
  }
}
&lt;CODE ENDS&gt;</artwork>
      </figure>
    </section>

    <section title="Targeted data object collection example">
      <t>The following subsections provides targeted data object collection
      example which helps reduce amount of data to be fetched. The
      subscription "id" values of 22 used below is just an example. In
      production, the actual values of "id" might not be small integers.</t>

      <figure>
        <artwork> +-----------+                       +-----------+
 | Subscriber|                       | Publisher |
 +------+----+                       +-----+-----+
        |                                  |
        |                                  |
        |Telemery data Tagging Advertisement
        |  (data object name, opm-tag = metric)
        |&lt;---------------------------------|
        |                                  |
        |    establish-subscription        |
        |---------------------------------&gt;|
        |                                  |
        |                                  |
        |    RPC Reply: OK, id = 22        |
        |&lt;---------------------------------|
        |                                  |
        |                                  |
        |    Notification Message (for 22) |
        | &lt;--------------------------------|
        |                                  |
        |                                  |</artwork>
      </figure>

      <t>The publisher advertises telemetry data object capability to the
      subscriber to instruct the receiver to subscribe tagged data object
      (e.g., performance metric data object) using standard subscribed
      notification mechanism [RFC8639].</t>

      <t>The following XML example [W3C.REC-xml-20081126] illustrates the
      advertisment of the list of available target objects using YANG instance
      file format [I-D.ietf-netmod-yang-instance-file-format]:</t>

      <figure>
        <artwork>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;instance-data-set xmlns=\
    "urn:ietf:params:xml:ns:yang:ietf-yang-instance-data"&gt;
  &lt;name&gt;acme-router-notification-capabilities&lt;/name&gt;
  &lt;content-schema&gt;
    &lt;module&gt;ietf-system-capabilities@2020-03-23&lt;/module&gt;
    &lt;module&gt;ietf-notification-capabilities@2020-03-23&lt;/module&gt;
    &lt;module&gt;ietf-data-export-capabilities@2020-03-23&lt;/module&gt;
  &lt;/content-schema&gt;
  &lt;!-- revision date, contact, etc. --&gt;
  &lt;description&gt;Defines the notification capabilities of an acme-router.
    The router only has running, and operational datastores.
    Every change can be reported on-change from running, but
    only config=true nodes and some config=false data from operational.
    Statistics are not reported based on timer based trigger and counter
    threshold based trigger.
  &lt;/description&gt;
  &lt;content-data&gt;
    &lt;system-capabilities \
      xmlns="urn:ietf:params:xml:ns:yang:ietf-system-capabilities" \
      xmlns:inc=\
        "urn:ietf:params:xml:ns:yang:ietf-notification-capabilities" \
      xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"&gt;
      &lt;datastore-capabilities&gt;
        &lt;datastore&gt;ds:operational&lt;/datastore&gt;
        &lt;per-node-capabilities&gt;
          &lt;node-selector&gt;\
              /if:interfaces/if:interface/if:statistics/if:in-errors\
          &lt;/node-selector&gt;
          &lt;sec:self-describing-capabilities&gt;
            &lt;sec:opm-tag&gt;metric&lt;/sec:opm-tag&gt;
            &lt;sec:metric-group&gt;loss&lt;/sec:metric-group&gt;
          &lt;/sec:self-describing-capabilities&gt;
        &lt;/per-node-capabilities&gt;
      &lt;/datastore-capabilities&gt;
    &lt;/system-capabilities&gt;
  &lt;/content-data&gt;
&lt;/instance-data-set&gt;</artwork>
      </figure>

      <t>With telemetry data tagging information carried in the Telemetry data
      Tagging Advertisement, the subscriber identifies targeted data object
      and associated data path to the datastore node and sends a standard
      establish-subscription RPC [RFC8639] to subscribe tagged data objects
      that are interests to the client application from the publisher.</t>

      <figure>
        <artwork> &lt;netconf:rpc message-id="101"
     xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"&gt;
   &lt;establish-subscription
       xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"
       xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push"&gt;
     &lt;yp:datastore
          xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"&gt;
       ds:operational
     &lt;/yp:datastore&gt;
     &lt;yp:datastore-xpath-filter
         xmlns:ex="https://example.com/sample-data/1.0"&gt;
       /if:interfaces/if:interface/if:statistics/if:in-errors
     &lt;/yp:datastore-xpath-filter&gt;
     &lt;yp:periodic&gt;
       &lt;yp:period&gt;500&lt;/yp:period&gt;
     &lt;/yp:periodic&gt;
   &lt;/establish-subscription&gt;
 &lt;/netconf:rpc&gt;</artwork>
      </figure>

      <t>The publisher returns specific object type of operational state
      (e.g., in-errors statistics data) subscribed by the client.</t>
    </section>

    <section title="Changes between Revisions">
      <t>v00 - v01<list style="symbols">
          <t>Merge self describing data object tag use case section into
          introduction section as a subsection;</t>

          <t>Add one glossary section;</t>

          <t>Clarify the relation between data object, object tag, property
          tag and metric tag in Self Describing Data Object Tags Use Case
          section;</t>

          <t>Add update to RFC8407 in the front page.</t>
        </list></t>
    </section>
  </back>
</rfc>
