idnits 2.17.00 (12 Aug 2021) /tmp/idnits42647/draft-ietf-netmod-module-tags-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The abstract seems to contain references ([RFC8407]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == The 'Updates: ' line in the draft header should list only the _numbers_ of the RFCs which will be updated by this document (if approved); it should not include the word 'RFC' in the list. -- The abstract seems to indicate that this document updates RFC8407, but the header doesn't have an 'Updates:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 390 has weird spacing: '... prefix des...' -- The document date (February 15, 2019) is 1190 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Hopps 3 Internet-Draft L. Berger 4 Updates: RFC8407 (if approved) LabN Consulting, L.L.C. 5 Intended status: Standards Track D. Bogdanovic 6 Expires: August 19, 2019 Volta Networks 7 February 15, 2019 9 YANG Module Tags 10 draft-ietf-netmod-module-tags-05 12 Abstract 14 This document provides for the association of tags with YANG modules. 15 The expectation is for such tags to be used to help classify and 16 organize modules. A method for defining, reading and writing a 17 modules tags is provided. Tags may be standardized and assigned 18 during module definition; assigned by implementations; or dynamically 19 defined and set by users. This document provides guidance to future 20 model writers and, as such, this document updates [RFC8407]. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on August 19, 2019. 39 Copyright Notice 41 Copyright (c) 2019 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.1. Some possible use cases of YANG module tags . . . . . . . 3 58 2. Conventions Used in This Document . . . . . . . . . . . . . . 4 59 3. Tag Values . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3.1. IETF Standard Tags . . . . . . . . . . . . . . . . . . . 4 61 3.2. Vendor Tags . . . . . . . . . . . . . . . . . . . . . . . 4 62 3.3. User Tags . . . . . . . . . . . . . . . . . . . . . . . . 4 63 3.4. Reserved Tags . . . . . . . . . . . . . . . . . . . . . . 4 64 4. Tag Management . . . . . . . . . . . . . . . . . . . . . . . 4 65 4.1. Module Definition Association . . . . . . . . . . . . . . 5 66 4.2. Implementation Association . . . . . . . . . . . . . . . 5 67 4.3. Administrative Tagging . . . . . . . . . . . . . . . . . 5 68 5. Tags Module Structure . . . . . . . . . . . . . . . . . . . . 5 69 5.1. Tags Module Tree . . . . . . . . . . . . . . . . . . . . 5 70 5.2. Tags Module . . . . . . . . . . . . . . . . . . . . . . . 5 71 6. Other Classifications . . . . . . . . . . . . . . . . . . . . 8 72 7. Guidelines to Model Writers . . . . . . . . . . . . . . . . . 8 73 7.1. Define Standard Tags . . . . . . . . . . . . . . . . . . 8 74 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 75 8.1. YANG Module Tag Prefix Registry . . . . . . . . . . . . . 9 76 8.2. YANG Module IETF Tag Registry . . . . . . . . . . . . . . 9 77 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 78 9.1. Normative References . . . . . . . . . . . . . . . . . . 11 79 9.2. Informative References . . . . . . . . . . . . . . . . . 11 80 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 11 81 Appendix B. Example . . . . . . . . . . . . . . . . . . . . . . 12 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 84 1. Introduction 86 The use of tags for classification and organization is fairly 87 ubiquitous not only within IETF protocols, but in the internet itself 88 (e.g., #hashtags). One benefit of using tags for organization over a 89 rigid structure is that it is more flexible and can more easily adapt 90 over time as technologies evolve. Tags can be usefully standardized, 91 but they can also serve as a non-standardized mechanism available for 92 users to define themselves. This document provides a mechanism to 93 define tags and associate them with YANG modules in a flexible 94 manner. In particular, tags may be standardized as well as assigned 95 during module definition; assigned by implementations; or dynamically 96 defined and set by users. 98 This document defines a YANG module [RFC7950] which provides a list 99 of module entries to allow for adding or removing of tags as well as 100 viewing the set of tags associated with a module. 102 This document defines an extension statement to be used to indicate 103 tags that SHOULD be added by the module implementation automatically 104 (i.e., outside of configuration). 106 This document also defines an IANA registry for tag prefixes as well 107 as a set of globally assigned tags. 109 Section 7 provides guidelines for authors of YANG data models. This 110 document updates [RFC8407]. 112 The YANG data model in this document conforms to the Network 113 Management Datastore Architecture defined in [RFC8342]. 115 1.1. Some possible use cases of YANG module tags 117 During this documents progression there were requests for example 118 uses of module tags. The following are a few example use cases for 119 tags. This list is certainly not exhaustive. 121 One example use of tags would be to help filter different discrete 122 categories of YANG modules supported by a device. E.g., if modules 123 are suitably tagged, then an XPath query can be used to list all of 124 the vendor modules supported by a device. 126 Tags can also be used to help coordination when multiple semi- 127 independent clients are interacting with the same devices. E.g., one 128 management client could mark that some modules should not be used 129 because they have not been verified to behave correctly, so that 130 other management clients avoid querying the data associated with 131 those modules. 133 Tag classification is useful for users searching module repositories 134 (e.g. YANG catalog). A query restricted to the 'ietf:routing' 135 module tag could be used to return only the IETF YANG modules 136 associated with routing. Without tags, a user would need to know the 137 name of all the IETF routing protocol YANG modules. 139 Future management protocol extensions could allow for filtering 140 queries of configuration or operational state on a server based on 141 tags. E.g., return all operational state related to system- 142 management. 144 2. Conventions Used in This Document 146 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 147 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 148 "OPTIONAL" in this document are to be interpreted as described in 149 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, 150 as shown here. 152 3. Tag Values 154 All tags SHOULD begin with a prefix indicating who owns their 155 definition. An IANA registry is used to support standardizing tag 156 prefixes. Currently 3 prefixes are defined with all others reserved. 157 No further structure is imposed by this document on the value 158 following the standard prefix, and the value can contain any yang 159 type 'string' characters except carriage-returns, newlines and tabs. 161 3.1. IETF Standard Tags 163 An IETF standard tag is a tag that has the prefix "ietf:". All IETF 164 standard tags are registered with IANA in a registry defined later in 165 this document. 167 3.2. Vendor Tags 169 A vendor tag is a tag that has the prefix "vendor:". These tags are 170 defined by the vendor that implements the module, and are not 171 standardized; however, it is RECOMMENDED that the vendor include 172 extra identification in the tag to avoid collisions such as using the 173 enterpise or organization name follwing the "vendor:" prefix (e.g., 174 vendor:example.com:vendor-defined-classifier). 176 3.3. User Tags 178 A user tag is any tag that has the prefix "user:". These tags are 179 defined by the user/administrator and will never be standardized. 181 3.4. Reserved Tags 183 Any tag not starting with the prefix "ietf:", "vendor:" or "user:" is 184 reserved for future standardization. 186 4. Tag Management 188 Tags can become associated with a module in a number of ways. Tags 189 may be defined and associated at module design time, at 190 implementation time, or via user administrative control. As the main 191 consumer of tags are users, users may also remove any tag, no matter 192 how the tag became associated with a module. 194 4.1. Module Definition Association 196 A module definition can indicate a set of tags to be added by the 197 module implementer. These design time tags are indicated using the 198 module-tag extension statement. If the module definition is IETF 199 standards track, the tags MUST also be IETF standard tags 200 (Section 3.1). Thus, new modules can drive the addition of new 201 standard tags to the IANA registry, and the IANA registry can serve 202 as a check against duplication. 204 4.2. Implementation Association 206 An implementation MAY include additional tags associated with a 207 module. These tags may be standard or vendor specific tags. 209 4.3. Administrative Tagging 211 Tags of any kind can be assigned and removed using normal 212 configuration mechanisms. 214 5. Tags Module Structure 216 5.1. Tags Module Tree 218 The tree associated with the "ietf-module-tags" module follows. The 219 meaning of the symbols can be found in [RFC8340]. 221 module: ietf-module-tags 222 +--rw module-tags 223 +--rw module* [name] 224 +--rw name yang:yang-identifier 225 +--rw tag* tag 226 +--rw masked-tag* tag 228 5.2. Tags Module 230 file "ietf-module-tags@2019-02-15.yang" 231 module ietf-module-tags { 232 yang-version 1.1; 233 namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags"; 234 prefix tags; 236 import ietf-yang-types { 237 prefix yang; 238 } 239 organization 240 "IETF NetMod Working Group (NetMod)"; 241 contact 242 "NetMod Working Group - "; 244 // RFC Ed.: replace XXXX with actual RFC number and 245 // remove this note. 247 description 248 "This module describes a mechanism associating tags with YANG 249 modules. Tags may be IANA assigned or privately defined. 251 Copyright (c) 2018 IETF Trust and the persons identified as 252 authors of the code. All rights reserved. 254 Redistribution and use in source and binary forms, with or 255 without modification, is permitted pursuant to, and subject to 256 the license terms contained in, the Simplified BSD License set 257 forth in Section 4.c of the IETF Trust's Legal Provisions 258 Relating to IETF Documents 259 (https://trustee.ietf.org/license-info). 261 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 262 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 263 'MAY', and 'OPTIONAL' in this document are to be interpreted as 264 described in BCP 14 [RFC2119] [RFC8174] when, and only when, 265 they appear in all capitals, as shown here. 267 This version of this YANG module is part of RFC XXXX 268 (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for 269 full legal notices."; 271 // RFC Ed.: update the date below with the date of RFC publication 272 // and RFC number and remove this note. 274 revision 2018-10-17 { 275 description 276 "Initial revision."; 277 reference "RFC XXXX: YANG Module Tags"; 278 } 280 typedef tag { 281 type string { 282 length "1..max"; 283 pattern '[a-zA-Z_][a-zA-Z0-9\-_]*:[\S ]+'; 284 } 285 description 286 "A tag value is composed of a standard prefix followed by any 287 type 'string' value that does not include carriage return, 288 newline or tab characters."; 289 } 291 extension module-tag { 292 argument tag; 293 description 294 "The argument 'tag' is of type 'tag'. This extension statement 295 is used by module authors to indicate the tags that SHOULD be 296 added automatically by the system. As such the origin of the 297 value for the pre-defined tags should be set to 'system'."; 298 } 300 container module-tags { 301 description 302 "Contains the list of modules and their associated tags"; 303 list module { 304 key "name"; 305 description 306 "A list of modules and their associated tags"; 307 leaf name { 308 type yang:yang-identifier; 309 mandatory true; 310 description 311 "The YANG module name."; 312 } 313 leaf-list tag { 314 type tag; 315 description 316 "Tags associated with the module. See the IANA 'YANG Module 317 Tag Prefix' registry for reserved prefixes and the IANA 318 'YANG Module IETF Tag' registry for IETF standard tags. 320 The 'operational' state [RFC8342] view of this list is 321 constructed using the following steps: 323 1) System tags (i.e., tags of 'system' origin) are added. 324 2) User configured tags (i.e., tags of 'intended' origin) 325 are added. 326 3) Any tag that is equal to a masked-tag is removed."; 327 } 328 leaf-list masked-tag { 329 type tag; 330 description 331 "The list of tags that should not be associated with this 332 module. The user can remove (mask) tags from the 333 operational state datastore [RFC8342] by adding them to 334 this list. It is not an error to add tags to this list 335 that are not associated with the module, but they have no 336 operational effect."; 337 } 338 } 339 } 340 } 341 343 6. Other Classifications 345 It is worth noting that a different YANG module classification 346 document exists [RFC8199]. That document only classifies modules in 347 a logical manner and does not define tagging or any other mechanisms. 348 It divides YANG modules into two categories (service or element) and 349 then into one of three origins: standard, vendor or user. It does 350 provide a good way to discuss and identify modules in general. This 351 document defines standard tags to support [RFC8199] style 352 classification. 354 7. Guidelines to Model Writers 356 This section updates [RFC8407]. 358 7.1. Define Standard Tags 360 A module MAY indicate, using module-tag extension statements, a set 361 of tags that are to be automatically associated with it (i.e., not 362 added through configuration). 364 module example-module { 365 ... 366 import module-tags { prefix tags; } 368 tags:module-tag "ietf:some-new-tag"; 369 tags:module-tag "ietf:some-other-tag"; 370 ... 371 } 373 The module writer can use existing standard tags, or use new tags 374 defined in the model definition, as appropriate. For standardized 375 modules new tags MUST be assigned in the IANA registry defined below, 376 see Section 8.2 below. 378 8. IANA Considerations 380 8.1. YANG Module Tag Prefix Registry 382 This registry allocates tag prefixes. All YANG module tags SHOULD 383 begin with one of the prefixes in this registry. 385 The allocation policy for this registry is Specification Required 386 [RFC5226]. 388 The initial values for this registry are as follows. 390 prefix description 391 -------- --------------------------------------------------- 392 ietf: IETF Standard Tag allocated in the IANA YANG Module 393 IETF Tag Registry. 394 vendor: Non-standardized tags allocated by the module implementer. 395 user: Non-standardized tags allocated by and for the user. 397 Other SDOs (standard organizations) wishing to standardize their own 398 set of tags could allocate a top level prefix from this registry. 400 8.2. YANG Module IETF Tag Registry 402 This registry allocates prefixes that have the standard prefix 403 "ietf:". New values should be well considered and not achievable 404 through a combination of already existing standard tags. 406 The allocation policy for this registry is IETF Review [RFC5226]. 408 The initial values for this registry are as follows. 410 +----------------------------+--------------------------+-----------+ 411 | Tag | Description | Reference | 412 +----------------------------+--------------------------+-----------+ 413 | ietf:network-element-class | A module for a network | [RFC8199] | 414 | | element. | | 415 | | | | 416 | ietf:network-service-class | A module for a network | [RFC8199] | 417 | | service. | | 418 | | | | 419 | ietf:sdo-defined-class | A module defined by a | [RFC8199] | 420 | | standards organization. | | 421 | | | | 422 | ietf:vendor-defined-class | A module defined by a | [RFC8199] | 423 | | vendor. | | 424 | | | | 425 | ietf:user-defined-class | A module defined by the | [RFC8199] | 426 | | user. | | 427 | | | | 428 | ietf:hardware | A module relating to | [This | 429 | | hardware (e.g., | document] | 430 | | inventory). | | 431 | | | | 432 | ietf:software | A module relating to | [This | 433 | | software (e.g., | document] | 434 | | installed OS). | | 435 | | | | 436 | ietf:qos | A module for managing | [This | 437 | | quality of service. | document] | 438 | | | | 439 | ietf:protocol | A module representing a | [This | 440 | | protocol. | document] | 441 | | | | 442 | ietf:system-management | A module relating to | [This | 443 | | system management (e.g., | document] | 444 | | a system management | | 445 | | protocol such as syslog, | | 446 | | TACAC+, SNMP, netconf, | | 447 | | ...). | | 448 | | | | 449 | ietf:network-service | A module relating to | [This | 450 | | network service (e.g., a | document] | 451 | | network service protocol | | 452 | | such as an NTP server, | | 453 | | DNS server, DHCP server, | | 454 | | etc). | | 455 | | | | 456 | ietf:oam | A module representing | [This | 457 | | Operations, | document] | 458 | | Administration, and | | 459 | | Maintenance (e.g., BFD). | | 460 | | | | 461 | ietf:routing | A module related to | [This | 462 | | routing. | document] | 463 | | | | 464 | ietf:signaling | A module representing | [This | 465 | | control plane signaling. | document] | 466 | | | | 467 | ietf:lmp | A module representing a | [This | 468 | | link management | document] | 469 | | protocol. | | 470 +----------------------------+--------------------------+-----------+ 472 Table 1: IETF Module Tag Registry 474 9. References 476 9.1. Normative References 478 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 479 Requirement Levels", BCP 14, RFC 2119, 480 DOI 10.17487/RFC2119, March 1997, 481 . 483 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 484 IANA Considerations Section in RFCs", RFC 5226, 485 DOI 10.17487/RFC5226, May 2008, 486 . 488 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 489 RFC 7950, DOI 10.17487/RFC7950, August 2016, 490 . 492 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 493 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 494 May 2017, . 496 [RFC8407] Bierman, A., "Guidelines for Authors and Reviewers of 497 Documents Containing YANG Data Models", BCP 216, RFC 8407, 498 DOI 10.17487/RFC8407, October 2018, 499 . 501 9.2. Informative References 503 [RFC8199] Bogdanovic, D., Claise, B., and C. Moberg, "YANG Module 504 Classification", RFC 8199, DOI 10.17487/RFC8199, July 505 2017, . 507 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 508 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 509 . 511 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 512 and R. Wilton, "Network Management Datastore Architecture 513 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 514 . 516 Appendix A. Acknowledgements 518 Special thanks to Robert Wilton for his help improving the 519 introduction and providing the example use cases. 521 Appendix B. Example 523 The following is a fictional example result from a query of the 524 module tags list. For the sake of brevity only a few module results 525 are imagined. 527 { 528 "ietf-module-tags:module-tags": { 529 "module": [ 530 { 531 "name": "ietf-bfd", 532 "tag": [ 533 "ietf:network-element-class", 534 "ietf:oam", 535 "ietf:protocol", 536 "ietf:sdo-defined-class" 537 ] 538 }, 539 { 540 "name": "ietf-isis", 541 "tag": [ 542 "ietf:network-element-class", 543 "ietf:protocol", 544 "ietf:routing" 545 "ietf:sdo-defined-class", 546 ] 547 }, 548 { 549 "name": "ietf-ssh-server", 550 "tag": [ 551 "ietf:network-element-class", 552 "ietf:protocol", 553 "ietf:sdo-defined-class", 554 "ietf:system-management" 555 ] 556 } 557 ] 558 } 559 } 561 Authors' Addresses 563 Christan Hopps 564 LabN Consulting, L.L.C. 566 Email: chopps@chopps.org 567 Lou Berger 568 LabN Consulting, L.L.C. 570 Email: lberger@labn.net 572 Dean Bogdanovic 573 Volta Networks 575 Email: ivandean@gmail.com