mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
Merge pull request #158 from GNS3/keep_iou_config
Do not erase the IOU initial-config if there is one when creating the IOU VM.
This commit is contained in:
commit
4f021054e0
3 files changed
+26
-2
No files matched your search
@@ -58,6 +58,8 @@ class IOUHandler:
|
||||
|
||||
for name, value in request.json.items():
|
||||
if hasattr(vm, name) and getattr(vm, name) != value:
|
||||
if name == "initial_config_content" and (vm.initial_config_content and len(vm.initial_config_content) > 0):
|
||||
continue
|
||||
setattr(vm, name, value)
|
||||
response.set_status(201)
|
||||
response.json(vm)
|
||||
|
||||
Reference in new issue
Block a user