YANG Revision Statement Purpose and Function
Short answer
A The YANG 'revision' statement documents the module version and date, enabling backward compatibility tracking in network automation.
Question
Key Takeaways
The YANG 'revision' statement is used to document the module version and date for backward compatibility. Option A is correct because it accurately describes this versioning function, distinguishing it from node deprecation or module import mechanisms.
Expert Analysis
The YANG 'revision' statement serves as a critical mechanism for versioning and tracking changes within network configuration models, ensuring that automation scripts and management systems can handle backward compatibility. The correct answer is A because the revision statement explicitly records the module's version number and the date of its publication, which is foundational for managing schema evolution in network automation.
Versioning Mechanism Versus Deprecation Logic
The boundary between versioning metadata and node lifecycle management is often blurred by those new to YANG, but the distinction is strict in RFC 7950. The 'revision' statement does not alter the structure or validity of existing nodes; instead, it creates a new version identifier for the entire module. In this question, Option A correctly identifies that the statement documents the module version and date. This acts as a header-level attribute, similar to a software release note, informing the NETCONF client or RESTCONF server about the specific iteration of the schema being used. By contrast, deprecating nodes (Option B) is handled by the 'deprecation' statement applied to individual data nodes, such as leaves or containers. Confusing these two leads to incorrect assumptions about how schema drift is managed: one tracks the package version, while the other marks specific elements for removal within a version. The revision statement itself never removes or hides data; it simply declares that a subsequent revision exists, allowing clients to request the latest compatible version.
Decisive Condition for Schema Evolution
The decisive condition in this scenario is the requirement for backward compatibility in automated network management. When a network automation solution, such as one using Python with ncclient or Ansible, interacts with a device running IOS XE or a controller-based platform, it must verify that the YANG model it expects matches the one provided by the device. The 'revision' statement provides the exact timestamp and version string needed for this verification. If an automation script relies on a feature introduced in revision 2023-10-01, it must check the revision date returned by the device. Without this explicit documentation of version and date, the automation tool cannot determine if the schema has changed in a way that breaks its logic. Therefore, the presence of the revision statement is the primary indicator for any system attempting to negotiate the correct model version during capability exchange.
Cost of Incorrect Options
Selecting Option B, "Deprecates nodes," is incorrect because deprecation is a granular action applied to specific elements using the 'deprecation' keyword, not a module-level statement. Choosing Option C, "Imports modules," confuses the 'revision' statement with the 'import' or 'include' statements, which are responsible for bringing external definitions into the current namespace. Similarly, Option D, "Exports modules," misinterprets the statement as a visibility control mechanism, whereas YANG does not use 'export' in this manner for module linkage. Each wrong option represents a fundamental misunderstanding of YANG syntax: confusing version tracking with element lifecycle, module inclusion, or visibility rules. These errors would lead to malformed YANG files or failed automation deployments where the client cannot resolve dependencies or validate the schema structure.
Vendor Behavior and Framework Rules
The documented rule in RFC 7950 specifies that the 'revision' statement is optional but highly recommended for every module. It must contain a date-string and optionally a revision-identifier. Cisco platforms, including IOS XE and DNA Center, rely heavily on this standard to manage API versions. For example, when configuring model-driven telemetry or using RESTCONF, the device advertises the revision dates of supported modules in its capabilities. Automation frameworks like Ansible or custom Python scripts parse these revisions to ensure they are sending valid JSON or XML payloads. Ignoring the revision statement risks deploying configurations against outdated schemas, leading to operational failures. Thus, understanding that 'revision' is strictly for version and date documentation is essential for anyone constructing network automation solutions involving YANG models.
Exam Strategy
When analyzing YANG statements, always distinguish between module-level metadata and node-level directives. Identify whether the question asks about versioning (revision), inclusion (import/include), or element status (deprecation). Focus on the scope: if it affects the whole module's identity, it is likely revision-related; if it affects specific data nodes, look for deprecation or mandatory keywords.
Related Analysis
Practice All 300-435 Questions
Access 150 questions with complete answers and detailed explanations.
View Full 300-435 Practice Test →