Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Cisco IOS / IOS XE Automation

Direct answer

Cisco IOS and IOS XE automation uses SSH with Netmiko, Scrapli or Ansible's cisco.ios collection, and on IOS XE also NETCONF, RESTCONF, gNMI and guest shell Python for model-driven changes.

When to use this

Use this when automating IOS and IOS XE devices.

First 30 seconds

1. IOS XE supports CLI, NETCONF, RESTCONF, gNMI, guest shell.

2. Enable model-driven APIs.

3. Use configure replace with archive for rollback.

4. Keep versions consistent.

5. AAA for automation users.

Operational verification

controller → IOS XE interfaces → config/state

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS XE model-driven 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.

PlatformCisco IOS XE model-driven automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when automating IOS and IOS XE devices.
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.

3 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 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 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
  • SSH with Netmiko/Scrapli/Ansible works everywhere.
  • IOS XE adds NETCONF, RESTCONF and gNMI.
  • Save config after changes.
Key checks
  • 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.

FeatureUse
configure replaceAtomic full-config changes with rollback
Archive + rollbackConfig history on device
Guest shell/on-box PythonLocal scripts
Ansible cisco.ios resource modulesDeclarative 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
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 docCisco IOS XE model-driven automation IOS XE current DevNet documentation

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%
Embedded reference data

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.

LayerCisco Automation → Cisco IOS / IOS XE Automation operational reference
Runtime/ownershipCisco 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 intentversioned desired configuration plus platform/model/version assumptions and a stable device/VRF/interface scope
VerificationDiscover capabilities, read the exact modeled object, apply a bounded NETCONF/RESTCONF edit or validated CLI change, then reread configuration and relevant operational state.
Expected interpretationThe 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 boundarypreserve 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
Depth when you need it

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.

Confirmation

Confirm action

Continue?