mirror of
https://github.com/dtzp555-max/aci-sim.git
synced 2026-07-21 21:15:12 +00:00
aci-sim is a stateful REST simulator of a 2-site Cisco ACI fabric (per-site APIC + ND/NDO management planes) — for testing ACI automation (Ansible cisco.aci / cisco.mso, aci-py, custom REST clients) and CI gates without real hardware. Highlights: APIC + NDO REST surface served from one in-memory MIT built from a declarative topology.yaml; port mode + sandbox (real per-device IPs on :443) run modes; LLDP/CDP neighbor visibility; NDO->APIC deploy mirror (multi-site templates materialize onto the target sites' APIC stores); real-APIC fvBD default attributes; file-backed state save/restore; an `aci-sim` CLI (validate/show/graph/run/new/init/lldp); and an 888-test suite. History squashed for the public release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
20 lines
1.1 KiB
Python
20 lines
1.1 KiB
Python
import os
|
|
|
|
APIC_A_PORT: int = int(os.environ.get("APIC_A_PORT", "8443"))
|
|
APIC_B_PORT: int = int(os.environ.get("APIC_B_PORT", "8444"))
|
|
NDO_PORT: int = int(os.environ.get("NDO_PORT", "8445"))
|
|
CERT_FILE: str = os.environ.get("CERT_FILE", "certs/sim.crt")
|
|
KEY_FILE: str = os.environ.get("KEY_FILE", "certs/sim.key")
|
|
TOPOLOGY_PATH: str = os.environ.get("TOPOLOGY_PATH", "topology.yaml")
|
|
|
|
# Default bind address for the non-sandbox servers (#23). Defaults to loopback
|
|
# so the unauthenticated /_sim control plane is never LAN-exposed by accident.
|
|
# Set SIM_BIND=0.0.0.0 explicitly for LAN deployments (e.g. the Raspberry Pi
|
|
# standing deployment, which is accessed from other hosts on the LAN).
|
|
SIM_BIND: str = os.environ.get("SIM_BIND", "127.0.0.1")
|
|
|
|
# Sandbox mode: bind each controller to its own mgmt_ip on :443 (via lo0 aliases),
|
|
# so autoACI connects by IP with no port — like real gear. Set by scripts/sandbox-up.sh.
|
|
SANDBOX: bool = os.environ.get("SIM_SANDBOX", "").strip().lower() in ("1", "true", "yes", "on")
|
|
SANDBOX_PORT: int = int(os.environ.get("SIM_SANDBOX_PORT", "443"))
|