YANG Module TagsDeutsche Telekomchopps@chopps.orgLabN Consulting, L.L.C.lberger@labn.netivandean@gmail.com
This document defines two modules that support the association
of tags with modules. Tags may be included in a module or
associated with a module through the use of an augmentation to
YANG library that is defined in this document. The expectation
is for such tags to be used to help classify and organize
modules. Tags may be standardized and assigned during module
definition; assigned by implementations; or dynamically defined
and set by users. This document provides guidance to future
model writers and, as such, this document updates .
The use of tags for classification and organization is fairly
ubiquitous not only within IETF protocols, but in the internet
itself (see #hashtags). Tags can be usefully standardized, but
they can also serve as a non-standardized mechanism available
for users to define themselves. Our solution provides for both
cases allowing for the most flexibility. In particular, tags
may be standardized and assigned during module definition;
assigned by implementations; or dynamically defined and set by
users.
This document defines two modules that support the association
of tags with modules. The first module defines a grouping which
contains a list of tags as well as rpc statements for
changing the contents of the list. Tags are strings that are
structured to enable the differentiation of globally assigned
and non-assigned tags based on a fixed prefix. This document
also defines an initial set of globally assigned tags.
The second module defined in this document defines an
augmentation to YANG Library . It uses
(imports) the first module to provide a well known location for
tags.
provides guidelines for
authors of YANG data models. This section updates .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in .
Note that lower case versions of these key words are used in
section where guidance is provided to
future document authors.
Two tag list locations are defined. One location is within the
module itself, and the other location is in the yang library
under the modules entry. When a module includes tags, the same
tag list may also be presented in yang library.
To add tags to a module, the module definition includes a
tag list using the 'module-tags' grouping defined in this
document. This list MUST be added by a module author under
container named "module-tags" at the root of their module.
All tags have a prefix indicating who owns their definition. An
IANA registry is used to support standardizing tag prefixes.
Currently 2 prefixes are defined with all others reserved.
An IETF standard tag is a tag that has the prefix "ietf:". All
IETF standard tags are registered with IANA in a registry
defined later in this document.
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 standardized.
A local tag is any tag that has the prefix "local:". These tags
are defined by the local user/administrator, and will never be
standardized.
Any tag not starting with the prefix "ietf:", "vendor:" or
"local:" is reserved for future standardization.
Tags can become associated with a module in a number of ways.
Tags may be defined as associated at model design time, at
implementation time, or via user administrative control. As the
main consumer of tags are users, users may remove any tag, no
matter how the tag became associated with a module.
A module definition SHOULD indicate a set of standard tags to be
automatically added by the module implementer. These tags MUST
be standard tags (). This does
imply that new modules may also drive the addition of new
standard tags to the IANA registry.
An implementation MAY include additional tags associated with a
module. These tags may be standard or vendor specific tags.
RPC statements are defined in this document to enable
administrative addition and removal of tags from a module by a
user. An additional rpc is defined to reset a module's tag
list to the implementation default.
Each rpc identifies the module on which the tag operation is to
be performed. This identifications reuses the format of
the common-leafs (sub) grouping defined in . The grouping itself is refined in so that it is a stand-alone grouping.
Implementations that support the rpc statements defined in
this document MUST ensure that a specific module's tags leaf
list is consistent across any location from which the list is
available. Specifically this includes in the module itself, per
, or in yang library, per .
Implementations that do not support the defined rpc statements
(whether at all, or just for a particular rpc or module) MUST
respond with an YANG transport protocol-appropriate rpc layer
error when such a statement is received.
The "add-tags" rpc statement is defined to support the
addition of tags. This rpc statement takes as input module
identification information and the list of tags to add.
No restriction is placed on the tag values to add.
The "remove-tags" rpc statement is defined to remove tags.
This rpc statement takes as input module identification
information and the list of tags to remove.
No restriction is placed on the tag values to remove. This
means that tags associated based on a module's definition or
implementation MUST be removable.
The "reset-tags" rpc statement is defined to reset a module's
tag list to the implementation default, i.e. the tags that are
present based on module definition and any that are added
during implementation time. This rpc statement takes module
identification information as input, and provides the list of
list of tags that are present after the reset.
The tree associated with the tags module is:
Tags can also be associated with a module using
the yang library . When a server
supports both yang library and the augmentation defined below,
a user can add, remove and search for tags for any
module on the server regardless of whether the specific module
included tag support in its definition or not. If a server
supports ietf-module-tags and the yang library it SHOULD also
support the ietf-library-tags module.
The tree associated with the defined augmentation is:
It's worth noting that a different yang module classification
document exists . That
document is classifying modules in only a logical manner and
does not define tagging or any other mechanisms. It divides yang
modules into 2 categories (service or entity) and then into one
of 3 origins: standard, vendor or user. It does provide a good
way to discuss and identify modules in general. This document
defines standard tags to support style
classification.
This section updates . This document makes two
recommendations to model writers,
The correct way to use the module-tags grouping is to
include it in a standard location at the top level
of your module, specifically contained within a container
named "module-tags". This standard location allows searching
module using a well-known xpath wilcard path. For example:
The associated tree will look like:
A module should indicate, in the description of the
"module-tags" container, the set of tags that are
to be populated in the leaf-list for any implementation of
the module. This description should also include the
appropriate conformance statement or statements, using language, for each tag.
The module writer may use existing standard tags, or use new
tags defined in the model definition, as appropriate. New
tags should be assigned in the IANA registry defined below,
see below.
This registry allocates tag prefixes. All YANG module tags must
begin with one of the prefixes in this registry.
The allocation policy for this registry is Specification Required
.
The initial values for this registry are as follows.
This registry allocates prefixes that have the standard prefix
"ietf:". New values should be well considered and not achievable
through a combination of already existing standard tags.
The allocation policy for this registry is IETF Review
.
The initial values for this registry are as follows.
[Editor's note: some of these tags are expected to move to
if/when this
document becomes a WG document and that document is refactored
to use tags.]
TagDescriptionReferenceietf:area:artApplications and Real-Time Area module.[This document]ietf:area:genGeneral Area module.[This document]ietf:area:intInternet Area module.[This document]ietf:area:opsOperations and Management Area module.[This document]ietf:area:rtgRouting Area module.[This document]ietf:area:secSecurity Area module.[This document]ietf:area:tsvTransport Area module.[This document]ietf:entityA module for an entity (*).[This document]ietf:serviceA module for a service (*).[This document]ietf:hardwareA module for hardware.[This document]ietf:softwareA module for software.[This document]ietf:protocolA module representing a protocol.[This document]ietf:protocol:system-managementA module representing a system management protocol.[This document]ietf:protocol:network-serviceA module representing a network service protocol.[This document]ietf:protocol:routingA module representing a control plane routing protocol.[This document]ietf:protocol:signalingA module representing a control plane signaling protocol.[This document]ietf:protocol:oamA module representing a Operations, Administration, and Maintenance protocol.[This document]ietf:protocol:lmpA module representing a link management protocol.[This document]ietf:protocol:routing:igpAn IGP protocol module.[This document]ietf:protocol:routing:egpAn EGP protocol module.[This document]
(*) - see