mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +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
@@ -105,15 +105,6 @@ class IOLDockerVM(VendorDockerVM):
|
||||
volumes.append(needed)
|
||||
return volumes
|
||||
|
||||
def _get_container_ifname(self, adapter_number):
|
||||
"""
|
||||
Override: name ports after the IOL interface they map to
|
||||
(Ethernet0/0, Ethernet0/1, … — a new 4-port unit every four
|
||||
adapters), so what the GNS3 UI shows matches the IOS CLI. Wiring is
|
||||
unaffected: the flat adapter number remains the socket index.
|
||||
"""
|
||||
return f"Ethernet{adapter_number // 4}/{adapter_number % 4}"
|
||||
|
||||
async def start(self):
|
||||
|
||||
await self._prepare_iol_runtime()
|
||||
|
||||
Reference in new issue
Block a user