mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fixes initial-configs that were not restored when opening a project containing IOU VMs.
This commit is contained in:
1 parent
e367f95f96
commit
aeab9780d8
2 files changed
+6
-10
No files matched your search
@@ -317,9 +317,9 @@ class IOUVM(BaseVM):
|
||||
"""
|
||||
|
||||
if self.initial_config_file:
|
||||
content = self.initial_config
|
||||
content = self.initial_config_content
|
||||
content = content.replace(self._name, new_name)
|
||||
self.initial_config = content
|
||||
self.initial_config_content = content
|
||||
|
||||
super(IOUVM, IOUVM).name.__set__(self, new_name)
|
||||
|
||||
@@ -939,7 +939,7 @@ class IOUVM(BaseVM):
|
||||
log.warn("could not determine if layer 1 keepalive messages are supported by {}: {}".format(os.path.basename(self._path), e))
|
||||
|
||||
@property
|
||||
def initial_config(self):
|
||||
def initial_config_content(self):
|
||||
"""
|
||||
Returns the content of the current initial-config file.
|
||||
"""
|
||||
@@ -952,10 +952,10 @@ class IOUVM(BaseVM):
|
||||
with open(config_file) as f:
|
||||
return f.read()
|
||||
except OSError as e:
|
||||
raise IOUError("Can't read configuration file '{}'".format(config_file))
|
||||
raise IOUError("Can't read configuration file '{}': {}".format(config_file, e))
|
||||
|
||||
@initial_config.setter
|
||||
def initial_config(self, initial_config):
|
||||
@initial_config_content.setter
|
||||
def initial_config_content(self, initial_config):
|
||||
"""
|
||||
Update the initial config
|
||||
|
||||
|
||||
Reference in new issue
Block a user