mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Export vpcs config path
This commit is contained in:
1 parent
985c23a40e
commit
ebb865d973
3 files changed
+23
-2
No files matched your search
@@ -106,7 +106,22 @@ class VPCSVM(BaseVM):
|
||||
"vm_id": self.id,
|
||||
"console": self._console,
|
||||
"project_id": self.project.id,
|
||||
"startup_script": self.startup_script}
|
||||
"startup_script": self.startup_script,
|
||||
"startup_script_path": self.relative_startup_script}
|
||||
|
||||
@property
|
||||
def relative_startup_script(self):
|
||||
"""
|
||||
Returns the startup config file relative to the project directory.
|
||||
|
||||
:returns: path to config file. None if the file doesn't exist
|
||||
"""
|
||||
|
||||
path = os.path.join(self.working_dir, 'startup.vpc')
|
||||
if os.path.exists(path):
|
||||
return 'startup.vpc'
|
||||
else:
|
||||
return None
|
||||
|
||||
@property
|
||||
def vpcs_path(self):
|
||||
|
||||
Reference in new issue
Block a user