|
| 1 | +module ietf-yang-revisions { |
| 2 | + yang-version 1.1; |
| 3 | + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-revisions"; |
| 4 | + prefix rev; |
| 5 | + |
| 6 | + import ietf-yang-types { |
| 7 | + prefix yang; |
| 8 | + reference |
| 9 | + "RFC YYYY-draft-ietf-netmod-rfc6991-bis: Common YANG Data Types"; |
| 10 | + } |
| 11 | + |
| 12 | + organization |
| 13 | + "IETF NETMOD (Network Modeling) Working Group"; |
| 14 | + contact |
| 15 | + "WG Web: <https://datatracker.ietf.org/wg/netmod/> |
| 16 | + WG List: <mailto:[email protected]> |
| 17 | +
|
| 18 | + Author: Joe Clarke |
| 19 | + |
| 20 | +
|
| 21 | + Author: Reshad Rahman |
| 22 | + |
| 23 | +
|
| 24 | + Author: Robert Wilton |
| 25 | + |
| 26 | +
|
| 27 | + Author: Balazs Lengyel |
| 28 | + |
| 29 | +
|
| 30 | + Author: Jason Sterne |
| 31 | + |
| 32 | + description |
| 33 | + "This YANG 1.1 module contains definitions and extensions to |
| 34 | + support updated YANG revision handling. |
| 35 | +
|
| 36 | + Copyright (c) 2024 IETF Trust and the persons identified as |
| 37 | + authors of the code. All rights reserved. |
| 38 | +
|
| 39 | + Redistribution and use in source and binary forms, with or |
| 40 | + without modification, is permitted pursuant to, and subject to |
| 41 | + the license terms contained in, the Revised BSD License set |
| 42 | + forth in Section 4.c of the IETF Trust's Legal Provisions |
| 43 | + Relating to IETF Documents |
| 44 | + (https://trustee.ietf.org/license-info). |
| 45 | +
|
| 46 | + This version of this YANG module is part of RFC XXXX; see |
| 47 | + the RFC itself for full legal notices. |
| 48 | +
|
| 49 | + The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL |
| 50 | + NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', |
| 51 | + 'MAY', and 'OPTIONAL' in this document are to be interpreted as |
| 52 | + described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, |
| 53 | + they appear in all capitals, as shown here."; |
| 54 | + // RFC Ed.: update the date below with the date of RFC publication |
| 55 | + // and remove this note. |
| 56 | + // RFC Ed.: replace XXXX (inc above) with actual RFC number and |
| 57 | + // remove this note. |
| 58 | + // RFC Ed.: replace YYYY-draft-ietf-netmod-rfc6991-bis (inc above) with actual RFC number and |
| 59 | + // remove this note. |
| 60 | + |
| 61 | + revision 2025-01-28 { |
| 62 | + description |
| 63 | + "Initial version."; |
| 64 | + reference |
| 65 | + "RFC XXXX: Updated YANG Module Revision Handling"; |
| 66 | + } |
| 67 | + |
| 68 | + typedef revision-date { |
| 69 | + type yang:date-no-zone; |
| 70 | + description |
| 71 | + "A date associated with a YANG revision. |
| 72 | +
|
| 73 | + Matches dates formatted as YYYY-MM-DD."; |
| 74 | + reference |
| 75 | + "RFC 7950: The YANG 1.1 Data Modeling Language"; |
| 76 | + } |
| 77 | + |
| 78 | + extension non-backwards-compatible { |
| 79 | + description |
| 80 | + "This statement is used to indicate YANG module revisions that |
| 81 | + contain non-backwards-compatible changes. |
| 82 | +
|
| 83 | + The statement MUST only be a substatement of the 'revision' |
| 84 | + statement. Zero or one 'non-backwards-compatible' statements |
| 85 | + per parent statement is allowed. No substatements for this |
| 86 | + extension have been standardized. |
| 87 | +
|
| 88 | + If a revision of a YANG module contains changes, relative to |
| 89 | + the preceding revision in the revision history, that do not |
| 90 | + conform to the backwards-compatible module update rules |
| 91 | + defined in RFC-XXXX, then the 'non-backwards-compatible' |
| 92 | + statement MUST be added as a substatement to the revision |
| 93 | + statement. |
| 94 | +
|
| 95 | + Conversely, if a revision does not contain a |
| 96 | + 'non-backwards-compatible' statement then all changes, |
| 97 | + relative to the preceding revision in the revision history, |
| 98 | + MUST be backwards-compatible. |
| 99 | +
|
| 100 | + A new module revision that only contains changes that are |
| 101 | + backwards-compatible SHOULD NOT include the |
| 102 | + 'non-backwards-compatible' statement. An example of when an |
| 103 | + author might add the 'non-backwards-compatible' statement is |
| 104 | + if they believe a change could negatively impact clients even |
| 105 | + though the backwards compatibility rules defined in RFC-XXXX |
| 106 | + classify it as a backwards-compatible change. |
| 107 | +
|
| 108 | + Add, removing, or changing a 'non-backwards-compatible' |
| 109 | + statement is a backwards-compatible version change."; |
| 110 | + reference |
| 111 | + "XXXX: Updated YANG Module Revision Handling; |
| 112 | + Section 3.2, |
| 113 | + non-backwards-compatible extension statement"; |
| 114 | + } |
| 115 | + |
| 116 | + extension recommended-min-date { |
| 117 | + argument revision-date; |
| 118 | + description |
| 119 | + "Recommends the revision of the module that may be imported to |
| 120 | + one whose revision date matches or is after the specified |
| 121 | + revision-date. |
| 122 | +
|
| 123 | + The argument value MUST conform to the 'revision-date' defined |
| 124 | + type. |
| 125 | +
|
| 126 | + The statement MUST only be a substatement of the import |
| 127 | + statement. Zero, one or more 'recommended-min-date' |
| 128 | + statements per parent statement are allowed. No substatements |
| 129 | + for this extension have been standardized. |
| 130 | +
|
| 131 | + Zero or one 'recommended-min-date' extension statement is |
| 132 | + allowed for each parent 'import' statement. |
| 133 | +
|
| 134 | + A particular revision of an imported module adheres to an |
| 135 | + import's 'recommended-min-date' extension statement if the |
| 136 | + imported module's revision date is equal to or later than |
| 137 | + the revision date argument of the 'recommended-min-date' |
| 138 | + extension statement in the importing module. |
| 139 | +
|
| 140 | + Adding, removing or updating a 'recommended-min-date' |
| 141 | + statement to an import is a backwards-compatible change."; |
| 142 | + reference |
| 143 | + "XXXX: Updated YANG Module Revision Handling; Section 4, |
| 144 | + Guidance for revision selection on imports"; |
| 145 | + } |
| 146 | +} |
0 commit comments