Use this when using YANG models with Cisco devices.
YANG · Cisco Automation
1. YANG on Cisco: native models (most complete), OpenConfig, IETF.
2. Explore with YANG Suite.
3. Model versions per IOS XE release.
4. Test payloads in lab.
5. Document paths used.
YANG model → payload → device
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Record device ID/management endpoint, platform/version, YANG model/revision or CLI operation, request/run ID; inspect the runtime/control-plane result; then query the selected Cisco device configuration/operational state and forwarding behavior where relevant through an independent read path and compare it with the versioned intent. The negative fixture should deliberately exercise risks such as platform syntax/model drift, privilege/auth mismatch, partial config, parser success without feature activation, asynchronous convergence and controller cache differing from device state, choosing the cases most relevant to YANG module/schema identity, revision/namespace, constraints and how modeled data is exposed through NETCONF/RESTCONF implementations.
Step 2 Common mistakes Narrow the fault
- Using native models where OpenConfig is needed across vendors (or the reverse).
Step 3 Where it fails Narrow the fault
Failure analysis for Cisco Automation → YANG should follow the path through the components: inventory/controller → transport/API/CLI → device parser/YANG datastore → control-plane state → forwarding/operational read-back. Before retrying a mutating operation, read current target state using the stable identity device ID/management endpoint, platform/version, YANG model/revision or CLI operation, request/run ID; if state is unknown, stop broad retries.
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.
show netconf-yang datastores— datastores- YANG Suite / pyang exploration — models
- Cisco-IOS-XE-native vs openconfig — model choice
ReferenceWhy it matters1 section · depth on demand
In depth
On Cisco platforms, YANG models come in three families: Cisco native models (e.g. Cisco-IOS-XE-native) covering almost all CLI features, OpenConfig models for multi-vendor work, and IETF models for basics. Operational data uses -oper models.
| Need | Model to look at |
|---|---|
| Full IOS XE feature config | Cisco-IOS-XE-native and feature sub-modules |
| Interface state | Cisco-IOS-XE-interfaces-oper or openconfig-interfaces |
| Vendor-neutral config | openconfig-* |
The models for each release are published in the YangModels GitHub repository (vendor/cisco/xe/<release>); match the model version to the device's software release.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Cisco Automation → YANG is owned at runtime by the automation client/controller communicating with Cisco devices through supported APIs, YANG models or CLI. Its durable intent is versioned automation with device inventory, platform/model capability expectations and bounded configuration intent; the stable identity contract is device ID/management endpoint, platform/version, YANG model/revision or CLI operation, request/run ID. Follow the chain of components inventory/controller → transport/API/CLI → device parser/YANG datastore → control-plane state → forwarding/operational read-back and record which layer currently owns truth. The linked authority for bounded mechanics is RFC 7950 — The YANG 1.1 Data Modeling Language; documentation support is separate from observed lab/production Evidence.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Cisco Automation > YANG. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc7950 · confidence 94%