Back to Learn

Aruba CX (AOS-CX) โ€” Management

Day-2 inventory, facts and config management for Aruba CX (AOS-CX) data center fabrics (VXLAN/EVPN). Part of the multi-vendor Data Center automation guide.

Aruba
AOS-CX
REST API
VXLAN / EVPN
Model the fabric once in a vendor-neutral inventory
Collect facts from Aruba via API/SSH
Push config from intent, never hand-edit per box

Setup, key commands & run examples

inventory/fabric.yml
Inventory

Describe each Aruba device once โ€” role, mgmt IP and VTEP โ€” so the same workflow targets it and every other vendor in the fabric.

inventory/fabric.yml
yaml
leaf21:
  role: leaf
  vendor: aruba
  mgmt: 10.0.0.21
  vtep: 10.255.0.21
  napalm: aoscx
connect.py
Connect

Open a session to a Aruba CX (AOS-CX) device. NAPALM normalizes facts across vendors using driver "aoscx".

connect.py
python
import napalm

# Aruba CX (AOS-CX) โ€” NAPALM driver "aoscx"
driver = napalm.get_network_driver("aoscx")
dev = driver(hostname="10.0.0.21", username="admin", password="secret")
dev.open()
facts.sh
Day-2 facts

The day-2 management read-outs you will automate on Aruba: version, EVPN peers and interface state.

facts.sh
bash
# inventory & health snapshot โ€” Aruba CX (AOS-CX)
show version
show interface brief
show bgp l2vpn evpn summary

Best practices

  • One intent model, many renderers

    Keep a single fabric description and render Aruba config from it โ€” never SSH in to edit CLI by hand.

  • Prefer structured APIs

    Use NAPALM getters (get_facts, get_interfaces, get_bgp_neighbors) so Aruba returns the same shapes as the rest of the fleet.

  • Version your inventory

    Treat fabric.yml as the source of truth in git; every change is a reviewable PR.

  • Idempotent runs

    Management scripts should be safe to re-run โ€” collect, compare, only change what drifted.

Hands-on exercises

Guided practice tasks โ€” copy the starter snippet, run it against a lab device, and extend it to meet the goal.

Exercise 1
Aruba inventory report

Goal: Connect to the leaf, pull version + model and print one inventory row.

exercise_1
python
import napalm

# Aruba CX (AOS-CX) โ€” NAPALM driver "aoscx"
driver = napalm.get_network_driver("aoscx")
dev = driver(hostname="10.0.0.21", username="admin", password="secret")
dev.open()
# TODO: print hostname, model and OS version
Exercise 2
Interface drift check

Goal: Compare live interface admin/oper state against the intended list and report mismatches.

exercise_2
python
intended = {"Ethernet1", "Ethernet2"}
# TODO: read live interfaces and report any intended port that is down

Curated videos & guides

Checklist โ€” pitfalls, gotchas & verification

Common pitfalls

  • โ€ขScreen-scraping Aruba CLI when a structured API exists โ€” output formats change between releases.
  • โ€ขStoring credentials in the script instead of a vault / env vars.
  • โ€ขEditing boxes by hand so the inventory no longer matches reality.

Gotchas to watch

  • โ€ขNAPALM driver "aoscx" must match transport โ€” confirm SSH/API is enabled on the device.
  • โ€ขManagement VRF: make sure your reachability is over the mgmt VRF, not the data plane.

Verify it works

  • โ€ขRe-run the report and confirm every device returns facts.
  • โ€ขConfirm the inventory row matches the physical device (model, serial, OS).