Cisco Automation
Cisco automation configures and checks IOS XE, NX-OS and other platforms through SSH/CLI tools like Netmiko and Ansible, or model-driven NETCONF, RESTCONF and YANG, plus controller APIs such as Catalyst Center and Meraki.
1. Cisco automation: SSH/CLI (ansible cisco.ios, netmiko), NETCONF/RESTCONF on IOS XE, gNMI, controller APIs (Catalyst Center, Meraki).
2. Use YANG APIs on modern IOS XE.
3. Archive/rollback features.
4. Verify after changes.
5. Pin collection versions.
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 Target-state verification ladder Verify boundary
Cisco Automation uses a strict target-state ladder for Cisco controller/device automation: request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified.
Step 2 Verification path Verify boundary
Verification should show target identity, API/model capability, intended diff and network effect. Read device platform/version and relevant capability/model data first; retrieve current configuration for the exact modeled resource; calculate or display the proposed change; then execute against a bounded target. After mutation, re-read the same configuration path and use an independent operational check such as interface/protocol state, routing table, telemetry or service test. For a controller-driven workflow, capture both controller execution ID and device-side result so responsibility is traceable. Test an invalid or unauthorized request to confirm error handling distinguishes transport/auth/schema failures from device semantic rejection. A 200/204 response or completed job is intermediate evidence, not evidence that forwarding/service intent is satisfied.
Step 3 Where it fails Narrow the fault
Separate source-of-truth/inventory, controller/orchestrator, transport/session, data-model/schema, device configuration datastore and network operational outcome. Authentication success does not show authorization to edit a specific path; schema-valid payload does not show feature support; committed configuration does not show protocol or forwarding convergence. On a failure, stop at the first step that lacks expected state and preserve the request/response plus device identity before retrying. Do not switch from model-driven API to CLI as a blind workaround without understanding whether the problem is transport, schema or feature support. In multi-device automation, partial completion is a first-class state: record exactly which devices changed and verify each before rollback/forward-fix. Re-run the original service-facing check after remediation.
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.
Subtopics
Go one level deeper into this subject.
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.
Subtopic SSH / CLISSH/CLI automation sends normal CLI commands over SSH with libraries like Netmiko, Paramiko or Scrapli and parses the text output, working on almost any device but sensitive to prompts and output formats.
Subtopic NETCONFNETCONF is an XML-based protocol over SSH (port 830) for model-driven configuration, with operations like get-config and edit-config, candidate datastores and commit on supporting Cisco platforms.
Subtopic RESTCONFRESTCONF reference under Cisco Automation in the Automation Domain.
Subtopic YANGYANG is a data modelling language that defines the structure of device configuration and state.
Subtopic Cisco APIsCisco APIs include device-level NETCONF, RESTCONF and NX-API, and controller APIs for Catalyst Center (DNA Center), Meraki Dashboard, ACI APIC and SD-WAN Manager, all usable from Python or Ansible.
Subtopic Configuration CollectionConfiguration collection backs up device configs automatically, such as show running-config via Netmiko, Oxidized or RANCID, storing them in Git so changes can be compared over time.
Subtopic Configuration DeploymentConfiguration deployment pushes changes to Cisco devices from templates and variables, with pre-checks, diff, commit or copy run start and post-checks, one batch of devices at a time.
Subtopic State VerificationState verification checks operational status after a change, such as interfaces up, OSPF or BGP neighbours established and routes present, using show commands parsed with TextFSM, Genie or pyATS.
Subtopic ComplianceCisco compliance automation collects running configs and compares them with required settings — AAA, SSH only, logging, NTP, banners — reporting or fixing devices that do not match.
Subtopic Cisco Automation TroubleshootingTroubleshoot Cisco automation by checking SSH or API reachability and credentials, the device prompt and timeouts in Netmiko, NETCONF or RESTCONF being enabled, YANG model support and the device's logs.
- CLI scraping is fragile; model-driven APIs are more reliable.
- Always back up config before pushing changes.
- Verify operational state after changes, not just config.
ReferenceWhy it matters1 section · depth on demand
In depth
Cisco automation covers the interfaces and tools for automating Cisco platforms: CLI over SSH, NETCONF/RESTCONF/gNMI on IOS XE, NX-OS and IOS XR, NX-API on Nexus, controller APIs (Catalyst Center, SD-WAN Manager, Meraki Dashboard, ACI APIC), and Ansible collections and Terraform providers.
| Platform | Primary interfaces |
|---|---|
| IOS XE | SSH, NETCONF, RESTCONF, gNMI |
| NX-OS | NX-API, NETCONF, gNMI |
| IOS XR | NETCONF, gNMI, commit-based CLI |
| Meraki | Dashboard REST API only |
| Catalyst Center | REST intent API |
Prefer model-driven or controller APIs where available, and keep SSH/CLI for older devices.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
Cisco Automation spans multiple control interfaces and data models rather than one universal command channel. Model-driven APIs such as NETCONF and RESTCONF expose YANG-modeled configuration and operational data, while product APIs, gNMI, CLI/SSH and controller APIs have different transaction, encoding and error semantics. Device identity, software release, feature set and YANG model revision determine which path is valid. The automation layer must keep configuration intent separate from operational verification, because a successfully accepted candidate/config transaction does not show protocol adjacency, forwarding or service behavior. Inventory and source-of-truth data also form a boundary: targeting the wrong device or interface with a syntactically valid payload is an automation failure even when the device accepts it. Cisco automation therefore begins with capability and identity discovery before mutation.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Keep Cisco automation artifacts—templates, YANG paths, API clients, tests and device-group policy—versioned with explicit platform/release assumptions. Validate against representative virtual or physical labs before production, especially when changing models, controller versions or device software. Use least-privilege service identities and separate read/verify access from mutation where practical. Inventory changes, credential rotation and software upgrades should trigger compatibility review because they can change schema, transport or command behavior without changing the automation repository. Prefer bounded use cases with a definition of done and automated tests rather than a single script that branches across every platform. For multi-device changes, define ordering, failure policy and rollback/forward-fix behavior before execution and preserve per-device outcomes instead of collapsing the run into one global status.
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. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.cisco.com/docs/network-automation-delivery-model/network-automation-delivery-model/ · confidence 94%Quick lookup tables
→ Cisco Automation · operational reference
Context-specific ownership, verification, output and failure-boundary lookup for → Cisco Automation.
| Layer | Cisco Automation operational reference |
|---|---|
| Runtime/ownership | Cisco network automation / DevNet current · identify controller/worker/target ownership before mutation |
| Persistent intent | Versioned configuration/playbook/workflow with explicit dependencies and least-privilege identity |
| Verification | Capture device identity/platform/version, API capability (NETCONF/RESTCONF/gNMI/CLI), intended configuration diff and post-change show/telemetry read-back. |
| Expected interpretation | Automation targets the intended Cisco device and interface, uses a supported model/API, applies a bounded diff, and verifies operational state independently of transport success. |
| Recovery boundary | Preserve correlation IDs + pre-state, then verify target/service independently after remediation |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Preserve structured API response codes, NETCONF rpc-errors, YANG paths, device IDs, controller job IDs and before/after property values before converting them to friendly summaries. CLI text is useful when the platform lacks a structured read path, but parse it defensively and retain the exact command/platform context because formatting varies by release. For multi-device work, output must stay keyed by device and resource; “14/15 succeeded” without identifying the failed resource is operationally weak. Separate transport latency, device commit time and post-change convergence time. Redact secrets/tokens but retain correlation IDs and transaction identifiers. When a verification check fails after an accepted configuration change, report it as convergence/service verification failure rather than rewriting the original mutation as a transport failure.