diff --git a/gns3server/controller/appliance.py b/gns3server/controller/appliance.py index 3b035d60..8f564913 100644 --- a/gns3server/controller/appliance.py +++ b/gns3server/controller/appliance.py @@ -35,6 +35,8 @@ class Appliance: else: self._id = appliance_id self._data = data + if "linked_base" in data: + self._data["linked_clone"] = data.pop("linked_base") self._builtin = builtin @property diff --git a/tests/controller/test_appliance.py b/tests/controller/test_appliance.py index 326e514b..ce35e29e 100644 --- a/tests/controller/test_appliance.py +++ b/tests/controller/test_appliance.py @@ -37,3 +37,21 @@ def test_appliance_json(): "symbol": "qemu.svg", "compute_id": "local" } + + +def test_appliance_fix_linked_base(): + """ + Version of the gui before 2.1 use linked_base and the server + linked_clone + """ + a = Appliance(None, { + "node_type": "qemu", + "name": "Test", + "default_name_format": "{name}-{0}", + "category": 0, + "symbol": "qemu.svg", + "server": "local", + "linked_base": True + }) + assert a.data["linked_clone"] + assert "linked_base" not in a.data