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:
YueGuobin committed 2026-08-21 21:41:35 +08:00
1 parent d64f47afa4
commit f524e9a713
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":