Pcornel
Automation · Cisco Automation

Cisco IOS / IOS XE Automation

Cheat sheet · https://pcornel.dk/topic.php?topic=5639

Back to the Topic

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.

Remember

  • SSH with Netmiko/Scrapli/Ansible works everywhere.
  • IOS XE adds NETCONF, RESTCONF and gNMI.
  • Save config after changes.

First checks

  • show version — platform/version
  • netconf-yang / restconf configured — APIs enabled
  • archive + configure replace capability — rollback

Verify in this order

controller → IOS XE interfaces → config/state

Where it usually breaks

Commit/input → runner/job → build/test artifact → deployment request → target rollout/reconcile → effective version/config → health/readiness → workload.

Cisco Automation → Cisco IOS / IOS XE Automation · operational reference

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5639

Confirmation

Confirm action

Continue?