mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +02:00
appliance: seed netmiko_device_type from the appliance file
Both the v1-6 and v8 appliance models accept an optional top-level netmiko_device_type, and ApplianceToTemplate copies it into the created template so installed appliances carry the automation hint end to end.
This commit is contained in:
3 files changed
+43
No files matched your search
@@ -58,6 +58,9 @@ class ApplianceToTemplate:
|
||||
if "tags" in appliance_config:
|
||||
new_template["tags"] = appliance_config.get("tags")
|
||||
|
||||
if appliance_config.get("netmiko_device_type"):
|
||||
new_template["netmiko_device_type"] = appliance_config["netmiko_device_type"]
|
||||
|
||||
if new_template.get("symbol") is None:
|
||||
if appliance_config["category"] == "guest":
|
||||
if "docker" in appliance_config:
|
||||
@@ -172,6 +175,9 @@ class ApplianceToTemplate:
|
||||
if "tags" in appliance_config:
|
||||
new_template["tags"] = appliance_config.get("tags")
|
||||
|
||||
if appliance_config.get("netmiko_device_type"):
|
||||
new_template["netmiko_device_type"] = appliance_config["netmiko_device_type"]
|
||||
|
||||
if not new_template.get("symbol"):
|
||||
# apply a default symbol based on the category and template type
|
||||
if appliance_config["category"] == "guest":
|
||||
|
||||
Reference in new issue
Block a user