mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Compatybility with controller, default_symbol and hover_symbol, Fixes: #2444
This commit is contained in:
1 parent
c714c9c8de
commit
05b6be2e42
2 files changed
+60
-1
No files matched your search
@@ -121,8 +121,21 @@ class Controller:
|
||||
for vm in vms:
|
||||
# remove deprecated properties
|
||||
for prop in vm.copy():
|
||||
if prop in ["enable_remote_console", "use_ubridge"]:
|
||||
if prop in ["enable_remote_console", "use_ubridge", "default_symbol", "hover_symbol"]:
|
||||
del vm[prop]
|
||||
|
||||
# remove deprecated default_symbol and hover_symbol
|
||||
# and set symbol if not present
|
||||
deprecated = ["default_symbol", "hover_symbol"]
|
||||
if len([prop for prop in vm.keys() if prop in deprecated]) > 0:
|
||||
if "default_symbol" in vm.keys():
|
||||
del vm["default_symbol"]
|
||||
if "hover_symbol" in vm.keys():
|
||||
del vm["hover_symbol"]
|
||||
|
||||
if "symbol" not in vm.keys():
|
||||
vm["symbol"] = ":/symbols/computer.svg"
|
||||
|
||||
vm.setdefault("appliance_id", str(uuid.uuid4()))
|
||||
try:
|
||||
appliance = Appliance(vm["appliance_id"], vm)
|
||||
|
||||
Reference in new issue
Block a user