mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 23:01:15 +02:00
appliance: close the v8 gaps for Docker vendor appliances
DockerPropertiesV8 now accepts custom_adapters (already available to v1-6 top-level appliances and to Qemu v8 properties), so port-named Docker appliances (XRd, SR Linux) can move to the v8 format without losing their interface naming. Appliance.type resolves the node type from the v8 settings template_type (default set first) instead of misclassifying every v8 appliance as qemu, and _get_default_symbol applies the docker guest symbol to v8 Docker guest appliances.
This commit is contained in:
4 files changed
+149
-1
No files matched your search
@@ -71,6 +71,17 @@ class Appliance:
|
||||
@property
|
||||
def type(self):
|
||||
|
||||
if self._data.get("registry_version", 0) >= 8:
|
||||
# registry version 8: the node type comes from the settings template_type,
|
||||
# the default settings take precedence over the other sets
|
||||
settings_list = self._data.get("settings") or []
|
||||
for settings in settings_list:
|
||||
if settings.get("default"):
|
||||
return settings.get("template_type", "qemu")
|
||||
if settings_list:
|
||||
return settings_list[0].get("template_type", "qemu")
|
||||
return "qemu"
|
||||
|
||||
if "iou" in self._data:
|
||||
return "iou"
|
||||
elif "dynamips" in self._data:
|
||||
|
||||
Reference in new issue
Block a user