1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Rename old properties from gui linked_base to linked_clone

Fix #1034
This commit is contained in:
Julien Duponchelle 2017-05-16 10:33:37 +02:00
parent 2a159c06c5
commit aff5554528
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 20 additions and 0 deletions

View File

@ -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

View File

@ -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