feat: show IOL-style interface names on iol-runner ports

Name ports after the IOL interface they map to (Ethernet0/0, one 4-port
unit per adapter range) via the _get_container_ifname override point, so
the GNS3 UI matches the IOS CLI. Display only — the flat adapter number
remains the socket index.
This commit is contained in:
YueGuobin committed 2026-09-05 21:54:12 +08:00
1 parent cd17306372
commit 4c818c6b37
3 files changed
+24 -1

No files matched your search

@@ -177,6 +177,20 @@ def test_iol_memory_knob(compute_project, manager):
assert vm._iol_memory == 2048
# ---------------------------------------------------------------------------
# Port naming
# ---------------------------------------------------------------------------
def test_ports_are_named_after_iol_interfaces(compute_project, manager):
vm = _make_vm(compute_project, manager, adapters=8)
assert vm._get_container_ifname(0) == "Ethernet0/0"
assert vm._get_container_ifname(3) == "Ethernet0/3"
# the second 4-port unit starts its own slot numbering
assert vm._get_container_ifname(4) == "Ethernet1/0"
assert vm._get_container_ifname(7) == "Ethernet1/3"
# ---------------------------------------------------------------------------
# create()
# ---------------------------------------------------------------------------