mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-28 08:24:34 +02:00
templates: persist appliance metadata on install
Appliance fields that describe the appliance (vendor information, default credentials, installation instructions...) were dropped when installing a template. Keep them in a new appliance_metadata JSON column on the templates table, filled by the appliance-to-template conversion for both registry v1-6 and v8 (version level values override the appliance level ones). The nested schema allows extra fields so future registry fields persist without a migration.
This commit is contained in:
7 files changed
+216
No files matched your search
@@ -97,6 +97,10 @@ async def test_install_docker_version_skips_image_resolution(monkeypatch):
|
||||
assert template["template_type"] == "docker"
|
||||
# the version image name is injected into the template
|
||||
assert template["image"] == "xrd:1.0"
|
||||
# appliance metadata survives the install and validates through TemplateCreate
|
||||
metadata = template["appliance_metadata"]
|
||||
assert metadata["vendor_name"] == "Test vendor"
|
||||
assert metadata["appliance_id"] == appliance.id
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in new issue
Block a user