RFC 9595: YANG Schema Item iDentifier (YANG SID)
- M. Veillette, Ed.,
- A. Pelov, Ed.,
- I. Petrov, Ed.,
- C. Bormann,
- M. Richardson
Abstract
YANG Schema Item iDentifiers (YANG SIDs) are globally unique 63-bit unsigned integers used to identify YANG items. SIDs provide a more compact method for identifying those YANG items that can be used efficiently, notably in constrained environments (RFC 7228). This document defines the semantics, registration processes, and assignment processes for YANG SIDs for IETF-managed YANG modules. To enable the implementation of these processes, this document also defines a file format used to persist and publish assigned YANG SIDs.¶
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) 2024 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
Some of the items defined in YANG [RFC7950] require the use of a unique identifier. In both the Network Configuration Protocol (NETCONF) [RFC6241] and RESTCONF [RFC8040], these identifiers are implemented using names. To allow the implementation of data models defined in YANG in constrained devices [RFC7228] and constrained networks, a more compact method to identify YANG items is required. This compact identifier, called the YANG Schema Item iDentifier or YANG SID (or simply SID in this document and when the context is clear), is encoded using a 63-bit unsigned integer. The limitation to 63-bit unsigned integers allows SIDs to be manipulated more easily on platforms that might otherwise lack 64-bit unsigned arithmetic. The loss of a single bit of range is not significant, given the size of the remaining space.¶
The following items are identified using SIDs:¶
It is possible that some protocols will use only a subset of the assigned SIDs; for example, for protocols other than NETCONF [RFC6241] that provide access to YANG-modeled data, such as [CORE-COMI], the transport of YANG module SIDs might be unnecessary. Other protocols might need to be able to transport this information -- for example, protocols related to discovery such as the Constrained YANG Module Library [YANG-LIBRARY].¶
SIDs are globally unique integers. A registration system is used in order to guarantee their uniqueness. SIDs are registered in blocks called "SID ranges". Once they are considered "stable", SIDs are assigned permanently. Items introduced by a new revision of a YANG module are added to the list of SIDs already assigned. This is discussed in more detail in Section 2.¶
The assignment of SIDs to YANG items is usually automated as discussed in Appendix B, which also discusses some cases where manual interventions may be appropriate.¶
Section 3 provides more details about the registration processes for YANG modules and associated SIDs. To enable the implementation of these processes, Section 4 defines a standard file format used to store and publish SIDs.¶
IETF-managed YANG modules that need to allocate SIDs will use the IANA mechanisms specified in this document. See Section 6 for details. YANG modules created by other parties allocate SID ranges using the IANA allocation mechanisms via Mega-Ranges (see Section 6.3); within the Mega-Range allocation, those other parties are free to make up their own mechanism.¶
Among other uses, YANG SIDs are particularly useful for obtaining a compact encoding for YANG-CBOR [RFC9254]. At the time of writing, a tool for automated ".sid" file generation is available as part of the open-source project PYANG [PYANG].¶
1.1. Terminology and Notation
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 [BCP14] (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here.¶
The following terms are defined in [RFC7950]:¶
This specification also makes use of the following terminology:¶
- item:
- A schema node, an identity, a module, or a feature defined using the YANG modeling language.¶
- YANG Schema Item iDentifier (YANG SID or simply SID):
- Unsigned integer used to identify different YANG items (cf. Section 3.2 of [RFC9254]).¶
- YANG name:
- Text string used to identify different YANG items (cf. Section 3.3 of [RFC9254]).¶
2. Objectives
The overriding objective of the SID assignment and registration system is to
ensure global interoperabilit
Additional objectives include:¶
While IANA ultimately maintains the registries that govern SIDs for IETF-defined modules, various support tools (such as, at the time of writing, the YANG Catalog [yangcatalog]) need to provide the support to enable SID assignment and use for modules still in IETF development. Developers of open-source or proprietary YANG modules also need to be able to serve as such entities autonomously, possibly forming alliances independent of the IETF, while still fitting in the overall SID number space managed by IANA. Obviously, this process has a number of parallels to the management of IP addresses but is also very different.¶
2.1. Technical Objectives
As discussed in the Introduction, SIDs are intended as globally unique (unsigned) integers.¶
Specifically, this means that:¶
- Objective 1 (MUST):
-
Any 63-bit unsigned integer either (1) is unassigned as a SID or (2) immutably maps to EXACTLY one YANG name. Only the transition from unassigned to that immutable mapping is defined.¶
This enables a recipient of a data structure employing SIDs to translate them into the globally meaningful YANG names that the existing encodings of YANG data such as YANG-XML [RFC7950] and YANG-JSON [RFC7951] employ today.¶
The term "YANG name" is not defined outside this document, and YANG has a complex system of names and entities that can have those names. Instead of defining the term technically, this set of objectives uses it in such a way that the overall objectives of YANG SID can be achieved.¶
A desirable objective is that:¶
- Objective 2 (SHOULD):
-
Any YANG name in active use has one SID assigned.¶
This means that:¶
These objectives are unattainable in full, because YANG names are not necessarily born with a SID assignment and because entirely autonomous entities might decide to assign SIDs for the same YANG name without communicating ("like ships in the night"). Note that as long as this autonomy is maintained, any single observer will have the impression that Objective 2 is attained. Only when entities that have acted autonomously start communicating will a deviation be observed.¶
2.2. Module Evolution and Versioning
YANG modules evolve (see Section 11 of [RFC7950] and Section 4.27 of RFC 8407 [BCP216]). The technical objectives listed above are stated in terms that are independent of this evolution.¶
However, some modules are still in a very fluid state, and the assignment of permanent SIDs to the YANG names created in them is less desirable. This is true not only for new modules but also for emerging new revisions of existing stable modules.¶
- Objective 3 (MUST):
-
The SID management system is independent of any module versioning.¶
2.3. Solution Components and Derived Objectives
A registration system is used in order to guarantee the uniqueness of SIDs. To be able to provide some autonomy in allocation (and avoid information disclosure where it is not desirable), SIDs are registered in blocks called "SID ranges".¶
SIDs are assigned permanently.¶
Items introduced by a new revision of a YANG module are added to the list of SIDs already assigned.¶
2.4. Parties and Roles
In the YANG development process, we can discern a number of parties that are concerned with a YANG module:¶
- module controller:
-
The owner of the YANG module, i.e., the controller of the module's evolution.¶
- registration entity:
-
The controller of the module namespace, specifically also of the prefixes that are in common use. (This is not a required party.)¶
- module repository:
-
An entity that supplies modules to module users. This can be an "official" entity (e.g., IANA for IETF modules) or an "unofficial" entity (e.g., the YANG Catalog [yangcatalog]). Not all repositories are in a position to act as a registry, i.e., as a permanent record for the information they supply; these repositories need to recur to module owners as a stable source.¶
- module user:
-
An entity that uses a module, after obtaining it from the module controller or a module repository.¶
This set of parties needs to evolve to take on the additional roles that the SID assignment process requires:¶
- SID assigner:
-
An entity that assigns SIDs for a module. Objective 2 aims at having only one SID assigner for each module. SID assigners preferably stay the same over a module development process; however, this specification provides ".sid" files to ensure an organized handover.¶
- SID range registry:
-
An entity that supplies a SID assigner with SID ranges that it can use in assigning SIDs for a module. (In this specification, there is a structure with Mega-Ranges and individual SID ranges; this is not relevant here.)¶
- SID repository:
-
An entity that supplies SID assignments to SID users, usually in the form of a ".sid" file.¶
- SID user:
-
The module user that uses the SIDs provided by a SID assigner for a YANG module. SID users need to find SID assigners (or at least their SID assignments).¶
As the use of SIDs with YANG data models is introduced, the distribution of the SID roles to the existing parties for a YANG module will evolve.¶
The desirable end state of this evolution is shown in Table 1.¶
This grouping of roles and parties puts the module developer in a position where it can achieve the objectives laid out in this section (a "type-1", "SID-guiding" module controller). (While a third party might theoretically assign additional SIDs and conflict with Objective 2, there is very little reason to do so if ".sid" files are always provided by the module developer with the module.)¶
The rest of this section is concerned with the transition to this end state.¶
For existing modules, there is no ".sid" file. The entity that stands in as the SID assigner is not specified. This situation has the highest potential for conflict with Objective 2.¶
Similarly, for new module development, the module owner may not have heard about SIDs or may not be interested in assigning them (e.g., because of lack of software or procedures within their organization).¶
For these two cases (which we will collectively call "type-3", "SID-oblivious" module controller), module repositories can act as a mediator, giving SID users access to a SID assigner that is carefully chosen to be a likely choice by other module repositories as well, maximizing the likelihood of achieving Objective 2.¶
If a module controller has heard about SIDs but is not assigning them yet, it can designate a SID assigner instead. This can lead to a stable, unique set of SID assignments being provided indirectly by a ("type-2", "SID-aware") module developer. Entities offering designated SID assigner services could make these available in an easy-to-use way, e.g., via a web interface.¶
The entity acting as a SID assigner minimally needs to record the SID range it uses for the SID assignment. If the SID range registry employed can record the module name and revision and if the assignment processes (including the software used) are stable, the SID assigner can theoretically reconstruct its assignments, but this could invite implementation bugs.¶
SID assigners attending to a module in development (not yet stable) need to decide whether SIDs for a new revision are reassigned from scratch ("clean slate") or use existing assignments from a previous revision as a base, only assigning new SIDs for new names. Once a module is declared stable, its SID assignments SHOULD be declared stable as well (except that, for existing YANG modules, some review may be needed before this is done).¶
This specification does not further discuss how mediating entities such as designated SID assigners or SID repositories could operate; instead, it supplies objectives for their operation.¶
3. ".sid" File Lifecycle
YANG is a language designed to model data accessed using one of the compatible protocols (e.g., NETCONF [RFC6241], RESTCONF [RFC8040], and the CoAP Management Interface (CORECONF) [CORE-COMI]). A YANG module defines hierarchies of data, including configuration, state data, RPCs, actions, and notifications.¶
Many YANG modules are not created in the context of constrained applications. YANG modules can be implemented using NETCONF [RFC6241] or RESTCONF [RFC8040] without the need to assign SIDs.¶
As needed, authors of YANG modules can assign SIDs to their YANG modules. In order to do that, they should first obtain a SID range from a registry and use that range to assign or generate SIDs to items in their YANG module. The assignments can then be stored in a ".sid" file. For an example of how this could be achieved, please refer to Appendix C.¶
Items introduced by a new revision of a YANG module are added to the list of SIDs already assigned. When this is done during the development of a new protocol document, it may be necessary to make provisional assignments. They may get changed, revised, or withdrawn during the development of a new standard. These provisional assignments are marked with a status of "unstable", so that they can be removed and the SID number possibly reassigned for a different YANG schema name/path later in the development process. When the specification is advanced to a final document, the assignment is marked with a status of "stable". During a period of development starting from a published specification, two variants of the ".sid" file should be made available by the tooling involved in that development: (1) a "published" ".sid" file with the existing stable SID assignments only (which the development effort should keep stable), as well as (2) an "unpublished" ".sid" file that also contains the unstable SID assignments.¶
Registration of the ".sid" file associated with a YANG module is optional but
recommended; doing so will promote interoperabilit
Each time a YANG module, one or more of its imported modules, or one or more of its included submodules are updated, a new ".sid" file MAY be created if the new or updated items will need SIDs. All the SIDs present in a previous version of the ".sid" file that was in active use MUST be present in the new version as well. The creation of this new version of the ".sid" file SHOULD be performed using an automated tool.¶
If a new revision requires more SIDs than initially allocated, a new SID range
MUST be added to the 'assignment
For an example of this update process, see the activity diagram shown in Figure 5 in Appendix C.¶
4. ".sid" File Format
".sid" files are used to persist and publish SIDs assigned to the different YANG items in a specific YANG module.¶
The following tree diagram [BCP215] provides an overview of the data model:¶
The following YANG module defines the structure of ".sid" files. Encoding is
performed in JSON [STD90] using the rules defined in [RFC7951].
This module imports 'ietf
5. Security Considerations
This document defines a new type of identifier used to encode data that are modeled in YANG [RFC7950]. This new identifier maps semantic concepts to integers, and if the source of this mapping is not trusted, then new security risks might occur if an attacker can control the mapping.¶
At the time of writing, it is expected that the ".sid" files will be processed by a software developer, within a software development environment. Developers are advised to only import ".sid" files from authoritative sources. IANA is the authoritative source for IETF-managed YANG modules.¶
Conceptually, ".sid" files could be processed by less
".sid" files are identified with and can employ dereferenceable identifiers, i.e., identifiers that could lead implementations in certain situations to automatically perform remote access, the target of which is indicated at least partially by those identifiers. This can give an attacker information from and/or control over such accesses, which can have security and privacy implications. Please also see Sections 6 and 7 of [DEREF-ID] for further considerations that may be applicable.¶
6. IANA Considerations
6.1. YANG Namespace Registration
This document registers the following XML namespace URN in the "IETF XML Registry", following the format defined in [BCP81]:¶
6.2. ".sid" File Format Module Registration
This document registers one YANG module in the "YANG Module Names" registry [RFC6020]:¶
6.3. New IANA Registry: YANG-SID Mega-Ranges
The name of this registry is "YANG-SID Mega-Ranges". This registry is used to record the delegation of the management of a block of SIDs to a third party (such as Standards Development Organizations (SDOs) or registrars).¶
6.3.2. Allocation Policy
The IANA policy for future additions to this registry is "Expert Review" (Section 4.5 of RFC 8126 [BCP26]).¶
An organization requesting to manage a YANG-SID Range (and thus have an entry in the "YANG-SID Mega-Ranges" registry) must ensure the following capacities:¶
If a size of the allocation beyond 1,000,000 is desired, the organization must demonstrate the sustainability of the technical approach for utilizing this size of allocation and how it does not negatively impact the overall usability of the SID allocation mechanisms; such allocations are preferably placed in the space above 4,295,000,000 (64-bit space).¶
6.3.2.1. First Allocation
For a first allocation to be provided, the requesting organization must demonstrate a functional registry infrastructure.¶
6.3.2.2. Consecutive Allocations
On one or more subsequent allocation requests, the organization must demonstrate the exhaustion of the prior range. These conditions need to be asserted by the assigned expert(s).¶
If such a request for an additional allocation is made within 3 years of the last allocation, the experts need to discuss this request on the CORE Working Group mailing list and consensus needs to be obtained before allocating a new Mega-Range.¶
6.3.3. Initial Contents of the Registry
This registry contains the following initial entry:¶
6.4. New IANA Registry: IETF YANG-SID Ranges
The name of this registry is "IETF YANG-SID Ranges". This registry is used to record information related to the assignment of SID Ranges (e.g., entry point and size) to YANG modules identified by module name.¶
6.4.2. Allocation Policy
The first million SIDs assigned to IANA are subdivided as follows:¶
The size of the SID range allocated for a YANG module is recommended to be a multiple of 50 and to be at least 33% above the current number of YANG items. This headroom allows assignments within the same range of new YANG items introduced by subsequent revisions. The SID range size SHOULD NOT exceed 1,000; a larger size may be requested by the authors if this recommendation is considered insufficient. It is important to note that an additional SID range can be allocated to an existing YANG module if the initial range is exhausted; this then just leads to a slightly less efficient representation.¶
If a SID range is allocated for an existing RFC through the "Expert Review" policy (Section 4.5 of RFC 8126 [BCP26]), the Reference field for the given allocation should point to the RFC that the YANG module is defined in.¶
If a SID range is required before publishing the RFC due to implementations needing stable SID values, Early Allocation as defined in [BCP100] can be employed for the "RFC Required" range (Section 2 of RFC 7120 [BCP100]).¶
6.4.3. Publication of the ".sid" File
During an RFC's publication process, IANA contacts the designated expert team ("the team"), who are responsible for delivering a final ".sid" file for each module defined by the RFC. For a type-3 developer (SID-oblivious; see Section 2.4), the team creates a new ".sid" file from each YANG module; see below. For a type-2 (SID-aware) developer, the team first obtains the existing draft ".sid" file from a stable reference in the approved draft; for a type-1 (SID-guiding) developer, the team extracts the ".sid" file from the approved draft.¶
The team uses a tool to generate a final ".sid" file from each YANG module; the final ".sid" file has all SID assignments set to "stable" and the ".sid" file status set to "published". A published ".sid" file MUST NOT contain SID assignments with a status of "unstable".¶
For the cases other than type-3
In any case, the team checks the generated file, including checking for validity as a ".sid" file, for consistency with the SID range allocations, for full coverage of the YANG items in the YANG module, and for the best achievable consistency with the existing draft ".sid" file.¶
The designated experts then give the ".sid" file to IANA to publish in the "IETF YANG-SID Modules" registry (Section 6.5) along with the YANG module.¶
The ".sid" file MUST NOT be published as part of the RFC: the IANA registry is authoritative, and a link to it is to be inserted in the RFC. (Note that the present RFC is an exception to this rule, as the ".sid" file also serves as an example for exposition.) Internet-Drafts that need SIDs assigned to their new modules for use in the text of the document, e.g., for examples, need to alert the RFC Editor in the draft text that this is the case. Such RFCs cannot be produced by type-3 (SID-oblivious) developers: the SIDs used in the text need to be assigned in the existing draft ".sid" file, and the designated expert team needs to check that the assignments in the final ".sid" file are consistent with the usage in the RFC text or that the approved draft text is changed appropriately.¶
6.4.4. Initial Contents of the Registry
Initial entries in this registry are as follows:¶
For allocation, RFC publication of the YANG module is required as per the "RFC Required" policy defined in Section 4.7 of RFC 8126 [BCP26]. The YANG module must be registered in the "YANG Module Names" registry according to the rules specified in Section 14 of [RFC6020].¶
6.5. New IANA Registry: IETF YANG-SID Modules
The name of this registry is "IETF YANG-SID Modules". This registry is used to record the allocation of SIDs for individual YANG module items.¶
6.5.2. Allocation Policy
The allocation policy is "Expert Review" (Section 4.5 of RFC 8126 [BCP26]). The expert MUST ensure that the following conditions are met:¶
6.5.3. Recursive Allocation of YANG SIDs at Document Adoption
Due to the difficulty in changing SID values during IETF document processing,
it is expected that most documents will ask for SID range allocations using Early
Allocations [BCP100]. The details of the Early Allocation to be
requested, including the timeline envisioned, should be included
in any working group adoption call. Prior to working group adoption, an
Internet-Draft author can use the experimental SID range (as per
Section 6.4.2) for their SID allocations or
other values that do not create ambiguity with other SID uses (for example,
they can use ranges and SIDs registered in a non
After working group adoption, any modification of a ".sid" file is expected to be discussed on the mailing lists of the appropriate working groups. Specific attention should be paid to implementers' opinions after Working Group Last Call if a SID value is to change its meaning. In all cases, a ".sid" file and the SIDs associated with it are subject to change before the publication of an Internet-Draft as an RFC.¶
As the concept of SIDs is first used, many existing, previously published YANG modules will not have SID allocations. For an allocation to be useful, the included YANG modules may also need to have SID allocations made, in a process that will generally be analogous to that in Section 6.4.3 for the type-3 (SID-oblivious) case.¶
The expert reviewer who performs the (Early) Allocation analysis will need to go through the list of included YANG modules and perform SID allocations for those modules as well.¶
At the end of the IETF process, all the dependencies of a given module for which SIDs are assigned should also have SIDs assigned. Those dependencies' assignments should be permanent (not Early Allocation).¶
A previously SID-allocated YANG module that changes its references to include a YANG module for which there is no SID allocation needs to repeat the Early Allocation process.¶
[BCP100] defines a time limit for the validity of Early Allocations, after which they expire unless they are renewed. Section 3.3 of RFC 7120 [BCP100] also says:¶
Note that if a document is submitted for review to the IESG, and at the time of submission some Early Allocations are valid (not expired), these allocations must not be considered to have expired while the document is under IESG consideration or is awaiting publication in the RFC Editor's queue after approval by the IESG.¶
6.5.4. Initial Contents of the Registry
At the time of writing, this registry does not contain any entries.¶
6.6. Media Type and Content-Format Registration
6.6.1. Media Type application/yang-sid+json
This document adds the following media type to the "Media Types" registry.¶
- Type name:
-
application¶
- Subtype name:
-
yang-sid+json¶
- Required parameters:
-
N/A¶
- Optional parameters:
-
N/A¶
- Encoding considerations:
-
binary (UTF-8)¶
- Security considerations:
- Published specification:
-
RFC 9595¶
- Applications that use this media type:
-
Applications that need to obtain YANG SIDs to interchange YANG-modeled data in a concise and efficient representation.¶
- Fragment identifier considerations:
-
The syntax and semantics of fragment identifiers specified for "application
/yang -sid+json" is as specified for "application /json" . (At publication of this document, there is no fragment identification syntax defined for "application /json" .)¶ - Additional information:
-
- Person & email address to contact for further information:
-
CORE WG mailing list (core@ietf.org) or IETF Applications and Real-Time Area (art@ietf.org)¶
- Intended usage:
-
COMMON¶
- Restrictions on usage:
-
none¶
- Author/Change controller:
-
IETF¶
6.6.2. CoAP Content-Format
This document adds the following Content-Format to the "CoAP Content
7. References
7.1. Normative References
- [BCP100]
-
Best Current Practice 100, <https://
www >..rfc -editor .org /info /bcp100
At the time of writing, this BCP comprises the following:Cotton, M., "Early IANA Allocation of Standards Track Code Points", BCP 100, RFC 7120, DOI 10.17487 , , <https:///RFC7120 www >..rfc -editor .org /info /rfc7120 - [BCP14]
-
Best Current Practice 14, <https://
www >..rfc -editor .org /info /bcp14
At the time of writing, this BCP comprises the following: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 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 - [BCP81]
-
Best Current Practice 81, <https://
www >..rfc -editor .org /info /bcp81
At the time of writing, this BCP comprises the following:Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487 , , <https:///RFC3688 www >..rfc -editor .org /info /rfc3688 - [RFC6991]
-
Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10
.17487 , , <https:///RFC6991 www >..rfc -editor .org /info /rfc6991 - [RFC7950]
-
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10
.17487 , , <https:///RFC7950 www >..rfc -editor .org /info /rfc7950 - [RFC7951]
-
Lhotka, L., "JSON Encoding of Data Modeled with YANG", RFC 7951, DOI 10
.17487 , , <https:///RFC7951 www >..rfc -editor .org /info /rfc7951 - [RFC8040]
-
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", RFC 8040, DOI 10
.17487 , , <https:///RFC8040 www >..rfc -editor .org /info /rfc8040 - [RFC8791]
-
Bierman, A., Björklund, M., and K. Watsen, "YANG Data Structure Extensions", RFC 8791, DOI 10
.17487 , , <https:///RFC8791 www >..rfc -editor .org /info /rfc8791 - [STD68]
-
Internet Standard 68, <https://
www >..rfc -editor .org /info /std68
At the time of writing, this STD comprises the following:Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487 , , <https:///RFC5234 www >..rfc -editor .org /info /rfc5234 - [STD90]
-
Internet Standard 90, <https://
www >..rfc -editor .org /info /std90
At the time of writing, this STD comprises the following:Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487 , , <https:///RFC8259 www >..rfc -editor .org /info /rfc8259
7.2. Informative References
- [BCP215]
-
Best Current Practice 215, <https://
www >..rfc -editor .org /info /bcp215
At the time of writing, this BCP comprises the following:Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487 , , <https:///RFC8340 www >..rfc -editor .org /info /rfc8340 - [BCP216]
-
Best Current Practice 216, <https://
www >..rfc -editor .org /info /bcp216
At the time of writing, this BCP comprises the following: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 - [BCP26]
-
Best Current Practice 26, <https://
www >..rfc -editor .org /info /bcp26
At the time of writing, this BCP comprises the following: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 - [CORE-COMI]
-
Veillette, M., Ed., van der Stok, P., Ed., Pelov, A., Ed., Bierman, A., and C. Bormann, Ed., "CoAP Management Interface (CORECONF)", Work in Progress, Internet-Draft, draft
-ietf , , <https://-core -comi -18 datatracker >..ietf .org /doc /html /draft -ietf -core -comi -18 - [DEREF-ID]
-
Bormann, C. and C. Amsüss, "The 'dereferenceabl
e identifier' pattern" , Work in Progress, Internet-Draft, draft-bormann , , <https://-t2trg -deref -id -03 datatracker >..ietf .org /doc /html /draft -bormann -t2trg -deref -id -03 - [PYANG]
-
Björklund, M., "An extensible YANG validator and converter in python", commit fc9a965, , <https://
github >..com /mbj4668 /pyang - [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 - [RFC7224]
-
Bjorklund, M., "IANA Interface Type YANG Module", RFC 7224, DOI 10
.17487 , , <https:///RFC7224 www >..rfc -editor .org /info /rfc7224 - [RFC7228]
-
Bormann, C., Ersue, M., and A. Keranen, "Terminology for Constrained
-Node Networks" , RFC 7228, DOI 10.17487 , , <https:///RFC7228 www >..rfc -editor .org /info /rfc7228 - [RFC7317]
-
Bierman, A. and M. Bjorklund, "A YANG Data Model for System Management", RFC 7317, DOI 10
.17487 , , <https:///RFC7317 www >..rfc -editor .org /info /rfc7317 - [RFC8343]
-
Bjorklund, M., "A YANG Data Model for Interface Management", RFC 8343, DOI 10
.17487 , , <https:///RFC8343 www >..rfc -editor .org /info /rfc8343 - [RFC8344]
-
Bjorklund, M., "A YANG Data Model for IP Management", RFC 8344, DOI 10
.17487 , , <https:///RFC8344 www >..rfc -editor .org /info /rfc8344 - [RFC8792]
-
Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, "Handling Long Lines in Content of Internet-Drafts and RFCs", RFC 8792, DOI 10
.17487 , , <https:///RFC8792 www >..rfc -editor .org /info /rfc8792 - [RFC9195]
-
Lengyel, B. and B. Claise, "A File Format for YANG Instance Data", RFC 9195, DOI 10
.17487 , , <https:///RFC9195 www >..rfc -editor .org /info /rfc9195 - [RFC9254]
-
Veillette, M., Ed., Petrov, I., Ed., Pelov, A., Bormann, C., and M. Richardson, "Encoding of Data Modeled with YANG in the Concise Binary Object Representation (CBOR)", RFC 9254, DOI 10
.17487 , , <https:///RFC9254 www >..rfc -editor .org /info /rfc9254 - [STD91]
-
Internet Standard 91, <https://
www >..rfc -editor .org /info /std91
At the time of writing, this STD comprises the following:Bierman, A. and M. Bjorklund, "Network Configuration Access Control Model", STD 91, RFC 8341, DOI 10.17487 , , <https:///RFC8341 www >..rfc -editor .org /info /rfc8341 - [YANG-LIBRARY]
-
Veillette, M., Ed. and I. Petrov, Ed., "Constrained YANG Module Library", Work in Progress, Internet-Draft, draft
-ietf , , <https://-core -yang -library -03 datatracker >..ietf .org /doc /html /draft -ietf -core -yang -library -03 - [yangcatalog]
-
"YANG Catalog", <https://
yangcatalog >..org
Appendix A. ".sid" File Example
The following ".sid" file
For purposes of exposition, per [RFC8792], line breaks have been introduced below in some JSON strings that represent overly long identifiers.¶
Appendix B. SID Autogeneration
The assignment of SIDs to YANG items SHOULD be automated. The recommended process to assign SIDs is as follows:¶
When updating a YANG module that is in active use, the existing SID assignments are maintained. (In contrast, when evolving an early version of an Internet-Draft that has not yet been adopted by a community of developers, SID assignments are often better done from scratch after a revision.) If the name of a schema node changes but the data remain structurally and semantically similar to what was previously available under an old name, the SID that was used for the old name MAY continue to be used for the new name. If the meaning of an item changes, a new SID MAY be assigned to it; this is particularly useful for allowing the new SID to identify the new structure or semantics of the item. If the YANG data type changes in a new revision of a published module such that the resulting CBOR encoding is changed, then implementations will be aided significantly if a new SID is assigned. Note that these decisions are generally at the discretion of the YANG module author, who should decide if the benefits of a manual intervention are worth the deviation from automatic assignment.¶
In the case of an update to an existing ".sid" file, an additional step is needed
that increments the ".sid" file version number. If there was no version number
in the previous version of the ".sid" file, 0 is assumed to be the version number
of the old version of the ".sid" file and the version number is 1 for the new
".sid" file. Apart from that, changes to ".sid" files can also be automated using
the same method as that described above, except that in step #3, previous SID assignments are kept, only previously unassigned YANG items are processed, and these are assigned previously unassigned SIDs. Already
Note that ".sid" file versions are specific to a YANG module revision. For each new YANG module or each new revision of an existing YANG module, the version number of the initial ".sid" file either (1) should be 0 or (2) should not be present.¶
Note also that RPC or action "input" and "output" YANG items MUST always be assigned SIDs even if they don't contain further YANG items. The reason for this requirement is that other modules can augment the given module and those SIDs might be necessary.¶
Appendix C. ".sid" File Lifecycle
Before assigning SIDs to their YANG modules, YANG module authors must acquire a SID range from a registry of YANG-SID Ranges. If the YANG module is part of an IETF Internet-Draft or RFC, the SID range needs to be acquired from the "IETF YANG-SID Ranges" registry as defined in Section 6.4. For the other YANG modules, the authors can choose to acquire a SID range from any registry of YANG-SID Ranges.¶
Once the SID range is acquired, owners can use it to generate one or more ".sid" files for their YANG module or modules. It is recommended to leave some unallocated SIDs following the allocated range in each ".sid" file in order to allow better evolution of the owners' YANG modules in the future. Generation of ".sid" files should be performed using an automated tool. Note that ".sid" files can only be generated for YANG modules and not for submodules.¶
C.1. ".sid" File Creation
The following activity diagram summarizes the creation of a YANG module and its associated ".sid" file.¶
C.2. ".sid" File Update
The following activity diagram summarizes the update of a YANG module and its associated ".sid" file.¶
Appendix D. Keeping a ".sid" File in a YANG Instance Data File
[RFC9195] defines a format for "YANG instance data". This essentially leads to an encapsulation of the instance data within some metadata envelope.¶
If a ".sid" file needs to be stored in a YANG instance data file, this
can be achieved by embedding the value of the ".sid" file as the value of the
content-data member in the following template and copying over the
second-level members as indicated with the angle brackets:¶
Acknowledgments
The authors would like to thank Andy Bierman, Abhinav Somaraju, Peter van der Stok, Laurent Toutain, and Randy Turner for their help during the development of this document and their useful comments during the review process. Special thanks go to the IESG members who supplied very useful comments during the IESG processing phase, in particular to Benjamin Kaduk and Rob Wilton, and to Francesca Palombini as responsible AD.¶
Contributors
Suite #160