Network Working Group                                     R. Wilton, Ed.
Internet-Draft                                            R. Rahman, Ed.
Updates: 7950,8407,8525 (if approved)                Cisco Systems, Inc.
Intended status: Standards Track                         B. Lengyel, Ed.
Expires: January 11, 2021                                       Ericsson
                                                               J. Clarke
                                                     Cisco Systems, Inc.
                                                               J. Sterne
                                                                   Nokia
                                                               B. Claise
                                                     Cisco Systems, Inc.
                                                              K. D'Souza
                                                                    AT&T
                                                           July 10, 2020


                 Updated YANG Module Revision Handling
              draft-ietf-netmod-yang-module-versioning-01

Abstract

   This document specifies a new YANG module update procedure that can
   document when non-backwards-compatible changes have occurred during
   the evolution of a YANG module.  It extends the YANG import statement
   with an earliest revision filter to better represent inter-module
   dependencies.  It provides help and guidelines for managing the
   lifecycle of YANG modules and individual schema nodes.  It provides a
   mechanism, via the revision-label YANG extension, to specify a
   revision identifier for YANG modules.  This document updates RFC
   7950, RFC 8407 and RFC 8525.

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 January 11, 2021.




Wilton, et al.          Expires January 11, 2021                [Page 1]


Internet-Draft    Updated YANG Module Revision Handling        July 2020


Copyright Notice

   Copyright (c) 2020 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://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Updates to YANG RFCs  . . . . . . . . . . . . . . . . . .   4
   2.  Terminology and Conventions . . . . . . . . . . . . . . . . .   4
   3.  Refinements to YANG revision handling . . . . . . . . . . . .   5
     3.1.  Updating a YANG module with a new revision  . . . . . . .   5
       3.1.1.  Backwards-compatible changes  . . . . . . . . . . . .   6
       3.1.2.  Non-backwards-compatible changes  . . . . . . . . . .   6
     3.2.  nbc-changes revision extension statement  . . . . . . . .   7
     3.3.  Revision label  . . . . . . . . . . . . . . . . . . . . .   7
       3.3.1.  Revision label scheme extension statement . . . . . .   8
     3.4.  Examples for updating the YANG module revision history  .   8
   4.  Import by derived revision  . . . . . . . . . . . . . . . . .  11
     4.1.  Module import examples  . . . . . . . . . . . . . . . . .  12
   5.  Updates to ietf-yang-library  . . . . . . . . . . . . . . . .  14
     5.1.  Resolving ambiguous module imports  . . . . . . . . . . .  14
     5.2.  YANG library versioning augmentations . . . . . . . . . .  15
       5.2.1.  Advertising revision-label  . . . . . . . . . . . . .  15
       5.2.2.  Reporting how deprecated and obsolete nodes are
               handled . . . . . . . . . . . . . . . . . . . . . . .  15
   6.  Versioning of YANG instance data  . . . . . . . . . . . . . .  16
   7.  Guidelines for using the YANG module update rules . . . . . .  16
     7.1.  Guidelines for YANG module authors  . . . . . . . . . . .  16
       7.1.1.  Making non-backwards-compatible changes to a YANG
               module  . . . . . . . . . . . . . . . . . . . . . . .  17
     7.2.  Versioning Considerations for Clients . . . . . . . . . .  18
   8.  Module Versioning Extension YANG Modules  . . . . . . . . . .  18
   9.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  26
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  27
   11. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  27
     11.1.  YANG Module Registrations  . . . . . . . . . . . . . . .  27
     11.2.  Instructions . . . . . . . . . . . . . . . . . . . . . .  28



Wilton, et al.          Expires January 11, 2021                [Page 2]


Internet-Draft    Updated YANG Module Revision Handling        July 2020


   12. References  . . . . . . . . . . . . . . . . . . . . . . . . .  28
     12.1.  Normative References . . . . . . . . . . . . . . . . . .  28
     12.2.  Informative References . . . . . . . . . . . . . . . . .  29
   Appendix A.  Examples of changes that are NBC . . . . . . . . . .  29
   Appendix B.  Examples of applying the NBC change guidelines . . .  30
     B.1.  Removing a data node  . . . . . . . . . . . . . . . . . .  30
     B.2.  Changing the type of a leaf node  . . . . . . . . . . . .  31
     B.3.  Reducing the range of a leaf node . . . . . . . . . . . .  32
     B.4.  Changing the key of a list  . . . . . . . . . . . . . . .  32
     B.5.  Renaming a node . . . . . . . . . . . . . . . . . . . . .  33
     B.6.  Changing a default value  . . . . . . . . . . . . . . . .  34
   Appendix C.  Changes between revisions  . . . . . . . . . . . . .  34
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  34

1.  Introduction

   This document defines a solution to the YANG module lifecycle
   problems described in [I-D.ietf-netmod-yang-versioning-reqs].
   Complementary documents provide a complete solution to the YANG
   versioning requirements, with the overall relationship of the
   solution drafts described in [