mirror of
https://github.com/dtzp555-max/aci-sim.git
synced 2026-07-21 21:15:12 +00:00
feat(isn): VLAN-4 routed sub-interface + addr on spine ISN ospfIf; ISN-CSW LLDP neighbor (v0.19.0)
Real ACI multi-site spines carry the OSPF address toward the ISN on a
routed sub-interface, not the bare port: ospfIf id/dn are now
eth1/{49+si}.4 with addr=172.16.{site}.{si+1}/24 (same /24 as the
existing .254 peer); ospfAdjEp nests under the sub-if. Each spine ISN
uplink physical port also gets an ISN-CSW lldpAdjEp/cdpAdjEp
(sysName ISN-CSW{site}, portIdV Ethernet1/{si+1}, model N9K-C9364C,
locally-administered 02:1B:0D MAC hashed from site.id). Single-site
fabrics build none of this. Closes the autoACI Fabric (physical) gap
where spine uplink rows showed blank Local IP / Neighbor Port.
908 tests green.
This commit is contained in:
@@ -405,6 +405,11 @@ def test_ospf_adj_ep_sits_on_an_ospf_if(store_name, request):
|
||||
|
||||
@pytest.mark.parametrize("store_name", _ALL_STORES)
|
||||
def test_ospf_if_references_real_port(store_name, request):
|
||||
"""ospfIf is now the routed VLAN-4 sub-interface of the spine's ISN
|
||||
uplink port (id/dn end in ".4", e.g. "eth1/49.4") — real LLDP/physical
|
||||
port state stays on the base port, so this resolves the underlying
|
||||
l1PhysIf via the base port (ifId.split('.')[0]), same fallback autoACI's
|
||||
topology code uses."""
|
||||
store = request.getfixturevalue(store_name)
|
||||
ports = _l1physif_ports(store)
|
||||
ifs = store.by_class("ospfIf")
|
||||
@@ -413,11 +418,17 @@ def test_ospf_if_references_real_port(store_name, request):
|
||||
m = re.search(r"/node-(\d+)/sys/ospf/.*?/if-\[([^\]]+)\]", ospf_if.dn)
|
||||
assert m is not None, f"unparsable ospfIf dn {ospf_if.dn!r}"
|
||||
node_id, port_id = int(m.group(1)), m.group(2)
|
||||
assert port_id in ports.get(node_id, set()), (
|
||||
f"ospfIf {ospf_if.dn!r} references {port_id!r} on node {node_id}, "
|
||||
f"which has no matching l1PhysIf"
|
||||
assert port_id.endswith(".4"), f"ospfIf {ospf_if.dn!r} id {port_id!r} is not a VLAN-4 sub-if"
|
||||
base_port = port_id.split(".")[0]
|
||||
assert base_port in ports.get(node_id, set()), (
|
||||
f"ospfIf {ospf_if.dn!r} references base port {base_port!r} on node "
|
||||
f"{node_id}, which has no matching l1PhysIf"
|
||||
)
|
||||
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"
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user