mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
parent
2a159c06c5
commit
aff5554528
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user