Internet-Draft YANG module file name convention July 2024
Andersson Expires 3 January 2025 [Page]
Workgroup:
NETMOD Working Group
Internet-Draft:
draft-andersson-netmod-yang-module-filename-00
Updates:
6020, 7950, 8407 (if approved)
Published:
Intended Status:
Standards Track
Expires:
Author:
P. Andersson
Cisco Systems

YANG module file name convention

Abstract

This document presents YANG module file name convention. The convention extends the current YANG module file name using revision‑date, with the YANG semantic version extension. The YANG semantic version extension allows for an informative version to be associated with a particular YANG module revision.

Editorial note (To be removed by the RFC Editor)

In the YANG module versionining work it was previously defined in [I-D.ietf-netmod-yang-semver] that file names could use the revision label (YANG Semantic version extension) instead of the revision date, which is standardized in [RFC7950]. This work was removed in an attempt to progress the module versioning work, but the YANG versioning design team was tasked to address it by the NETMOD WG. This draft extends YANG module file names conformity with the possibility to use revision label instead of revision date.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 3 January 2025.

Table of Contents

1. Introduction

This document defines the YANG module file convention. It extends the current convention defined in [RFC7950], which uses revision-date, with the YANG semantic version extension defined in [I-D.ietf-netmod-yang-semver].

1.1. Motivation

The motivation for using YANG semantic version instead of revision date is that it carries information to the user. A revision date only tells the user that it has been updated, while, for instance, a YANG Semver version can tell the user about the modules compatibility level at a glance. Having this information available as early as possible, i.e. in the module file name, makes it possible to quickly identify the module revision; compared to searching in the file contents and checking the revisions. Having the YANG semantic version visible in the file name will make it easier to handle large sets of YANG modules.

The YANG module file name schema described in this draft is already deployed in the industry. Now is the time to standardize before several proprietary solutions emerges.

It is relatively easy to update tooling to handle YANG semantic version in the YANG module file name according to this draft. However, it is recognized that the migration of all tooling within the industry will take time.

2. Module file names

This section updates Section 5.2 of [RFC7950], Section 5.2 of [RFC6020], and Section 3.2 of [RFC8407].

If a revision has an associated YANG semantic version (ys:version) then it is RECOMMENDED that the YANG semantic version is used instead of the revision date in the file name of a YANG file, where it takes the form:


    module-or-submodule-name [['@' revision-date]['#' ys:version]]
        ( '.yang' / '.yin' )

E.g., acme-router-module@2024-05-15.yang or acme-router-module#2.0.3.yang.

YANG module (or submodule) files MAY be identified using either revision-date or YANG semantic version (ys:version). Typically, only one file name SHOULD exist for the same module (or submodule) revision. Two file names, one with the revision date and another with the YANG semantic version, MAY exist for the same module (or submodule) revision, e.g., when migrating from one scheme to the other.

2.1. Coexistence with YANG Semver

As can be seen above, all valid identifiers for YANG semantic version are valid in the filename as well. Section 4.3 of [I-D.ietf-netmod-yang-semver]

The following example is a valid YANG module file name


    example-module#2.3.1_non_compatible+build2237refM443ss.yang

One consequence of this is that there might exist two child modules of version 2.0.0 with the same X.Y.Z digits (2.0.1) but different version labels:


    2.0.1-draft-superman-super-stuff-03

    2.0.1-draft-batman-cool-addition-07   (a competing draft)

3. Security Considerations

There are no security considerations for this draft.

4. References

4.1. Normative References

[I-D.ietf-netmod-rfc8407bis]
Bierman, A., Boucadair, M., and Q. Wu, "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", Work in Progress, Internet-Draft, draft-ietf-netmod-rfc8407bis-12, , <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-rfc8407bis-12>.
[I-D.ietf-netmod-yang-module-versioning]
Wilton, R., Rahman, R., Lengyel, B., Clarke, J., and J. Sterne, "Updated YANG Module Revision Handling", Work in Progress, Internet-Draft, draft-ietf-netmod-yang-module-versioning-12, , <https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-module-versioning-12>.
[I-D.ietf-netmod-yang-semver]
Clarke, J., Wilton, R., Rahman, R., Lengyel, B., Sterne, J., and B. Claise, "YANG Semantic Versioning", Work in Progress, Internet-Draft, draft-ietf-netmod-yang-semver-17, , <https://datatracker.ietf.org/api/v1/doc/document/draft-ietf-netmod-yang-semver/>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC6020]
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
[RFC7950]
Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", RFC 7950, DOI 10.17487/RFC7950, , <https://www.rfc-editor.org/info/rfc7950>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8407]
Bierman, A., "Guidelines for Authors and Reviewers of Documents Containing YANG Data Models", BCP 216, RFC 8407, DOI 10.17487/RFC8407, , <https://www.rfc-editor.org/info/rfc8407>.

4.2. Informative References

Author's Address

Per Andersson
Cisco Systems