Rename old properties from gui linked_base to linked_clone

Fix #1034
pull/1036/head
Julien Duponchelle 7 years ago
parent 2a159c06c5
commit aff5554528
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -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…
Cancel
Save