| Internet-Draft | NAIM | July 2026 |
| Feng | Expires 19 January 2027 | [Page] |
This document defines the NAIM (Natural AI Interface Modeling) framework, a canonical semantic intermediate representation between natural language descriptions and YANG data models (RFC 7950).¶
NAIM addresses a recognized gap in the YANG authoring and network management workflow: direct conversion from natural language to YANG is error-prone because essential modeling semantics -- including configuration versus state distinction, list key identification, constraint expressions, operational preconditions, and cross-module relationships -- are routinely absent or ambiguous in natural language input. NAIM makes these semantics explicit, structurally consistent, and machine-verifiable.¶
This document defines: the NAIM Document format (Canonical JSON and derived Markdown View); the LLM Context View for AI prompt context distribution; the three-layer architecture (Specification, Skill, Tool); Skills A-D for conversational modeling, summarization, YANG generation, and reverse engineering; and the Validation-Reflection-Retry mechanism for AI output quality control.¶
The NAIM Document format is designed to serve two roles: as the intermediate representation for design-time YANG authoring, and as the runtime semantic authority against which AI-generated operation intents are validated. The runtime validation usage is specified in [NAIM-OP]; this document defines the format, derived views, and design-time workflows.¶
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 19 January 2027.¶
Copyright (c) 2026 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The YANG data modeling language [RFC7950] is the foundation of model-driven network management and is widely deployed in NETCONF [RFC6241], RESTCONF [RFC8040], and related systems. Despite its importance, authoring high-quality YANG modules requires simultaneous fluency in network protocol behavior, data modeling methodology, and YANG syntax. This combination makes YANG authoring a specialized skill that limits the pace at which network management models can be developed and maintained.¶
Recent progress in large language model (LLM) technology has created an opportunity to partially automate and assist the YANG authoring process. However, this opportunity cannot be fully realized through direct conversion from natural language to YANG. The gap between natural language and YANG is not primarily syntactic; it is semantic. Natural language descriptions routinely omit, conflate, or leave ambiguous precisely the distinctions that YANG modeling requires.¶
Direct conversion from natural language to YANG exhibits three recurring failure modes.¶
Semantic ambiguity. Natural language descriptions commonly omit distinctions that are essential to correct YANG modeling. Whether a field represents configuration or operational state, whether an entity is a list keyed by an identifier or a singleton container, and whether two fields are siblings or parent and child are all questions that a natural language description frequently leaves unanswered. Without an explicit clarification step, an automated tool must guess -- and guesses in structural modeling propagate into downstream protocol behavior.¶
Implicit constraint loss. Operational constraints, preconditions for node creation or deletion, cross-node dependencies, and side effects of configuration changes are often treated as common knowledge in human discourse and are therefore omitted from natural language descriptions. YANG models that omit these constraints are structurally valid but operationally incorrect.¶
Structural inference errors. Hierarchy relationships, augmentation targets, leafref paths, grouping reuse, and cross-module import requirements all require precise structural reasoning. Without a structured intermediate step, automated tools generate models that syntactically resemble correct YANG but contain incorrect structural relationships that are difficult to detect without domain expertise.¶
A structured semantic intermediate representation addresses these failure modes by externalizing implicit knowledge into a machine-verifiable form before YANG generation is attempted. Rather than asking an automated system to traverse in one step from natural language to YANG, the workflow is decomposed into two controlled stages:¶
Natural language input is converted into a structured, semantically explicit NAIM Document through a clarification and elicitation process. At this stage, missing or ambiguous information is identified and resolved.¶
The completed NAIM Document is transformed into a YANG module by deterministic tooling. Because the input to this stage is already structurally explicit and constraint-complete, the transformation can be made reliable.¶
The NAIM Document format defined in this document is the artifact that bridges these two stages. It is designed to be simultaneously suitable for automated processing, human review, and version control.¶
It is important to note that NAIM is not a JSON encoding of YANG. A NAIM Document can be transformed into YANG, but it carries semantics that YANG syntax does not represent, including operational descriptions, explanatory context, usage examples, cross-node relationship descriptions, and visibility conditions expressed in natural language. YANG is a target output of the NAIM workflow, not a semantic equivalent of NAIM.¶
NAIM is not a replacement for YANG. YANG [RFC7950] remains the authoritative data modeling language for network management, and the ultimate source of truth for configuration semantics, protocol operations, and data constraints. NAIM is positioned as a semantic bridge between natural language (or high-level intent) and the YANG ecosystem, designed to bring the existing YANG infrastructure into the era of AI-assisted network management.¶
The YANG ecosystem -- including YANG validators, NETCONF/RESTCONF servers, and the large body of standardized and vendor YANG modules -- represents more than a decade of modeling investment and operational deployment. NAIM does not seek to duplicate or supplant this ecosystem. Instead, NAIM provides a structured intermediate representation that enables AI systems to interact with YANG-based infrastructure more reliably, by making the implicit modeling knowledge required for YANG authoring explicit and machine-processable.¶
The relationship can be characterized as follows:¶
YANG is the target, NAIM is the path. Every NAIM Document is designed to be transformed into a valid YANG module (design-time) or validated against YANG-derived semantics (runtime). NAIM exists to improve the quality and reliability of this transformation, not to serve as an independent modeling language.¶
YANG-based systems remain the authoritative validators. NAIM
performs structural and formal validation: schema conformance, type
checking, required field presence, path format correctness, and node
template completeness. However, true semantic validation --
including must and when expression evaluation, leafref target
resolution, instance-level data validation, and cross-module
augmentation consistency -- remains the responsibility of YANG-based
systems such as YANG validators, NETCONF servers, and RESTCONF
servers. A NAIM Document that passes NAIM-level validation is not
guaranteed to produce a YANG module that will pass all semantic
checks in a target YANG-based system.¶
NAIM enables YANG ecosystem evolution. By providing a representation that is simultaneously suitable for AI consumption and deterministic YANG generation, NAIM enables the YANG ecosystem to benefit from advances in AI-assisted design, natural language interaction, and automated modeling -- without requiring changes to the YANG language itself or to existing YANG-based infrastructure.¶
While the primary workflow described in this document is design-time YANG authoring (natural language -> NAIM Document -> YANG), the NAIM Document format is deliberately designed to serve a second role: as the runtime semantic authority against which AI-generated operation intents are validated.¶
The operational semantics carried in NAIM Documents -- preconditions,
side effects, constraints, and writable status -- enable deterministic
validation of structured operation objects produced by AI systems,
without requiring the AI to be trusted for execution decisions. This
explains why the NAIM Document format carries fields such as
operations.preconditions and operations.side-effects that go beyond
what is strictly needed for YANG generation: they serve as
machine-processable validation rules at runtime.¶
This runtime usage is specified in [NAIM-OP]; the present document defines only the format and its design-time workflows. The two documents together implement a complete pipeline from natural language intent to validated network execution:¶
Design-time: Natural Language -> NAIM Document -> YANG
Runtime: Natural Language -> Operation IR -> [validated against
NAIM Document] -> NETCONF/RESTCONF execution
¶
This document defines the NAIM framework. It is intended for implementors who build tools that produce, validate, transform, or consume NAIM Documents, and for protocol engineers who wish to understand the semantic representation choices made by the format.¶
This document defines:¶
This document does not specify a specific AI model or LLM backend, prompt engineering strategies, confidence scoring algorithms, implementation-internal workflow logic, or runtime network operation execution.¶
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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
NAIM: Natural AI Interface Modeling.¶
NAIM Document: A structured artifact conforming to the canonical JSON schema defined in this document. A NAIM Document represents the semantics of one YANG module or one YANG submodule.¶
Canonical JSON Format: The normative JSON representation of a NAIM Document. All interoperable tools MUST treat the canonical JSON format as the authoritative source of NAIM Document content.¶
Markdown View: A human-readable rendering derived from the canonical JSON representation. The Markdown View is a presentation artifact; it is not normatively authoritative over the canonical JSON.¶
LLM Context View: A derived, token-efficient Markdown format intended for consumption by AI systems as prompt context. Retains semantic fields while omitting structural boilerplate and execution details. See Section 7.¶
Node Template: A structured schema pattern describing one category of semantic model node within a NAIM Document.¶
Visibility Condition: A declaration associated with a node that
specifies the conditions under which the node is present or applicable.
Corresponds to YANG if-feature and when constructs.¶
Deviation Declaration: A structured statement describing the ways in which a specific device implementation departs from a base YANG module.¶
Skill: A named, versioned, independently customizable process specification that defines the inputs, outputs, and behavioral rules for one stage of the NAIM workflow. Skills do not implement AI models; they specify what AI participation looks like.¶
Structured Error Report: A machine-readable error object produced by the Tool Layer when validation fails, containing error type, path, message, and expected format.¶
NAIM is organized as a three-layer architecture that separates concerns between specification, AI-driven processes, and deterministic execution.¶
+-----------------------+
| Skill Layer |
| (AI-driven) |
| Skills A, B, C, D |
+-----------+-----------+
|
consumes | produces
Specification | NAIM Documents
|
+------------------+ | +------------------+
| Specification |--------+------->| Tool Layer |
| Layer | | (deterministic) |
| (format + rules) |<----------------| validation, |
+------------------+ validates | generation, |
against | conversion |
+------------------+
¶
The Specification Layer defines the NAIM Document format itself:¶
This is the static normative layer. Sections 5-14 of this document constitute the Specification Layer.¶
The Skill Layer defines the AI-driven processes that operate on NAIM Documents. Each Skill specifies:¶
Skills are decoupled from the Specification Layer: the format can remain stable while Skill implementations are versioned and customized independently for different user populations and deployment contexts. For example, the same NAIM Specification can support a simplified question flow for network operators and an expert-mode flow for protocol engineers.¶
This document defines four Skills (Section 15):¶
The Tool Layer performs deterministic operations on NAIM Documents. Tools are not AI systems; they are conventional software components that provide correctness guarantees that AI systems cannot.¶
Tool Layer responsibilities:¶
When the Tool Layer detects validation errors in AI-generated NAIM Documents, the following three-phase error correction mechanism applies.¶
The Tool Layer MUST emit a Structured Error Report containing:¶
| Field | Description |
|---|---|
error_code
|
Machine-readable error category, e.g., MissingRequiredField, InvalidPathFormat, TypeConstraintViolation
|
path
|
JSON Pointer [RFC6901] to the failing field, e.g., /nodes/2/type
|
message
|
Human-readable error description, suitable for AI consumption |
expected
|
Expected format or valid value range |
Example:¶
{
"error_code": "MissingRequiredField",
"path": "/nodes/1/type",
"message": "Node at path '/eth-interface:interfaces/
interface/bandwidth' is of node-type 'leaf' but is
missing required field 'type'.",
"expected": "A type object with at least a 'base' field,
e.g., {\"base\": \"uint32\"}"
}
¶
The system SHOULD automatically inject the Structured Error Report into the Skill's prompt context and retry generation. The retry process SHOULD be transparent to the user: the Skill regenerates corrected output and resubmits it for Tool Layer validation without user intervention.¶
The system MUST enforce a maximum automatic retry count (RECOMMENDED value: 3). If retries are exhausted and validation still fails:¶
A NAIM Document MUST be represented as a JSON object [RFC8259] that conforms to the schema expectations defined in this document.¶
The canonical JSON representation is the normative source of NAIM Document content. All interoperable tools that exchange NAIM Documents MUST treat the canonical JSON format as authoritative. The Markdown View defined in Section 6 is a derived presentation artifact; it does not override the canonical JSON. When any discrepancy exists between the canonical JSON and a corresponding Markdown View, the canonical JSON MUST take precedence.¶
The top-level JSON object of a NAIM Document MUST contain:¶
version: A string identifying the NAIM format version. For
documents conforming to this specification, the value MUST be "1.0".¶
module or submodule. A top-level object MUST NOT
contain both.¶
The top-level object MAY additionally contain any of the following arrays:¶
A conforming NAIM Document representing usable model content SHOULD
contain a nodes array with at least one node object.¶
module Object
When the top-level object contains module, it represents a YANG main
module. The module object MUST contain:¶
name: A string. The YANG module name. It MUST conform to the
identifier syntax defined in Section 6.2 of [RFC7950].¶
description: A string. A human-readable description of the
module's purpose and scope.¶
The module object MAY contain:¶
submodule Object
When the top-level object contains submodule, it represents a YANG
submodule. The submodule object MUST contain:¶
name: A string. The submodule name.¶
belongs-to: A string. The name of the YANG main module to which
this submodule belongs.¶
The submodule object MAY contain:¶
description: A string.¶
A NAIM Document containing a submodule object MUST NOT also contain a
module object at the top level.¶
revisions
The revisions array MAY be present. Each entry in the array MUST
contain:¶
revision: A string in the format YYYY-MM-DD representing the
revision date.¶
description: A string describing what changed in this revision.¶
Each entry MAY also contain:¶
reference: A string citing an external document.¶
features
The features array MAY be present. Each entry represents a YANG
feature and MUST contain:¶
Each entry MAY also contain:¶
typedefs
The typedefs array MAY be present. Each entry defines a reusable
type. See Section 9.1.¶
groupings
The groupings array MAY be present. Each entry defines a reusable
structural fragment. See Section 9.2.¶
identities
The identities array MAY be present. Each entry defines a YANG
identity. See Section 9.3.¶
extensions
The extensions array MAY be present. Each entry defines an extension
keyword. See Section 9.4. Extension use within nodes is described in
Section 13.¶
nodes
The nodes array MAY be present. Each entry is a node object
conforming to one of the node template families defined in Section 8.
The nodes array is the primary structural content of a NAIM Document.
When present, it MUST contain only objects that conform to a recognized
node template family.¶
All path fields in node objects MUST be expressed as absolute schema
paths using the following conventions:¶
/.¶
:)
separator. For example: /ietf-interfaces:interfaces/interface.¶
Tools that generate YANG from a NAIM Document MAY derive YANG prefix
shorthand and corresponding import statements from the module-name
prefixes used in path fields, without requiring explicit import
declarations in the NAIM Document.¶
The Markdown View is a human-readable rendering of a NAIM Document, intended for human review, version-controlled document exchange, and editorial discussion. The Markdown View is a derived artifact; it is not independently normative.¶
Implementations that produce a Markdown View MUST derive it deterministically from the canonical JSON. Implementations that accept a Markdown View as input MAY use it to construct or update a canonical JSON document, subject to the constraints in Section 6.2.¶
The canonical JSON representation is the sole authoritative source of NAIM Document content.¶
When a Markdown View is used as input to reconstruct or update a canonical JSON document, implementations MUST NOT silently discard existing canonical JSON content. Specifically:¶
A Markdown View MUST begin with a document header. The header rules are:¶
# module: {name}¶
# submodule: {name}
and the second line MUST be:
## belongs-to: {parent-module-name}¶
## description: {description}¶
For each top-level array that is present in the canonical JSON, the Markdown View SHOULD include a corresponding section. Section headings SHOULD be:¶
Each section SHOULD present its entries in list form, with enough detail to allow a reader to understand the content without reference to the canonical JSON.¶
The Markdown View SHOULD include a tree diagram following the section blocks and preceding the node definitions. The tree diagram is an informative visual aid only; it is not a normative representation of the schema.¶
The tree diagram SHOULD follow the YANG tree diagram conventions described in [RFC8340], using ASCII art to represent schema hierarchy. Conventions include:¶
+--rw for read-write nodes,¶
+--ro for read-only nodes,¶
* to indicate list nodes, and¶
? to indicate optional nodes.¶
Because the tree diagram is informative and not used for round-trip reconstruction, implementations MAY omit it or vary its format.¶
Following the tree diagram, the Markdown View MUST include a flat
definition block for each node in the nodes array. The flat
definition format MUST follow these rules:¶
### {local-name} ({node-type})
where {local-name} is the last path segment of the node's path
field and {node-type} is the value of the node's node-type field.¶
path, description, type, writable, key, operations,
visibility, related-nodes, constraints, examples.¶
path field values.¶
The combination of canonical JSON and the Markdown View MUST satisfy the
following round-trip property: given a canonical JSON document J, a
Markdown View M derived from J, and a reconstruction process R
that produces JSON from M, the result R(M) MUST be semantically
equivalent to J for all fields that the Markdown View represents.¶
Implementations MUST NOT produce Markdown Views in which the rendering of any represented field loses information relative to the canonical JSON representation of that field.¶
The LLM Context View is a derived Markdown format optimized for consumption by AI systems as prompt context. It is designed to provide the semantic information an AI system needs to generate correct Operation IRs [NAIM-OP] or to participate in NAIM Skills, while minimizing token consumption.¶
The LLM Context View is distinct from the Markdown View defined in Section 6: the Markdown View is designed for human review and round-trip fidelity; the LLM Context View is designed for AI consumption and token efficiency.¶
An LLM Context View MUST include:¶
mandatory field for leaf and leaf-list nodes, and
from min-elements for leaf-list and list nodes), and constraints;¶
operations object defined in Section 8.3;¶
The following MUST be omitted from all LLM Context Views:¶
Implementations that produce LLM Context Views MUST derive them deterministically from the canonical JSON. Given the same canonical JSON input, all conforming implementations MUST produce semantically equivalent LLM Context Views.¶
The LLM Context View is a derived, non-authoritative format. It MUST NOT be used as input to reconstruct canonical JSON documents. The round-trip requirement defined in Section 6.7 does not apply to LLM Context Views.¶
A node object in the nodes array MUST conform to one of the node
template families defined in this section. Each node object MUST
contain a node-type field whose value identifies the applicable
template family.¶
The following fields MAY appear in any node object regardless of its template family:¶
path (string, REQUIRED for all node templates): The absolute schema
path of this node, following the conventions in Section 5.6.¶
description (string, REQUIRED for all node templates): A
human-readable description of the node's purpose, semantics, and
operational meaning.¶
visibility (object, OPTIONAL): Conditions under which this node is
present or applicable. See Section 11.¶
related-nodes (array, OPTIONAL): References to other nodes that are
semantically related to this node. Each entry SHOULD contain:¶
constraints (string or object, OPTIONAL): Operational constraints
applying to this node beyond what the type system expresses. It MAY
be a natural-language string or an object with xpath and
description fields.¶
examples (array, OPTIONAL): Usage examples. Each entry SHOULD
contain:¶
status (string, OPTIONAL): The lifecycle status of this node. If
present, it MUST be one of "current", "deprecated", or
"obsolete". Corresponds to the YANG status statement. Defaults
to "current" if absent.¶
extensions (array, OPTIONAL): Extension annotations applied to this
node. Each entry MUST conform to the extension-use object structure
defined in Section 13.¶
leaf and leaf-list
A node object with node-type value "leaf" or "leaf-list"
represents a YANG leaf or leaf-list node.¶
REQUIRED fields:¶
node-type¶
path¶
description¶
type: An object describing the data type. See Section 10.¶
writable: A boolean. true indicates a configuration node; false
indicates a state node.¶
OPTIONAL fields:¶
mandatory: A boolean. If true, this node MUST be present when its
parent exists. Corresponds to the YANG mandatory statement.
Defaults to false if absent. Applicable to leaf only; for
leaf-list, cardinality is expressed via min-elements.¶
min-elements (applicable to leaf-list only): An integer. The
minimum number of entries that MUST be present. Corresponds to the
YANG min-elements statement.¶
max-elements (applicable to leaf-list only): An integer or the
string "unbounded". The maximum number of entries permitted.
Corresponds to the YANG max-elements statement.¶
ordered-by (applicable to leaf-list only): A string. If present,
it MUST be one of "system" or "user". Corresponds to the YANG
ordered-by statement. Defaults to "system" if absent.¶
All common semantic fields defined in Section 8.1 apply.¶
container and list
A node object with node-type value "container" or "list"
represents a YANG container or list node.¶
REQUIRED fields:¶
node-type¶
path¶
description¶
writable: A boolean.¶
key (REQUIRED when node-type is "list" and writable is
true): A string containing the space-separated list key leaf names.
This reflects the YANG requirement that a key statement MUST be
present if the list represents configuration [RFC7950, Section 7.8.2].
A state list (writable is false) MAY omit the key field.¶
OPTIONAL fields:¶
uses: A string reference to a grouping defined in the groupings
array.¶
operations: An object describing operational semantics. It SHOULD
contain:¶
presence (applicable to container only): A string. If present,
this container is a YANG presence container, and the string value is
the meaning of the container's presence. Corresponds to the YANG
presence statement. If absent, the container is a non-presence
(structural) container.¶
min-elements (applicable to list only): An integer. The minimum
number of list entries that MUST be present. Corresponds to the YANG
min-elements statement.¶
max-elements (applicable to list only): An integer or the string
"unbounded". The maximum number of list entries permitted.
Corresponds to the YANG max-elements statement.¶
unique (applicable to list only): An array of strings. Each
string is a space-separated list of descendant schema node identifiers
that MUST be unique across all list entries. Corresponds to the YANG
unique statement.¶
ordered-by (applicable to list only): A string. If present, it
MUST be one of "system" or "user". Corresponds to the YANG
ordered-by statement. Defaults to "system" if absent.¶
All common semantic fields defined in Section 8.1 apply.¶
Key leaf consistency rule. When node-type is "list", each leaf
node identified in the key field MUST have its writable value
equal to the writable value of the enclosing list node. This
reflects the YANG requirement that a key leaf's config value MUST
match that of its parent list [RFC7950, Section 7.8.2]. The Tool
Layer MUST reject NAIM Documents that violate this rule.¶
choice
A node object with node-type value "choice" represents a YANG
choice node containing mutually exclusive alternatives.¶
A case is not an independent node-type value. Cases are represented
inline within the cases array of the enclosing choice node object
and do not appear as separate entries in the nodes array.¶
REQUIRED fields:¶
OPTIONAL fields:¶
mandatory: A boolean. If true, exactly one case MUST be selected.¶
All common semantic fields defined in Section 8.1 apply.¶
rpc and action
A node object with node-type value "rpc" or "action" represents a
YANG RPC or action node.¶
REQUIRED fields:¶
OPTIONAL fields:¶
input: A string giving the absolute schema path of the input
container.¶
output: A string giving the absolute schema path of the output
container.¶
preconditions: A string describing conditions required before
invocation.¶
side-effects: A string describing effects of successful invocation.¶
error-conditions: A string describing conditions under which the
operation fails.¶
All common semantic fields defined in Section 8.1 apply.¶
notification
A node object with node-type value "notification" represents a YANG
notification node.¶
REQUIRED fields:¶
OPTIONAL fields:¶
trigger: A string describing the condition that causes this
notification to be emitted.¶
data: An array of objects, each describing a data item carried by
the notification. Each entry SHOULD contain:¶
side-effects: A string describing effects of notification emission.¶
All common semantic fields defined in Section 8.1 apply.¶
anydata and anyxml
A node object with node-type value "anydata" represents a YANG 1.1
anydata node [RFC7950]. An anydata node models an unknown set of
YANG-modeled data nodes whose structure is not specified at design time.¶
A node object with node-type value "anyxml" represents a YANG
anyxml node. An anyxml node models an opaque XML subtree whose
content is not constrained by a YANG schema.¶
REQUIRED fields (both types):¶
OPTIONAL fields:¶
All common semantic fields defined in Section 8.1 apply.¶
Note: The presence of any anydata node in a NAIM Document triggers
automatic upgrade to YANG 1.1 output (see Section 15.3.3). anyxml
nodes do not trigger this upgrade, as anyxml is available in both
YANG 1.0 and YANG 1.1.¶
In YANG, the order of schema nodes in a module definition has no
semantic meaning [RFC7950]. Accordingly, this document does not define a
required ordering of node objects within the nodes array.
Implementations MUST NOT assign semantic meaning to the position of a
node object within the array.¶
For deterministic output, implementations SHOULD produce canonical JSON
and Markdown Views using a consistent, documented traversal strategy.
Depth-first traversal ordered by path value is RECOMMENDED.¶
typedef
A typedef entry in the typedefs array defines a reusable named type.
Each typedef object MUST contain:¶
name: A string. The typedef name.¶
description: A string.¶
base-type: A string identifying the built-in or derived type on
which this typedef is based.¶
Each typedef object MAY contain:¶
grouping
A grouping entry in the groupings array defines a reusable structural
fragment. Each grouping object MUST contain:¶
identity
An identity entry in the identities array defines a YANG identity.
Each identity object MUST contain:¶
Each identity object MAY contain:¶
extension Definition
An extension entry in the extensions array defines an extension
keyword. Each extension object MUST contain:¶
Each extension object MAY contain:¶
All leaf and leaf-list nodes MUST carry a type field. The type
field MUST be a JSON object containing at minimum a base field that
identifies the type.¶
For YANG built-in scalar types (string, boolean, uint8, uint16,
uint32, uint64, int8, int16, int32, int64, decimal64,
empty), the type object MUST contain:¶
base: A string identifying the built-in type name.¶
The type object MAY contain the following constraint fields, expressed
as strings using the same syntax as the corresponding YANG statement:¶
range: Applicable to numeric types. Example: "1..65535".¶
length: Applicable to string. Example: "1..64".¶
pattern: Applicable to string. A regular expression. Multiple
patterns MAY be expressed as an array of strings.¶
default: A string expressing the default value.¶
units: A string identifying the unit of measurement.¶
Constraint fields SHOULD only be included when they are semantically
applicable to the declared base type. In particular, range, length,
and pattern have no meaning for boolean and empty types and MUST
NOT be included for those types.¶
For enumeration types, the type object MUST contain:¶
Each entry in the enum array MAY be either:¶
name (string, REQUIRED) and value (integer,
OPTIONAL).¶
Implementations that require stable enumeration value mappings SHOULD
use the object form with explicit value fields.¶
For bits types, the type object MUST contain:¶
Each entry in the bits array SHOULD contain:¶
For leafref types, the type object MUST contain:¶
base: The string "leafref".¶
path: A string giving the absolute schema path of the referenced
leaf, following the path conventions in Section 5.6.¶
The type object MAY contain:¶
require-instance: A boolean. Corresponds to the YANG
require-instance statement. Defaults to true if absent.¶
For identityref types, the type object MUST contain:¶
When a node's type is a previously defined typedef rather than a
built-in type, the type object MUST contain:¶
base: A string giving the typedef name.¶
The implementation is responsible for resolving the typedef name against
the typedefs array of the same NAIM Document or against known external
type definitions.¶
When resolving the base field, an implementation MUST first check
whether the value matches an entry in the typedefs array of the same
NAIM Document. If a match is found, the type is treated as a typedef
reference. If no match is found, the value is interpreted as a YANG
built-in type name. Typedef names SHOULD NOT duplicate YANG built-in
type names to avoid ambiguity.¶
The visibility field of a node object expresses the conditions under
which the node is present or applicable. This field corresponds to the
YANG if-feature and when constructs.¶
if-feature
The if-feature field within a visibility object declares that the
node is conditional on one or more features.¶
The if-feature value MAY be:¶
and, or, or not keys. and
and or values are arrays of feature names or nested logical
expression objects. not value is a single feature name or nested
logical expression object.¶
Examples:¶
when
The when field within a visibility object declares a conditional
expression that must evaluate to true for the node to be present.¶
The when value MAY be:¶
When when is expressed as a natural-language string, implementations
SHOULD attempt to derive an equivalent XPath expression during YANG
generation. If a reliable XPath expression cannot be derived, the
implementation MUST NOT silently discard the condition. The
implementation SHOULD either report that the condition requires manual
completion or retain the natural-language form in the generated YANG
description statement with a clear annotation that XPath completion is
pending.¶
Deviation declarations describe the ways in which a specific device
implementation departs from a base YANG module. They correspond to the
YANG deviation statement.¶
Deviation objects MAY appear in the deviations field of the module
object defined in Section 5.3.¶
Each deviation object MUST contain:¶
target: A string. The absolute schema path of the node being
deviated.¶
type: A string. It MUST be one of "not-supported", "add",
"replace", or "delete".¶
reason: A string. A human-readable explanation of why this
deviation exists.¶
Deviation objects of type "add", "replace", or "delete" MAY
contain additional fields describing the specific property being added,
replaced, or deleted, using the same field names as the corresponding
node template fields.¶
Extension use within a node object allows a node to carry annotations
defined by extension declarations in the extensions array or by
external modules.¶
When present, the extensions field of a node object MUST be an array.
Each entry MUST contain:¶
name: A string. The qualified extension keyword, typically in the
form "prefix:keyword".¶
source-module: A string. The name of the YANG module that defines
the extension.¶
meaning: A string. A human-readable description of why this
extension is applied to this node and what it semantically conveys.¶
Each entry MAY contain:¶
value: A string. The literal argument value passed to the
extension.¶
If any of the required fields above cannot be determined, the implementation MUST omit the extension-use entry entirely rather than emit an incomplete representation. The implementation SHOULD inform the user or operator that the extension entry was omitted and that manual completion may be required.¶
A NAIM Document representing a YANG submodule MUST contain a submodule
object at the top level instead of a module object, as specified in
Section 5.4.¶
A submodule NAIM Document MAY contain typedefs, groupings,
identities, extensions, features, and nodes arrays.¶
When a conforming implementation transforms a submodule NAIM Document into YANG, the result MUST:¶
belongs-to statement referencing the parent module name
given in the belongs-to field of the submodule object;¶
prefix sub-statement within belongs-to, as required by
[RFC7950, Section 7.2.2] -- the prefix value is derived using the
same automatic derivation rule defined in Section 15.3.2;¶
namespace statement, as the namespace is inherited
from the parent module; and¶
prefix statement for the same reason.¶
This section defines four Skills that constitute the Skill Layer of the NAIM architecture. Each Skill specifies inputs, outputs, and behavioral rules for AI participation in the modeling workflow.¶
Skills are independently versionable and customizable: implementations MAY adapt question strategies, presentation styles, and interaction patterns to their target user populations without violating the normative requirements of this section.¶
Skill A transforms natural language modeling intent into a complete NAIM Document through structured dialogue.¶
Input: Natural language description of a network resource, or an existing NAIM Document with incremental modeling requirements.¶
Output: A complete NAIM Document in Canonical JSON.¶
Skill A MUST:¶
[PENDING];¶
A NAIM Document is considered complete for the purposes of Skill A when:¶
path, description, and node-type;¶
list nodes have key;¶
leaf and leaf-list nodes have type and writable;¶
choice nodes have a non-empty cases array;¶
name and nodes;¶
container and list nodes have operations.preconditions and
operations.side-effects; and¶
[PENDING] markers remain.¶
Skill B transforms a complete NAIM Document into a natural language summary for human confirmation before proceeding to generation.¶
Input: A complete NAIM Document in Canonical JSON.¶
Output: A natural language summary.¶
The summary MUST:¶
Skill C transforms a confirmed NAIM Document into a standard YANG module through deterministic tooling.¶
Input: A confirmed NAIM Document in Canonical JSON.¶
Output: A YANG module conforming to [RFC7950] or [RFC6020].¶
path determines the node's position in the schema tree;¶
description maps to YANG description;¶
writable: false maps to config false;¶
type is generated per the type representation rules in Section 10;¶
constraints and when SHOULD be converted to
XPath where possible; if conversion is not reliable, the
implementation MUST report the issue rather than silently discard the
constraint;¶
import statements;¶
if-feature logical expressions are converted to valid YANG
if-feature statements; and¶
features, typedefs, groupings,
identities, extensions, deviations, revisions) map to their
corresponding YANG statements.¶
Unless the NAIM Document explicitly models YANG 1.1-only semantics, Skill C MUST default to generating YANG 1.0 RFC6020.¶
Skill C SHOULD automatically upgrade to YANG 1.1 RFC7950 when the NAIM Document contains any of the following:¶
| YANG 1.1-only feature | NAIM modeling indicator |
|---|---|
action node |
node-type is "action" (distinct from top-level rpc) |
anydata
|
node-type is "anydata" (see Section 8.7) |
if-feature logical expression |
visibility.if-feature uses and/or/not compound objects |
modifier (invert-match) |
type.pattern includes negation semantics |
augment with when
|
A node whose path targets another module's namespace (cross-module augmentation) and whose visibility.when is present |
If a YANG 1.1-only feature is detected but the target environment is explicitly constrained to YANG 1.0, the implementation MUST report the incompatibility rather than silently downgrade or skip the affected nodes.¶
When the input is a submodule-type NAIM Document, the YANG generation
rules defined in Section 14 apply.¶
Skill D transforms existing YANG modules into NAIM Documents, enriching them with AI-generated semantic annotations.¶
Input: An existing YANG module.¶
Output: A NAIM Document in Canonical JSON with confidence annotations.¶
Skill D is implemented as two complementary components:¶
Structural extraction (Tool Layer): Deterministic extraction of YANG-derivable fields at high confidence:¶
Semantic completion (AI): AI-assisted enrichment of fields not directly present in YANG syntax:¶
All AI-generated fields in Skill D output MUST carry confidence annotations:¶
review-required confidence MUST NOT be
published to production model assets without human confirmation.¶
review-required regardless of the
AI system's stated confidence.¶
NAIM improves the reliability of AI-assisted YANG modeling by making implicit semantics explicit and machine-verifiable. However, the following limitations apply:¶
review-required confidence MUST NOT be treated as
authoritative. AI-inferred operational semantics (preconditions,
side-effects) may be plausible but incorrect.¶
refine statements within uses
applications.¶
Interoperability in this specification is defined at the representation level. Independent implementations conforming to this document SHOULD be able to exchange canonical NAIM Document JSON objects and interpret them consistently.¶
Specifically, conforming implementations:¶
node-type values consistently with the node template
families defined in Section 8.¶
type field contents consistently with the type
representation rules defined in Section 10.¶
path, description, writable, and type fields
of node objects when exchanging NAIM Documents.¶
Implementations are NOT required to share identical AI interaction logic, reconstruction algorithms, confidence handling strategies, or YANG generation internals. Interoperability is defined at the data format boundary, not at the workflow boundary.¶
Implementations SHOULD clearly distinguish between NAIM-level
validation (structural conformance to this specification) and
YANG-level validation (semantic conformance to YANG rules and target
device constraints). A NAIM Document that conforms to the schema
defined in Appendix A is structurally valid but is not guaranteed to
produce a YANG module that will pass validation in any specific
YANG-based system. Authoritative semantic validation -- including
evaluation of YANG must, when, and leafref expressions,
uniqueness constraints, and instance-level data validation -- is the
responsibility of the target YANG validation environment, not of NAIM
tools (see Section 1.3).¶
NAIM Documents are semantic model artifacts. They do not themselves constitute executable code or protocol messages, but they may drive downstream processes -- including YANG module generation and, through [NAIM-OP], runtime network configuration -- that have direct operational consequences. The following security considerations apply.¶
Integrity of NAIM Documents. Because a NAIM Document may be used as input to deterministic tool pipelines that generate YANG modules or as the validation authority for runtime Operation IRs [NAIM-OP], unauthorized modification of a NAIM Document can introduce incorrect or malicious semantics into downstream artifacts. Implementations SHOULD protect NAIM Documents in storage and transit using integrity mechanisms appropriate to the deployment environment.¶
Confidentiality of semantic model assets. NAIM Documents may contain detailed descriptions of network topology, device capabilities, and operational constraints. This information may be sensitive. Implementations SHOULD apply confidentiality protections appropriate to the sensitivity of the modeled information.¶
Validation before downstream use. Implementations that consume NAIM Documents as input to YANG generation or runtime validation MUST validate the structural conformance of the document before processing. Accepting malformed or adversarially crafted NAIM Documents without validation may produce incorrect YANG modules or permit invalid Operation IRs to pass validation.¶
AI-generated content review. When a NAIM Document is produced in whole or in part by an AI-assisted authoring process (Skills A and D), the resulting document SHOULD be subject to human review before it is used to generate or deploy production YANG modules or serve as a runtime validation authority. AI-generated semantic content may contain inaccuracies that are not apparent from structural validation alone.¶
External document integrity. If Skill D retrieves external documents (RFCs, vendor documentation) during reverse engineering, implementations SHOULD verify the authenticity and integrity of those documents to prevent contamination of the modeling result.¶
Audit logging. Implementations that participate in workflows where NAIM Documents drive operational changes SHOULD maintain audit logs sufficient to reconstruct the chain of actions from a NAIM Document to a resulting downstream state change. Skill A dialogue logs and intermediate JSON artifacts may contain sensitive network information and SHOULD be subject to access control and retention policies.¶
This document has no IANA actions.¶
Future companion documents defining a media type for the NAIM canonical JSON format MAY request registration of an appropriate media type with IANA at that time.¶
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/rfc/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/rfc/rfc6020>.
[RFC6901] Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed.,
"JavaScript Object Notation (JSON) Pointer", RFC 6901,
DOI 10.17487/RFC6901, April 2013,
<https://www.rfc-editor.org/rfc/rfc6901>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/rfc/rfc7950>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174,
DOI 10.17487/RFC8174, May 2017,
<https://www.rfc-editor.org/rfc/rfc8174>.
[RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON)
Data Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/rfc/rfc8259>.
¶
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/rfc/rfc6241>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<https://www.rfc-editor.org/rfc/rfc8040>.
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/rfc/rfc8340>.
[NAIM-OP] Feng, C., "Operation Intent Intermediate Representation
for Model-Driven Network Execution", Work in Progress,
Internet-Draft, draft-feng-netconf-naim-op-00, April 2026.
¶
The following is the normative JSON Schema for NAIM Documents. Implementations that validate NAIM Documents MUST accept documents conforming to this schema.¶
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["version"],
"oneOf": [
{ "required": ["module"] },
{ "required": ["submodule"] }
],
"properties": {
"version": { "type": "string", "const": "1.0" },
"module": {
"type": "object",
"required": ["name", "description"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"organization": { "type": "string" },
"contact": { "type": "string" },
"reference": { "type": "string" },
"deviations": {
"type": "array",
"items": {
"type": "object",
"required": ["target", "type", "reason"],
"properties": {
"target": { "type": "string" },
"type": {
"enum": ["not-supported", "add", "replace", "delete"]
},
"reason": { "type": "string" }
}
}
}
}
},
"submodule": {
"type": "object",
"required": ["name", "belongs-to"],
"properties": {
"name": { "type": "string" },
"belongs-to": { "type": "string" },
"description": { "type": "string" }
}
},
"revisions": {
"type": "array",
"items": {
"type": "object",
"required": ["revision", "description"],
"properties": {
"revision": { "type": "string", "format": "date" },
"description": { "type": "string" },
"reference": { "type": "string" }
}
}
},
"features": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "description"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"status": {
"enum": ["current", "deprecated", "obsolete"]
},
"reference": { "type": "string" }
}
}
},
"typedefs": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "description", "base-type"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"base-type": { "type": "string" },
"range": { "type": "string" },
"length": { "type": "string" },
"pattern": { "type": "string" },
"units": { "type": "string" },
"default": { "type": "string" }
}
}
},
"groupings": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "description", "contains"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"contains": {
"type": "array",
"items": { "type": "string" }
}
}
}
},
"identities": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "description"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"base": { "type": "string" },
"status": {
"enum": ["current", "deprecated", "obsolete"]
},
"reference": { "type": "string" }
}
}
},
"extensions": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "description"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"argument": { "type": "string" },
"reference": { "type": "string" }
}
}
},
"nodes": {
"type": "array",
"items": { "$ref": "#/definitions/nodeObject" }
}
},
"definitions": {
"nodeObject": {
"type": "object",
"required": ["node-type", "path", "description"],
"properties": {
"node-type": {
"enum": ["leaf", "leaf-list", "container", "list",
"choice", "rpc", "action", "notification",
"anydata", "anyxml"]
},
"path": { "type": "string" },
"description": { "type": "string" },
"writable": { "type": "boolean" },
"key": { "type": "string" },
"type": { "$ref": "#/definitions/typeSpec" },
"uses": { "type": "string" },
"mandatory": { "type": "boolean" },
"status": {
"enum": ["current", "deprecated", "obsolete"]
},
"presence": { "type": "string" },
"min-elements": { "type": "integer", "minimum": 0 },
"max-elements": {
"oneOf": [
{ "type": "integer", "minimum": 1 },
{ "type": "string", "const": "unbounded" }
]
},
"unique": {
"type": "array",
"items": { "type": "string" }
},
"ordered-by": {
"enum": ["system", "user"]
},
"operations": {
"type": "object",
"properties": {
"preconditions": { "type": "string" },
"side-effects": { "type": "string" }
}
},
"visibility": {
"type": "object",
"properties": {
"if-feature": {
"oneOf": [
{ "type": "string" },
{ "type": "object" }
]
},
"when": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"required": ["xpath"],
"properties": {
"xpath": { "type": "string" },
"description": { "type": "string" }
}
}
]
}
}
},
"related-nodes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": { "type": "string" },
"relationship": { "type": "string" }
}
}
},
"constraints": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"required": ["xpath"],
"properties": {
"xpath": { "type": "string" },
"description": { "type": "string" }
}
}
]
},
"examples": {
"type": "array",
"items": {
"type": "object",
"properties": {
"scenario": { "type": "string" },
"operation": { "type": "string" }
}
}
},
"extensions": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "source-module", "meaning"],
"properties": {
"name": { "type": "string" },
"source-module": { "type": "string" },
"meaning": { "type": "string" },
"value": { "type": "string" }
}
}
},
"cases": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "nodes"],
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"nodes": {
"type": "array",
"items": { "type": "string" }
}
}
}
},
"input": { "type": "string" },
"output": { "type": "string" },
"preconditions": { "type": "string" },
"side-effects": { "type": "string" },
"error-conditions": { "type": "string" },
"trigger": { "type": "string" },
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"type": { "type": "string" },
"description": { "type": "string" }
}
}
}
},
"allOf": [
{
"if": {
"properties": {
"node-type": { "enum": ["leaf", "leaf-list"] }
}
},
"then": {
"required": ["type", "writable"]
}
},
{
"if": {
"properties": {
"node-type": { "const": "container" }
}
},
"then": {
"required": ["writable"]
}
},
{
"if": {
"properties": {
"node-type": { "const": "list" }
}
},
"then": {
"required": ["writable"]
}
},
{
"if": {
"properties": {
"node-type": { "const": "list" },
"writable": { "const": true }
},
"required": ["writable"]
},
"then": {
"required": ["key"]
}
},
{
"if": {
"properties": {
"node-type": { "const": "choice" }
}
},
"then": {
"required": ["cases"]
}
},
{
"if": {
"properties": {
"node-type": { "enum": ["anydata", "anyxml"] }
}
},
"then": {
"required": ["writable"]
}
}
]
},
"typeSpec": {
"type": "object",
"required": ["base"],
"properties": {
"base": { "type": "string" },
"range": { "type": "string" },
"length": { "type": "string" },
"pattern": {
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
},
"default": { "type": "string" },
"units": { "type": "string" },
"enum": {
"oneOf": [
{
"type": "array",
"items": { "type": "string" }
},
{
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"value": { "type": "integer" }
}
}
}
]
},
"bits": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": { "type": "string" },
"position": { "type": "integer" }
}
}
},
"types": {
"type": "array",
"items": { "$ref": "#/definitions/typeSpec" }
},
"path": { "type": "string" },
"require-instance": { "type": "boolean" },
"identity": { "type": "string" }
}
}
}
}
¶
The following is an example of a conforming canonical NAIM Document representing a simplified Ethernet interface module.¶
{
"version": "1.0",
"module": {
"name": "eth-interface",
"description": "Ethernet interface config and state",
"organization": "Example Networks"
},
"revisions": [
{
"revision": "2026-07-17",
"description": "Initial version"
}
],
"features": [
{
"name": "high-speed",
"description": "Support for 10 Gbps or above",
"status": "current"
}
],
"typedefs": [
{
"name": "bandwidth-mbps",
"description": "Bandwidth in megabits per second",
"base-type": "uint32",
"range": "1..1000000",
"units": "Mbps"
}
],
"nodes": [
{
"node-type": "container",
"path": "/eth-interface:interfaces",
"description": "Top-level container for interfaces",
"writable": true,
"operations": {
"preconditions": "None",
"side-effects": "None"
}
},
{
"node-type": "list",
"path": "/eth-interface:interfaces/interface",
"description": "An individual Ethernet interface entry",
"key": "name",
"writable": true,
"operations": {
"preconditions": "Name must be unique.",
"side-effects": "Allocates HW resources."
}
},
{
"node-type": "leaf",
"path": "/eth-interface:interfaces/interface/name",
"description": "Unique interface name, e.g., eth0.",
"type": { "base": "string", "length": "1..64" },
"writable": true
},
{
"node-type": "leaf",
"path": "/eth-interface:interfaces/interface/bandwidth",
"description": "Configured bandwidth in Mbps.",
"type": { "base": "bandwidth-mbps" },
"writable": true,
"examples": [
{
"scenario": "1 Gbps link",
"operation": "1000"
},
{
"scenario": "10 Gbps link",
"operation": "10000"
}
]
},
{
"node-type": "leaf",
"path": "/eth-interface:interfaces/interface/admin-status",
"description": "Administrative state of the interface.",
"type": {
"base": "enumeration",
"enum": [
{ "name": "up", "value": 0 },
{ "name": "down", "value": 1 }
]
},
"writable": true,
"constraints": "Must be down before deletion.",
"visibility": {
"if-feature": "high-speed"
}
},
{
"node-type": "leaf",
"path": "/eth-interface:interfaces/interface/oper-status",
"description": "Operational state of the interface.",
"type": {
"base": "enumeration",
"enum": [
{ "name": "up", "value": 0 },
{ "name": "down", "value": 1 },
{ "name": "testing", "value": 2 }
]
},
"writable": false
}
]
}
¶
The following is the Markdown View derived from the canonical JSON document in Appendix B.¶
# module: eth-interface
## description: Ethernet interface config and state
## Revisions
- 2026-07-17: Initial version
## Features
- high-speed: Support for 10 Gbps or above
## Typedefs
- bandwidth-mbps (uint32, range: 1..1000000, Mbps):
Bandwidth in megabits per second
## Tree
module: eth-interface
+--rw interfaces
+--rw interface* [name]
+--rw name string
+--rw bandwidth bandwidth-mbps
+--rw admin-status enumeration {high-speed}?
+--ro oper-status enumeration
### interfaces (container)
- path: /eth-interface:interfaces
- description: Top-level container for interfaces
- writable: yes
- operations:
- preconditions: None
- side-effects: None
### interface (list)
- path: /eth-interface:interfaces/interface
- description: An individual Ethernet interface entry
- key: name
- writable: yes
- operations:
- preconditions: Name must be unique.
- side-effects: Allocates HW resources.
### name (leaf)
- path: /eth-interface:interfaces/interface/name
- description: Unique interface name, e.g., eth0.
- type: string (length: 1..64)
- writable: yes
### bandwidth (leaf)
- path: /eth-interface:interfaces/interface/bandwidth
- description: Configured bandwidth in Mbps.
- type: bandwidth-mbps
- writable: yes
- examples:
- Configure a 1 Gbps interface: 1000
- Configure a 10 Gbps interface: 10000
### admin-status (leaf)
- path: /eth-interface:interfaces/interface/admin-status
- description: Administrative state of the interface.
- type: enumeration [up(0), down(1)]
- writable: yes
- if-feature: high-speed
- constraints: Must be down before deletion.
### oper-status (leaf)
- path: /eth-interface:interfaces/interface/oper-status
- description: Operational state of the interface.
- type: enumeration [up(0), down(1), testing(2)]
- writable: no
¶
This appendix presents the YANG module that a conforming implementation would produce from the canonical JSON document in Appendix B. Per the YANG version strategy defined in Section 15.3.3, this example uses YANG 1.0 because no YANG 1.1-only features are present.¶
Note: The admin-status node in Appendix B carries a natural-language
constraint ("The admin-status MUST be set to 'down' before the
interface can be deleted.") that cannot be reliably converted into a
YANG XPath expression by deterministic tooling. Per Section 15.3.1, a
conforming implementation MUST NOT silently discard such a constraint.
In this example, the constraint is retained in the generated YANG
description statement with an annotation indicating that manual
completion of a must statement is required (see Section 11.2).¶
module eth-interface {
yang-version 1;
namespace "urn:example:eth-interface";
prefix "eth";
organization "Example Networks";
revision 2026-07-17 {
description "Initial version";
}
feature high-speed {
description
"Support for 10 Gbps or above";
}
typedef bandwidth-mbps {
type uint32 {
range "1..1000000";
}
units "Mbps";
description
"Bandwidth in megabits per second";
}
container interfaces {
description
"Top-level container for all Ethernet interface configuration";
list interface {
key "name";
description "An individual Ethernet interface entry";
leaf name {
type string {
length "1..64";
}
description
"The unique name of the Ethernet interface,
such as 'eth0' or 'GigabitEthernet0/1'.";
}
leaf bandwidth {
type bandwidth-mbps;
description
"The configured bandwidth of the interface in Mbps.";
}
leaf admin-status {
if-feature "high-speed";
type enumeration {
enum up { value 0; }
enum down { value 1; }
}
description
"The administrative state of the interface as set by
the operator.
NOTE: The NAIM Document contains a natural-language
constraint ('The admin-status MUST be set to down
before the interface can be deleted') that could not
be reliably converted to a YANG XPath expression.
Manual completion of a 'must' statement is required.";
}
leaf oper-status {
config false;
type enumeration {
enum up { value 0; }
enum down { value 1; }
enum testing { value 2; }
}
description
"The current operational state of the interface
as observed by the system.";
}
}
}
}
¶