RFC 8819: YANG Module Tags
- C. Hopps,
- L. Berger,
- D. Bogdanovic
Abstract
This document provides for the association of tags with YANG
modules. The expectation is for such tags to be used to help classify
and organize modules. A method for defining, reading, and writing
modules tags is provided. Tags may be registered and assigned during
module definition, assigned by implementations
Status of This Memo
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2021 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://
1. Introduction
The use of tags for classification and organization is fairly
ubiquitous not only within IETF protocols but in the internet itself
(e.g., #hashtags).
One benefit of using tags for organization
over a rigid structure is that it is more flexible and can more easily
adapt over time as technologies evolve. Tags can be usefully registered,
but they can also serve as a non-registered mechanism available for
users to define themselves. This document provides a mechanism to define
tags and associate them with YANG modules in a flexible manner. In
particular, tags may be registered as well as assigned during module
definition, assigned by implementations
This document defines a YANG module [RFC7950] that provides a list of module entries to allow for adding or removing tags as well as viewing the set of tags associated with a module.¶
This document defines an extension statement to indicate tags that SHOULD be added by the module implementation automatically (i.e., outside of configuration).¶
This document also defines an IANA registry for tag prefixes as well as a set of globally assigned tags.¶
Section 6 provides guidelines for authors of YANG data models.¶
This document updates [RFC8407].¶
The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in [RFC8342].¶
1.1. Some Possible Use Cases for YANG Module Tags
During this document's development, there were requests for example uses of module tags. The following are a few example use cases for tags. This list is certainly not exhaustive.¶
One example use of tags would be to help filter different discrete categories of YANG modules supported by a device. For example, if modules are suitably tagged, then an XPath query can be used to list all of the vendor modules supported by a device.¶
Tags can also be used to help coordination when multiple,
semi
Tag classification is useful for users searching module repositories (e.g., YANG catalog). A query restricted to the 'ietf:routing' module tag could be used to return only the IETF YANG modules associated with routing. Without tags, a user would need to know the name of all the IETF routing protocol YANG modules.¶
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. Conventions Used in This Document
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. Tag Values
All tags SHOULD begin with a prefix indicating who owns their definition. An IANA registry (Section 7.1) is used to support registering tag prefixes. Currently, three 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.¶
Again, except for the conflict
2.2. Vendor Tags
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
2.3. User Tags
A user tag is any tag that has the prefix "user:". These tags are
defined by the user
2.4. Reserved Tags
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).¶
3. Tag Management
Tags can become associated with a module in a number of ways. Tags may be defined and associated at module design time, at implementation time, or via user administrative control. As the main consumer of tags are users, users may also remove any tag, no matter how the tag became associated with a module.¶
3.1. Module Definition Tagging
A module definition MAY indicate a set of tags to be added by the module implementer. These design-time tags are indicated using the module-tag extension statement.¶
If the module is defined in an IETF Standards Track document, the tags MUST be IETF tags (Section 2.1). Thus, new modules 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 a module. These tags SHOULD be IETF tags (i.e., registered) or vendor-specific tags.¶
3.3. User Tagging
Tags of any kind, with or without a prefix, can be assigned and
removed by the user using normal configuration mechanisms. In order to
remove a tag from the operational datastore, the user adds a matching
masked-tag entry for a given module.¶
4. Tags Module Structure
4.1. Tags Module Tree
The tree associated with the "ietf
4.2. YANG Module
5. Other Classifications
It is worth noting that a different YANG module classification document exists [RFC8199]. That document only classifies modules in a logical manner and does not define tagging or any other mechanisms. It divides YANG modules into two categories (service or element) and then into one of three origins: standard, vendor, or user. It does provide a good way to discuss and identify modules in general. This document defines IETF tags to support the classification style described in [RFC8199].¶
6. Guidelines to Model Writers
This section updates [RFC8407].¶
6.1. Define Standard Tags
A module MAY indicate, using module-tag extension statements, a set of tags that are to be automatically associated with it (i.e., not added through configuration).¶
The module writer can use existing standard tags or use new tags defined in the model definition, as appropriate. For IETF standardized modules, new tags MUST be assigned in the IANA registry defined below, see Section 7.2.¶
7. IANA Considerations
7.1. YANG Module Tag Prefixes Registry
IANA has created the "YANG Module Tag Prefixes" subregistry in the "YANG Module Tags" registry.¶
This registry allocates tag prefixes. All YANG module 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.¶
Other standards development organizations (SDOs) wishing to allocate their own set of tags should allocate a prefix from this registry.¶
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 registrations have been made:¶
7.4. Updates to the YANG Module Names Registry
This document registers two YANG modules in the "YANG Module Names" registry [RFC6020]. Following the format in [RFC6020], the following registrations have been made:¶
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
This document adds the ability to associate tag metadata with YANG modules. This document does not define any actions based on these associations, and none are yet defined; therefore, it does not by itself introduce any new security considerations directly.¶
Users of the tag metadata may define various actions to be taken based on the tag metadata. 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, including the potential for a tag to get 'masked' by another user.¶
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 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10
.17487 , , <https:///RFC7950 www >..rfc -editor .org /info /rfc7950 - [RFC8126]
-
Cotton, M., Leiba, B., and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10
.17487 , , <https:///RFC8126 www >..rfc -editor .org /info /rfc8126 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8199]
-
Bogdanovic, D., Claise, B., and C. Moberg, "YANG Module Classification", RFC 8199, DOI 10
.17487 , , <https:///RFC8199 www >..rfc -editor .org /info /rfc8199 - [RFC8342]
-
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10
.17487 , , <https:///RFC8342 www >..rfc -editor .org /info /rfc8342 - [RFC8407]
-
Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10
.17487 , , <https:///RFC8407 www >..rfc -editor .org /info /rfc8407
9.2. Informative References
- [RFC3688]
-
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10
.17487 , , <https:///RFC3688 www >..rfc -editor .org /info /rfc3688 - [RFC5198]
-
Klensin, J. and M. Padlipsky, "Unicode Format for Network Interchange", RFC 5198, DOI 10
.17487 , , <https:///RFC5198 www >..rfc -editor .org /info /rfc5198 - [RFC6020]
-
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10
.17487 , , <https:///RFC6020 www >..rfc -editor .org /info /rfc6020 - [RFC6241]
-
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10
.17487 , , <https:///RFC6241 www >..rfc -editor .org /info /rfc6241 - [RFC6242]
-
Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10
.17487 , , <https:///RFC6242 www >..rfc -editor .org /info /rfc6242 - [RFC8340]
-
Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10
.17487 , , <https:///RFC8340 www >..rfc -editor .org /info /rfc8340
Appendix A. Examples
The following is a fictional NETCONF example result from a query of the module tags list. For the sake of brevity, only a few module results are shown.¶
Appendix B. Non-NMDA State Module
As per [RFC8407], the following is a non-NMDA module to support viewing the operational state for non-NMDA compliant servers.¶
Acknowledgements
Special thanks to Robert Wilton for his help improving the introduction and providing the example use cases, as well as generating the non-NMDA module.¶