mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix bug with custom adapters and categories for Docker VM. Fixes https://github.com/GNS3/gns3-gui/issues/2613
This commit is contained in:
1 parent
aa4593c993
commit
74e1463015
4 files changed
+8
-5
No files matched your search
@@ -636,7 +636,7 @@ class Node:
|
||||
break
|
||||
port_name = "eth{}".format(adapter_number)
|
||||
port_name = custom_adapter_settings.get("port_name", port_name)
|
||||
self._ports.append(PortFactory(port_name, 0, adapter_number, 0, "ethernet", short_name="eth{}".format(adapter_number)))
|
||||
self._ports.append(PortFactory(port_name, 0, adapter_number, 0, "ethernet", short_name=port_name))
|
||||
elif self._node_type in ("ethernet_switch", "ethernet_hub"):
|
||||
# Basic node we don't want to have adapter number
|
||||
port_number = 0
|
||||
|
||||
@@ -102,7 +102,7 @@ DOCKER_CREATE_SCHEMA = {
|
||||
"maxLength": 64,
|
||||
"pattern": "^[a-f0-9]+$"
|
||||
},
|
||||
"custom_adapters": CUSTOM_ADAPTERS_ARRAY_SCHEMA # not used at this time
|
||||
"custom_adapters": CUSTOM_ADAPTERS_ARRAY_SCHEMA
|
||||
},
|
||||
"additionalProperties": False,
|
||||
"required": ["name", "image"]
|
||||
@@ -206,7 +206,7 @@ DOCKER_OBJECT_SCHEMA = {
|
||||
"description": "VM status Read only",
|
||||
"enum": ["started", "stopped", "suspended"]
|
||||
},
|
||||
"custom_adapters": CUSTOM_ADAPTERS_ARRAY_SCHEMA # not used at this time
|
||||
"custom_adapters": CUSTOM_ADAPTERS_ARRAY_SCHEMA
|
||||
},
|
||||
"additionalProperties": False,
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
import copy
|
||||
from .appliance import BASE_APPLIANCE_PROPERTIES
|
||||
from .custom_adapters import CUSTOM_ADAPTERS_ARRAY_SCHEMA
|
||||
|
||||
|
||||
DOCKER_APPLIANCE_PROPERTIES = {
|
||||
@@ -75,7 +76,8 @@ DOCKER_APPLIANCE_PROPERTIES = {
|
||||
"description": "Docker extra hosts (added to /etc/hosts)",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
}
|
||||
},
|
||||
"custom_adapters": CUSTOM_ADAPTERS_ARRAY_SCHEMA
|
||||
}
|
||||
|
||||
DOCKER_APPLIANCE_PROPERTIES.update(copy.deepcopy(BASE_APPLIANCE_PROPERTIES))
|
||||
|
||||
Reference in new issue
Block a user