mirror of
https://github.com/dtzp555-max/aci-sim.git
synced 2026-07-22 21:45:10 +00:00
Closes F10: the sim silently stored out-of-range/malformed scalar values
(e.g. vlan-9999, IP 999.888.777.x) that real APIC/NDO reject server-side.
New aci_sim/rest_aci/validators.py: table-driven RULES {(class,prop) -> validator}
(range/enum/IP·MAC-format/vlan-encap). Enforced in writes.py::_validate_planned
(APIC) and ndo/patch.py::apply_json_patch (NDO) before any store mutation.
Fail-safe default-allow: only registered (class,prop) validated; unknown pass.
Bad values now -> APIC Error 103 Malformed MO body. ~45 rules / ~18 classes.
Constraints sourced from vendored cisco.aci arg-specs + standard ACI ranges,
cross-checked against the real-machine var corpus for zero false-rejects
(regression: full create_tenant MS-TN1 + SF-TN1 chains stay green). +176 tests
(1098 passed). Referential integrity split out as F11 (needs real-APIC study).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zdUTqU9fvCCvF3uVGZsu1
71 lines
2.1 KiB
TOML
71 lines
2.1 KiB
TOML
[project]
|
|
name = "aci-sim"
|
|
version = "0.23.0"
|
|
description = "Faithful REST simulator of a 2-site Cisco ACI fabric (per-site APIC + ND/NDO)"
|
|
readme = "README.md"
|
|
license = "PolyForm-Noncommercial-1.0.0"
|
|
authors = [
|
|
{ name = "aci-sim contributors" },
|
|
]
|
|
requires-python = ">=3.11"
|
|
classifiers = [
|
|
# No license classifier: the SPDX `license` field above supersedes
|
|
# license classifiers (PEP 639)
|
|
# and modern setuptools rejects having both.
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: System Administrators",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
"Topic :: System :: Networking",
|
|
"Topic :: Software Development :: Testing",
|
|
"Typing :: Typed",
|
|
]
|
|
# Runtime dependencies are declared statically here (NOT `dynamic`) so that a
|
|
# plain `pip install aci-sim` / `pip install .` pulls them in. requirements.txt
|
|
# is kept as a dev convenience (it also lists the test-only extras below).
|
|
dependencies = [
|
|
"fastapi>=0.110",
|
|
"uvicorn[standard]>=0.29",
|
|
"pydantic>=2.6",
|
|
"pyyaml>=6.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
# Test/dev-only — not needed to run the simulator. `pip install -e '.[dev]'`.
|
|
dev = [
|
|
"httpx>=0.27",
|
|
"pytest>=8.0",
|
|
"pytest-asyncio>=0.23",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/dtzp555-max/aci-sim"
|
|
Repository = "https://github.com/dtzp555-max/aci-sim"
|
|
Changelog = "https://github.com/dtzp555-max/aci-sim/blob/main/CHANGELOG.md"
|
|
|
|
[project.scripts]
|
|
aci-sim = "aci_sim.cli:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
# Auto-discover ALL subpackages (aci_sim.topology/build/rest_aci/ndo/
|
|
# mit/runtime/query/control/...) — a bare `packages = ["aci_sim"]` would
|
|
# ship only the top-level module and omit every subpackage.
|
|
include = ["aci_sim*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py311"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B"]
|
|
ignore = ["E501"]
|