CLI recipes¶
Copy/paste examples from the real parser. Global flags may sit before or after the command.
Login:
eve-iac login --username admin --password secret
Session:
eve-iac session
Validate:
eve-iac validate ./lab
Import (first adoption; does not mutate source_lab):
eve-iac import ./imported-lab
Load (attach only; local marker, no agent on this step):
eve-iac load /Customers/OSPF.unl
eve-iac load /Customers/OSPF.unl ./IaC/ospf-watch
Then on the LOAD directory: status, inspect, exec start|stop|wipe, and link quality|suspend|resume. See LOAD mode.
Plan:
eve-iac plan ./lab
Deploy:
eve-iac deploy ./lab
Reconcile to EVE (live-safe; omitted --yes):
eve-iac reconcile ./lab --direction to_eve
Disruptive remaining work (explicit second call):
eve-iac --yes reconcile ./lab --direction to_eve --plan-identity <P>
--yes does not invent <P>. Copy plan_identity from the previous plan or live-only reconcile. Mismatch → 409 plan_stale, exit 10, zero StopNode.
Pull / reconcile from EVE (updates Git via commit_pulled when the payload says so):
eve-iac reconcile ./lab --direction from_eve
Start:
eve-iac exec ./lab start
Stop:
eve-iac exec ./lab stop
Wipe:
eve-iac exec ./lab wipe --yes
Export the running configuration into an existing startup-config set. --configset is required. Repeat --node to limit the nodes. --yes is required. This does not write topology.yml or configs/**. Pull with reconcile --direction from_eve afterwards if that blob should become Git intent. LOAD mode rejects the command. An unknown set is not created.
eve-iac export-config ./lab --configset default --yes
eve-iac export-config ./lab --configset backup --node n_1 --node n_2 --yes
Live link quality. Omit --save for live NETEM only. --save persists the UNL (admin, unlocked lab) and does not rewrite topology.yml:
eve-iac link quality ./lab --from n_1:e0/0 --to n_2:e0/1 --delay 50 --loss 1
eve-iac link quality ./lab --from n_1:e0/0 --to n_2:e0/1 --delay 50 --save
Suspend / resume:
eve-iac link suspend ./lab --from n_1:e0/0 --to n_2:e0/1 --side source
eve-iac link resume ./lab --from n_1:e0/0 --to n_2:e0/1
JSON:
eve-iac plan ./lab --json
jq:
eve-iac plan ./lab --json | jq .
Health with explicit URL and CA (preferred):
eve-iac --url https://eve.example:8787 --ca-file ./eve-iac-ca.pem health
Lab/dev skip-verify (repeat --insecure; not for CI):
eve-iac --url https://192.168.48.112:8787 --insecure health
Replace an existing managed lab:
eve-iac deploy ./lab --replace --yes
Prune extra live objects (to_eve only). If remaining work is requires_stop, pass --plan-identity as well:
eve-iac --yes reconcile ./lab --prune --plan-identity <P>
Destroy:
eve-iac destroy ./lab --yes
Inspect with cache bypass:
eve-iac inspect ./lab --refresh
One node:
eve-iac exec ./lab start --node n_1
Console bootstrap (Day-0, before SSH): Day-0 console.
OOB SSH, then an inventory. Generate does not log in and does not start OOB:
eve-iac oob start ./IaC/sample
eve-iac inventory targets
eve-iac inventory generate ./IaC/sample --target ansible
eve-iac inventory generate ./IaC/sample --target netmiko --stdout
GitLab CI and GitHub Actions: GitLab CI, GitHub Actions. Pipeline shape: Git-driven workflow.