module ietf-lifecycle-ext { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-lifecycle-ext"; prefix ietf-ext; organization "IETF NETMOD Working Group"; contact "WG Web: WG List: Editor: Rajesh Tarakkad Venkateswaran "; description "This module defines a lifecycle extension for recording migration metadata for deprecated YANG nodes. Copyright (c) 2026 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Revised BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself for full legal notices. 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 BCP 14 (RFC 2119) (RFC 8174) when, and only when, they appear in all capitals, as shown here."; revision 2026-01-26 { description "Fourth revision. - Corrected example implementation paths: Case 2 (added replacementContainerCase2/case2-replacement), Case 4 (replacementListCase4), Case 7 (config in path), Case 13 (removed choice from path per XPath semantics)."; reference "draft-rtv-netmod-yang-subtree-replacement-04"; } revision 2026-01-25 { description "Third revision. - Removed obsoletion-info extension per IETF 123 working group feedback. Replacement information is intended for deprecated nodes only and should be removed when nodes become obsolete. - Enhanced deprecation-info extension description with explicit MUST constraints, substatement restrictions, and cardinality rules per RFC 8407 best practices. - Removed Section 3.5 Handling Obsolete Nodes. - Updated all references to focus solely on deprecated nodes."; reference "draft-rtv-netmod-yang-subtree-replacement-03"; } revision 2026-01-15 { description "Second revision. Added CODE BEGINS markers for YANG validation. Restructured sections to separate normative module from examples."; reference "draft-rtv-netmod-yang-subtree-replacement-02"; } revision 2025-12-28 { description "Initial revision."; reference "draft-rtv-netmod-yang-subtree-replacement-01"; } extension deprecation-info { argument "tuple"; description "Attaches a lifecycle-entry tuple to a deprecated schema node. This extension MUST be used only with nodes that have 'status deprecated'. The parent node containing this extension MUST include a 'status deprecated' statement. This statement MAY be used as a substatement of container, list, leaf, leaf-list, choice, case, anydata, and anyxml statements. It MUST NOT be used as a substatement of rpc, action, or notification statements. Zero or more 'deprecation-info' statements per parent statement are allowed. Multiple instances represent different migration paths for the same deprecated node. The tuple format and semantics are defined in the body of the document that defines this extension."; } }