mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
revert IOL port-name override; document custom_adapters instead
_get_container_ifname only names the kernel interface inside the
container's network namespace (single call site: docker move_to_ns) -
IOL never uses that path, and the controller port list never reads it.
Name the ports through the template's custom_adapters instead (the
mechanism SR Linux appliances use for mgmt0/e1-1): adapter N shows as
Ethernet{N/4}/{N%4}, matching the IOS CLI, with no server-side changes.
This commit is contained in:
3 files changed
+13
-28
No files matched your search
@@ -177,20 +177,6 @@ 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()
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user