Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

YANG · Network Automation

Direct answer

YANG in Network Automation provides the data-model contract that gives structured network configuration and state predictable paths, types, constraints and module identities.

When to use this

Use it when configuring, checking or troubleshooting YANG in Network Automation.

First 30 seconds

1. YANG models describe config and state.

2. Native vendor models are most complete; OpenConfig/IETF are portable.

3. Explore with pyang/YANG Suite.

4. Check device versions.

5. Validate payloads against models.

Operational verification

YANG model → data structure → API payloads

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
network automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformnetwork automation · This Topic owns YANG model use within Network Automation. The top-level YANG branch owns deeper modeling concepts and module structure.
Scope / prerequisiteUse it when configuring, checking or troubleshooting YANG in Network Automation.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

automation intent → YANG module/revision/features → schema path/types/constraints → encoded instance data → protocol/server support → resource state → network acceptance

Healthy evidence: module revision, namespace, features and schema path are explicit, instance data validates and device/network read-back matches intent.

Step 2 Failure modes and next checks Narrow the fault

Suspicious evidence: automation binds to a similarly named node in the wrong module, ignores deviations/features or assumes schema validity equals operational validity.

Step 3 Common mistakes Narrow the fault
  • Model revision mismatch.
Step 4 Where it fails Narrow the fault

Where YANG usually goes wrong: module/revision/namespace identity, schema constraints, config/state nodes and instance-data validation.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • YANG module exists ≠ target implements the required revision or feature.
  • Schema-valid data ≠ operationally safe intent.
  • Same leaf name ≠ same semantics across different namespaces/modules.
  • Model support ≠ every device exposes identical data completeness.
Key checks
  • pyang -f tree <module>.yang | head — model tree
  • Device-supported models (capabilities/yang-library) — what's available
  • Native vs OpenConfig vs IETF models — choice
ReferenceWhat it is1 section · depth on demand

Core model

Separate model/module identity and revision, schema path/type validation, server capability support, encoded instance data and real operational semantics.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

YANG establishes a data-model contract, but it does not show device support, semantic safety or network correctness on its own.

In depth

In network automation, YANG models define the structure of the data you send and receive. Choosing between native vendor models and vendor-neutral models (OpenConfig, IETF) decides how portable your automation is.

Model familyTrade-off
Vendor native (Cisco-IOS-XE-native)Full feature coverage, vendor-specific
OpenConfigMulti-vendor, fewer features
IETFStandard basics (interfaces, IP)
pyang -f tree Cisco-IOS-XE-native.yang | less

Generate payloads from data with libraries or templates, and validate them against the model before sending.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docnetwork automation current

Authoritative/upstream documentation reviewed for bounded claims in Network Automation > YANG. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc7950 · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
yang network automationyang models automationmodel driven network automation
Embedded reference data

Quick lookup tables

YANG Network Automation proof-boundary map

Fast intent/scope, management-operation, device-state and network-acceptance boundaries for YANG.

BoundaryHealthy evidenceSuspicious evidence
Intent / scopeSource revision and exact targets are explicitStale inventory, hidden selector or wrong variables change scope
Management operationTransport/model/payload and per-device response are traceableAuth/capability/parser differences hide partial or wrong execution
Device stateEffective and persistent state are read backAccepted config/API result is mistaken for convergence
Network proofOriginal control/data-plane or service test passesAutomation summary substitutes for actual network acceptance
Depth when you need it

Deep reference

Healthy vs suspicious evidence

Output interpretation

For YANG, rely on structured fields and stable IDs (module/revision/namespace identity, schema constraints, config/state nodes and instance-data validation) rather than text formatted for display.

Confirmation

Confirm action

Continue?