mirror of
https://github.com/dtzp555-max/aci-sim.git
synced 2026-07-21 21:15:12 +00:00
feat: /31 point-to-point spine-ISN underlay + graph physical-links table (v0.20.0)
Spine-to-ISN links now use per-link /31 point-to-point sub-interface pairs (Cisco Multi-Site design guide) instead of a shared /24 with a .254 IPN router; ospfIf/ospfAdjEp carry the pair addresses (ISN CSW LLDP mgmt IP unchanged - device-level address). aci-sim graph follows the autoACI topology view logic: solid ISN uplinks, link-type legend entries, and a physical-links table (fabric links + ISN uplinks with /31 local/remote IPs) under the diagram. Tests updated + strengthened; suite: 908 passed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c926702a29
commit
e52ac1981d
@@ -119,9 +119,12 @@ class TestIsnOspfSubInterfaceAndLldp:
|
||||
store = orchestrator.build_site(repo_topo, site)
|
||||
ospf_ifs = store.by_class("ospfIf")
|
||||
assert ospf_ifs
|
||||
for mo in ospf_ifs:
|
||||
assert mo.attrs["addr"].startswith(f"172.16.{site.id}.")
|
||||
assert mo.attrs["addr"].endswith("/24")
|
||||
spine_ids = sorted(n.id for n in site.spine_nodes())
|
||||
for si, sid in enumerate(spine_ids):
|
||||
mo = next(m for m in ospf_ifs if f"/node-{sid}/" in m.dn)
|
||||
# Per-link /31 point-to-point (Cisco Multi-Site design guide):
|
||||
# spine si owns 172.16.{site}.{2*si}/31, IPN peer is .{2*si+1}.
|
||||
assert mo.attrs["addr"] == f"172.16.{site.id}.{2 * si}/31"
|
||||
|
||||
def test_ospfAdjEp_dn_nests_under_subinterface_segment(self, repo_topo: Topology) -> None:
|
||||
site = repo_topo.site_by_name("LAB1")
|
||||
@@ -133,7 +136,7 @@ class TestIsnOspfSubInterfaceAndLldp:
|
||||
m for m in store.by_class("ospfAdjEp")
|
||||
if f"/node-{sid}/" in m.dn and expected_segment in m.dn
|
||||
)
|
||||
assert adj.attrs["peerIp"] == f"172.16.{site.id}.254"
|
||||
assert adj.attrs["peerIp"] == f"172.16.{site.id}.{2 * si + 1}"
|
||||
|
||||
def test_lldpAdjEp_exists_for_isn_csw_on_physical_port(self, repo_topo: Topology) -> None:
|
||||
site = repo_topo.site_by_name("LAB1")
|
||||
|
||||
@@ -429,8 +429,10 @@ def test_ospf_if_references_real_port(store_name, request):
|
||||
)
|
||||
assert ospf_if.attrs.get("id") == port_id
|
||||
addr = ospf_if.attrs.get("addr", "")
|
||||
assert re.fullmatch(r"172\.16\.\d+\.\d+/24", addr), (
|
||||
f"ospfIf {ospf_if.dn!r} addr {addr!r} is not a 172.16.{{site}}.0/24 address"
|
||||
assert re.fullmatch(r"172\.16\.\d+\.\d+/31", addr), (
|
||||
f"ospfIf {ospf_if.dn!r} addr {addr!r} is not a point-to-point "
|
||||
f"172.16.{{site}}.x/31 address (Cisco Multi-Site: spine-to-IPN "
|
||||
f"links are /31 or /30 p2p sub-interfaces, not a shared LAN)"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user