module: ietf-module-tags +--rw module-tags +--rw module* [name] +--rw name yang:yang-identifier +--rw tag* tag +--rw masked-tag* tag
module ietf-module-tags { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags"; prefix tags; import ietf-yang-types { prefix yang; } organization "IETF NetMod Working Group (NetMod)"; contact "WG Web: <https://datatracker.ietf.org/wg/netmod/> WG List: <mailto:netmod@ietf.org> Author: Christian Hopps <mailto:chopps@chopps.org> Author: Lou Berger <mailto:lberger@labn.net> Author: Dean Bogdanovic <mailto:ivandean@gmail.com>"; description "This module describes a mechanism associating tags with YANG modules. Tags may be IANA assigned or privately defined. Copyright (c) 2021 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 8819 (https://www.rfc-editor.org/info/rfc8819); see the RFC itself for full legal notices. The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document are to be interpreted as described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here."; revision 2021-01-04 { description "Initial revision."; reference "RFC 8819: YANG Module Tags"; } typedef tag { type string { length "1..max"; pattern '[\S ]+'; } description "A tag is a type of '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 module-tag { argument tag; description "The argument 'tag' is of type 'tag'. This extension statement is used by module authors to indicate the tags that SHOULD be added automatically by the system. As such, the origin of the value for the predefined tags should be set to 'system' [RFC8342]."; } container module-tags { description "Contains the list of modules and their associated tags."; list module { key "name"; description "A list of modules and their associated tags."; leaf name { type yang:yang-identifier; mandatory true; description "The YANG module name."; } leaf-list tag { type tag; description "Tags associated with the module. See the IANA 'YANG Module Tag Prefixes' registry for reserved prefixes and the IANA 'IETF YANG Module 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 tag; description "The list of tags that should not be associated with this 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 module, but they have no operational effect."; } } } }
module example-module { namespace "https://example.com/yang/example"; prefix "ex"; //... import module-tags { prefix tags; } tags:module-tag "ietf:some-new-tag"; tags:module-tag "ietf:some-other-tag"; // ... }
Prefix | Description | Reference | Assignee |
---|---|---|---|
ietf: | IETF tags allocated in the IANA "IETF YANG Module Tags" registry. | RFC 8819 | IETF |
vendor: | Non-registered tags allocated by the module implementer. | RFC 8819 | IETF |
user: | Non-registered tags allocated by and for the user. | RFC 8819 | IETF |
Tag | Description | Reference |
---|---|---|
ietf:network-element-class | Network element as defined in [RFC 8199]. | [RFC 8199] |
ietf:network-service-class | Network service as defined in [RFC 8199]. | [RFC 8199] |
ietf:sdo-defined-class | Module is defined by a standards organization. | [RFC 8199] |
ietf:vendor-defined-class | Module is defined by a vendor. | [RFC 8199] |
ietf:user-defined-class | Module is defined by the user. | [RFC 8199] |
ietf:hardware | Relates to hardware (e.g., inventory). | RFC 8819 |
ietf:software | Relates to software (e.g., installed OS). | RFC 8819 |
ietf:protocol | Represents a protocol (often combined with another tag to refine). | RFC 8819 |
ietf:qos | Relates to quality of service. | RFC 8819 |
ietf:network-service-app | Relates to a network service application (e.g., an NTP server, DNS server, DHCP server, etc.). | RFC 8819 |
ietf:system-management | Relates to system management (e.g., a system management protocol such as syslog, TACAC+, SNMP, NETCONF, etc.). | RFC 8819 |
ietf:oam | Relates to Operations, Administration, and Maintenance (e.g., BFD). | RFC 8819 |
ietf:routing | Relates to routing. | RFC 8819 |
ietf:security | Related to security. | RFC 8819 |
ietf:signaling | Relates to control-plane signaling. | RFC 8819 |
ietf:link-management | Relates to link management. | RFC 8819 |
<ns0:data xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> <t:module-tags xmlns:t="urn:ietf:params:xml:ns:yang:ietf-module-tags"> <t:module> <t:name>ietf-bfd</t:name> <t:tag>ietf:network-element-class</t:tag> <t:tag>ietf:oam</t:tag> <t:tag>ietf:protocol</t:tag> <t:tag>ietf:sdo-defined-class</t:tag> </t:module> <t:module> <t:name>ietf-isis</t:name> <t:tag>ietf:network-element-class</t:tag> <t:tag>ietf:protocol</t:tag> <t:tag>ietf:sdo-defined-class</t:tag> <t:tag>ietf:routing</t:tag> </t:module> <t:module> <t:name>ietf-ssh-server</t:name> <t:tag>ietf:network-element-class</t:tag> <t:tag>ietf:protocol</t:tag> <t:tag>ietf:sdo-defined-class</t:tag> <t:tag>ietf:system-management</t:tag> </t:module> </t:module-tags> </ns0:data>
module ietf-module-tags-state { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-module-tags-state"; prefix tags-s; import ietf-yang-types { prefix yang; } import ietf-module-tags { prefix tags; } organization "IETF NetMod Working Group (NetMod)"; contact "WG Web: <https://datatracker.ietf.org/wg/netmod/> WG List: <mailto:netmod@ietf.org> Author: Christian Hopps <mailto:chopps@chopps.org> Author: Lou Berger <mailto:lberger@labn.net> Author: Dean Bogdanovic <mailto:ivandean@gmail.com>"; description "This module describes a mechanism associating tags with YANG modules. Tags may be IANA assigned or privately defined. This is a temporary non-NMDA module that is for use by implementations that don't yet support NMDA. Copyright (c) 2021 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 8819 (https://www.rfc-editor.org/info/rfc8819); see the RFC itself for full legal notices."; revision 2021-01-04 { description "Initial revision."; reference "RFC 8819: YANG Module Tags"; } container module-tags-state { config false; status deprecated; description "Contains the list of modules and their associated tags."; list module { key "name"; status deprecated; description "A list of modules and their associated tags."; leaf name { type yang:yang-identifier; mandatory true; status deprecated; description "The YANG module name."; } leaf-list tag { type tags:tag; status deprecated; description "Tags associated with the module. See the IANA 'YANG Module Tag Prefixes' registry for reserved prefixes and the IANA 'IETF YANG Module Tags' registry for IETF tags. The contents of this list is constructed using the following steps: 1) System tags (i.e., tags of added by the system) are added. 2) User-configured tags (i.e., tags added by configuration) are added. 3) Any tag that is equal to a masked-tag present in the corresponding ietf-module-tags:module-tags:module-tag leaf list for this module is removed."; } } } }