NETMOD Working Group R. Tao
Internet-Draft Q. Wu
Intended status: Standards Track Huawei
Expires: May 6, 2020 November 3, 2019

YANG Data Node Self Explanation Tags
draft-tao-netmod-yang-node-tags-00

Abstract

This document defines a method to tag data node associated with telemetry data in YANG Modules. This YANG data node tagging method can be used to 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, so that the amount of data to be streamed out to the destination can be greatly reduced.

An extension statement to be used to indicate YANG data node tags that SHOULD be added by the module implementation automatically(i.e., outside of configuration).

A YANG module [RFC7950] is defined, which augment Module tag model and provides a list of data node entries to allow for adding or removing of data node tags as well as viewing the set of tags associated with a YANG module.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on May 6, 2020.

Copyright Notice

Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

As described [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.

This document define data node tag and associate them with data node within YANG modules. The data node tags can be learnt dynamically by the client from the live server and used to filter queries of configuration or operational state on a server based on these data node tags,.e.g.,return specific object type operational state related to system-management. NETCONF clients can discover data models with data nod tags supported by a NETCONF server via <get-schema> operation. The data node 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 tags may be registered as well as assigned during the module definition; assigned by implementations; or dynamically defined and set by users.

This document defines a YANG module [RFC7950] which augments Module tag model and provides a list of data node entries to allow for adding or removing of tags as well as viewing the set of tags associated with a data node within YANG modules.

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

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

1.1. Use cases for Data Node tags

The following is a list of already implemented and potential use cases.

One example use of data node tags would be to help filter different discrete categories of YANG data node within YANG modules supported by a device. For example, if data nodes within YANG modules are suitably tagged and learnt by the client from a live server, then an XPath query can be used by the client to list all of the performance related data nodes supported by a device.

Data node tags can also be used to help coordination when clients are interacting with large amount of devices with the same categories of YANG data node across different YANG modules. For example, one management client could mark some specific data node across modules implemented in various different devices with the same performance-metric tag, so all the devices can provide consistent representation and reporting for the same category of YANG data nodes.

Future management protocol extensions could allow for filtering queries of configuration or operational state on a server based on tags. For example, return all operational state related to system-management.

1.2. Terminology

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.

2. Data Node Tag Values

All data node tags SHOULD begin with a prefix indicating who owns their definition. An IANA registry (Section 7.1) is used to support registering data node tag prefixes. Currently 3 prefixes are defined.

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.

2.1. IETF Tags Prefix

An IETF tag is a data node tag that has the prefix "ietf:dn:". All IETF data node tags are registered with IANA in a registry defined later in this document (Section 7.2).

2.2. Vendor Tags Prefix

A vendor tag is a tag that has the prefix "vendor:dn:". 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 enterpise or organization name following the "vendor:dn:" prefix (e.g., vendor:dn:vendor-defined-classifier).

2.3. User Tags Prefix

A user tag is any tag that has the prefix "user:dn:". These tags are defined by the user/administrator and are not meant to be registered. Users are not required to use the "user:dn:" prefix; however, doing so is RECOMMENDED as it helps avoid prefix collisions.

2.4. Reserved Tags Prefix

Any tag not starting with the prefix "ietf:dn:", "vendor:dn:" or "user:dn:" is reserved for future use. These tag values are not invalid, but simply reserved in the context of specifications (e.g., RFCs).

3. Data Node Tag Management

Tags can become associated with a data node within YANG module in a number of ways. Tags may be defined and associated at module design time, at implementation time without the need of live server, or via user administrative control . As the main consumer of data node tags are users, users may also remove any tag from a live server, no matter how the tag became associated with a data node within a YANG module.

3.1. Module Design Tagging

A data node definition MAY indicate a set of data node tags to be added by the module implementer. These design time tags are indicated using the node-tag extension statement.

If the data node is defined in an IETF standards track document, the data node tags MUST be IETF Tags (2.1). Thus, new data node can drive the addition of new IETF tags to the IANA registry defined in Section 7.2, and the IANA registry can serve as a check against duplication.

3.2. Implementation Tagging

An implementation MAY include additional tags associated with data node within a YANG module. These tags SHOULD be IETF Tags (i.e., registered) or vendor specific tags.

3.3. User Tagging

Data node 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 node tag from the operational datastore the user adds a matching "masked-tag" entry for a given data node within the ietf-data-node-tags Module.

4. Tags Module Structure

4.1. Tags Module Tree

The tree associated with the "ietf-data-node-tags" module follows. The meaning of the symbols can be found in [RFC8340].

       module: ietf-data-node-tags
       augment /tags:module-tags/tags:module:
         +--rw data-node-tags
            +--rw data-node* [node-name]
               +--rw node-name      nacm:node-instance-identifier
               +--rw tag*           tags:tag
               +--rw masked-tag*    tags:tag
               +--rw group-id       string

5. YANG Module

<CODE BEGINS> file "ietf-data-node-tags@2019-05-03.yang"
   module ietf-data-node-tags {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-data-node-tags";
     prefix ntags;

     import ietf-yang-types   { prefix yang; }
     import ietf-netconf-acm  { prefix nacm; }
     import ietf-module-tags  { prefix tags; }
     organization
       "IETF NetMod Working Group (NetMod)";
     contact
       "WG Web:  <https://tools.ietf.org/wg/netmod/>
        WG List: <mailto:netmod@ietf.org>

        Author:  Ran Tao
                 <mailto:taoran20@huawei.com>     
        Author:  Qin Wu
                 <mailto:bill.wu@huawei.com>";

     // RFC Ed.: replace XXXX with actual RFC number and
     // remove this note.

     description
       "This module describes a mechanism associating tags with YANG data 
        node within YANG modules. Tags may be IANA assigned or privately defined.
        Copyright (c) 2018 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).

        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.


        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.";

     // RFC Ed.: update the date below with the date of RFC publication
     // and RFC number and remove this note.

     revision 2019-05-03 {
       description
         "Initial revision.";
       reference "RFC XXXX: YANG Data Node Tags";
     }
   typedef node-tag {
       type string {
         length "1..max";
         pattern '[\S ]+';
       }
       description
         "A tag is a type 'string' value that does not include carriage
          return, newline or tab characters. It SHOULD begin with a
          registered prefix; however, tags without a registered prefix
          SHOULD NOT be treated as invalid.";
     }
 extension node-tag {
       argument node-tag;
       description
         "The argument 'tag' is of type 'tag'. This extension statement
          is used by module authors to indicate the data node tags that SHOULD be
          added automatically by the system. As such the origin of the
          value for the pre-defined tags should be set to 'system'
          [RFC8342].";
     }

  augment "/tags:module-tags/tags:module" {
    description
      "Augment the Tags module with data node tag attributes";
     container data-node-tags {
       description
         "Contains the list of data nodes and their associated tags";
       list data-node {
         key "node-name";
         description
           "A list of modules and their associated tags";
         leaf node-name {
           type nacm:node-instance-identifier;
           mandatory true;
           description
             "The YANG module name.";
         }
         leaf-list node-tag {
           type node-tag;
           description
             "Tags associated with the data node within YANG module. See 
              the IANA 'YANG Data Node Tag Prefixes' registry for reserved 
              prefixes and the IANA'IETF YANG Data Node 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 node-masked-tag {
           type node-tag;
           description
             "The list of tags that should not be associated with this
              data node. 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 node within the module, 
              but they have no operational effect.";
         }
       leaf group-id {
         type string;
         description
          "This group ID is used to identify a set of data nodes 
          of the same group which have a common characteristic.";
      }
       }
     }
   }
   }
   <CODE ENDS>

6. Guidelines to Model Writers

This section updates [RFC8407].

6.1. Define Standard Tags

A module MAY indicate, using node-tag extension statements, a set of tags that are to be automatically associated with it (i.e., not added through configuration).

      module example-module {
        //...
        import module-tags { prefix tags; }
        container top {
        ntags:node-tag "ietf:dn:object-type";
      list X {
        ntags:node-tag "ietf:dn:property";
    }
    container Y {
    ntags:node-tag "ietf:dn:performance-metric";
    }
    }
        // ...
      }

The module writer can use existing standard tags, or use new tags defined in the model definition, as appropriate. For IETF standardized modules new data node tags MUST be assigned in the IANA registry defined below, see Section 7.2.

7. IANA Considerations

7.1. YANG Data Node Tag Prefixes Registry

IANA is asked to create a new registry "YANG Data Node Tag Prefixes" grouped under a new "Protocol" category named "YANG Data Node Tag Prefixes".

This registry allocates tag prefixes. All YANG data node tags SHOULD begin with one of the prefixes in this registry.

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

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.

The initial values for this registry are as follows.

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

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

7.2. IETF YANG Data Node Tags Registry

IANA is asked to create a new registry "IETF YANG Module Tags" grouped under a new "Protocol" category "IETF YANG Module Tags". This registry should be included below "YANG Module Tag Prefixes" when listed on the same page.

This registry allocates tags that have the registered prefix "ietf:". New values should be well considered and not achievable through a combination of already existing IETF tags.

The allocation policy for this registry is IETF Review [RFC8126].

The initial values for this registry are as follows.

   +----------------------------+--------------------------+-----------+
   | Tag                        | Description              | Reference |
   +----------------------------+--------------------------+-----------+
   |                            |                          |           |
   | ietf:dn:object-type        | Relates to object type   | [This     |
   |                            | (e.g., interfaces).      | document] |
   |                            |                          |           |
   | ietf:dn:performance-metric | Relates to performance   | [This     |
   |                            | metric                   | document] |
   |                            | (e.g., ifstatistics).    |           |
   |                            |                          |           |
   | ietf:dn:property           | Represents a object      | [This     |
   |                            | property                 | document] |
   |                            | (e.g.,ifindex).          |           |
   |                            |                          |           |
   |ietf:dn:statistics-operation| Relates to statistics    | [This     |
   |                            | operation(e.g.,average,  | document] |
   |                            | min, max, sum,etc)       |           |
   +----------------------------+--------------------------+-----------+

7.3. Updates to the IETF XML Registry

This document registers a URI in the "IETF XML Registry" [RFC3688]. Following the format in [RFC3688], the following registration has been made:

   URI:
      urn:ietf:params:xml:ns:yang:ietf-data-node-tags

   Registrant Contact:
      The IESG.

   XML:
      N/A; the requested URI is an XML namespace.

7.4. Updates to the YANG Module Names Registry

This document registers one YANG module in the "YANG Module Names" registry [RFC6020]. Following the format in [RFC6020], the following registration has been made:

   name:
      ietf-data-node-tags

   namespace:
      urn:ietf:params:xml:ns:yang:ietf-data-node-tags

   prefix:
      tags

   reference:
      RFC XXXX (RFC Ed.: replace XXX with actual RFC number and remove
      this note.)

8. Security Considerations

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].

This document adds the ability to associate data node tag meta-data with 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.

Users of the data node tag-meta data may define various actions to be taken based on the data node 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.

9. References

9.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC7950] Bjorklund, M., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, August 2016.
[RFC8126] Cotton, M., Leiba, B. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K. and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018.
[RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10.17487/RFC8407, October 2018.

9.2. Informative References

[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, January 2004.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J. and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011.
[RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011.
[RFC8340] Bjorklund, M. and L. Berger, "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018.

Authors' Addresses

Ran Tao Huawei EMail: taoran20@huawei.com
Qin Wu Huawei 101 Software Avenue, Yuhua District Nanjing, Jiangsu 210012 China EMail: bill.wu@huawei.com