Use this when automating IOS and IOS XE devices.
Cisco IOS / IOS XE Automation
controller → IOS XE interfaces → config/state
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
The primary procedure is: Discover capabilities, read the exact modeled object, apply a bounded NETCONF/RESTCONF edit or validated CLI change, then reread configuration and relevant operational state. Exercise failure-oriented cases such as wrong YANG namespace/revision, stale platform assumptions, CLI parsing used where model exists, partial NETCONF errors, candidate/running mismatch and management success without data-plane effect so the test covers failure cases, not only the happy path.
Step 2 Common mistakes Narrow the fault
- Mixing CLI scraping and APIs without a plan.
Step 3 Where it fails Narrow the fault
Failure analysis for Cisco Automation → Cisco IOS / IOS XE Automation should follow the path through the components: automation intent → transport/session/auth → model/schema → datastore transaction → IOS XE subsystem → operational/data-plane state. Tests should include edge cases such as wrong YANG namespace/revision, stale platform assumptions, CLI parsing used where model exists, partial NETCONF errors, candidate/running mismatch and management success without data-plane effect. Recovery should preserve RPC/error-info and pre-change config, discard/rollback only the bounded transaction, repair schema/object scope, then repeat read/edit/read plus an operational check.
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 version— platform/version- netconf-yang / restconf configured — APIs enabled
- archive + configure replace capability — rollback
ReferenceWhy it matters1 section · depth on demand
In depth
Cisco IOS / IOS XE automation uses model-driven interfaces on IOS XE (NETCONF, RESTCONF, gNMI, plus on-box Python and EEM) and CLI automation for classic IOS devices.
netconf-yang
restconf
ip http secure-server
username automation privilege 15 secret <secret>
Documented example, not captured output.
| Feature | Use |
|---|---|
configure replace | Atomic full-config changes with rollback |
| Archive + rollback | Config history on device |
| Guest shell/on-box Python | Local scripts |
Ansible cisco.ios resource modules | Declarative per-feature config |
Check the IOS XE release for model coverage before planning NETCONF/RESTCONF automation.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Cisco IOS / IOS XE Automation in Cisco Automation is owned at runtime by the IOS XE management plane exposing NETCONF/RESTCONF/YANG or bounded CLI interfaces and the automation client consuming them. The durable intent is versioned desired configuration plus platform/model/version assumptions and a stable device/VRF/interface scope. Reliable automation must carry stable identity across the path: device management address/serial, datastore, YANG model/namespace and object keys such as interface name or protocol instance. The consumer-visible target is the IOS XE candidate/running configuration and operational state for the exact modeled resource. The key invariants are capabilities/models are discovered, edits target the correct datastore/object keys, commit semantics are understood, platform-specific defaults are not assumed and verification uses operational read-back.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Store and review versioned desired configuration plus platform/model/version assumptions and a stable device/VRF/interface scope; pin or at least record implementation/model versions and keep environment-specific identity outside reusable logic where possible. The stable identity contract is device management address/serial, datastore, YANG model/namespace and object keys such as interface name or protocol instance.
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 > Cisco IOS / IOS XE Automation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.cisco.com/docs/ios-xe/ · confidence 94%Quick lookup tables
Cisco Automation → Cisco IOS / IOS XE Automation · operational reference
Context-specific ownership, verification, output and failure-boundary lookup for Cisco Automation → Cisco IOS / IOS XE Automation.
| Layer | Cisco Automation → Cisco IOS / IOS XE Automation operational reference |
|---|---|
| Runtime/ownership | Cisco IOS XE model-driven automation · the IOS XE management plane exposing NETCONF/RESTCONF/YANG or bounded CLI interfaces and the automation client consuming them |
| Persistent intent | versioned desired configuration plus platform/model/version assumptions and a stable device/VRF/interface scope |
| Verification | Discover capabilities, read the exact modeled object, apply a bounded NETCONF/RESTCONF edit or validated CLI change, then reread configuration and relevant operational state. |
| Expected interpretation | The client targets the intended IOS XE device/model/object, the transaction reports no hidden per-element errors, running configuration matches intent, and operational state confirms the expected effect. |
| Recovery boundary | preserve RPC/error-info and pre-change config, discard/rollback only the bounded transaction, repair schema/object scope, then repeat read/edit/read plus an operational check |
Deep reference
Healthy vs suspicious evidence
Output interpretation
At minimum retain device ID, software version, session/request ID, model/namespace, target object keys, edit status/error-info, running-config read-back and relevant operational counters/state. The useful output makes ambiguity visible, links to the target identity from device management address/serial, datastore, YANG model/namespace and object keys such as interface name or protocol instance, and provides enough context to safely decide whether a retry is permitted.