Automation, Orchestration & AI
Cheat sheet · https://pcornel.dk/topic.php?topic=100
Answer
Good automation rests on idempotency (running a change twice gives the same result), a source of truth (one authoritative record of intended state), validation before and after changes, orchestrated workflows, and human review of AI-generated suggestions.
Remember
Desired state lives in the source of truth (NetBox, Git), not on devices. Every run: render config from data → validate (lint, schema) → dry run → apply → verify by reading state back. Treat AI-generated configuration like code from a new colleague: review and test it before use.
First checks
curl -sk -u <user>:<pw> -H 'Accept: application/yang-data+json' https://<device>/restconf/data/ietf-interfaces:interfaces— RESTCONF read.curl -i— HTTP status code and headers (200 OK, 201 Created, 204 No Content, 400, 401, 403, 404).python3 -m json.tool < file.json/jq . file.json— JSON valid and readable.show netconf-yang status/show platform software yang-management process— device API agents running.show ip http server status— HTTPS server for RESTCONF.
Verify in this order
source of truth → data validated → API or tool authenticated → change applied idempotently → state read back → matches intent
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=100