mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 06:48:18 +00:00
Use the project working directory for VPCS VM
This commit is contained in:
@ -33,11 +33,13 @@ class BaseVM:
|
||||
|
||||
# TODO: When delete release console ports
|
||||
|
||||
|
||||
@property
|
||||
def project(self):
|
||||
"""Return VM current project"""
|
||||
return self._project
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@ -48,6 +50,7 @@ class BaseVM:
|
||||
|
||||
return self._name
|
||||
|
||||
|
||||
@name.setter
|
||||
def name(self, new_name):
|
||||
"""
|
||||
@ -58,6 +61,7 @@ class BaseVM:
|
||||
|
||||
self._name = new_name
|
||||
|
||||
|
||||
@property
|
||||
def uuid(self):
|
||||
"""
|
||||
@ -68,6 +72,7 @@ class BaseVM:
|
||||
|
||||
return self._uuid
|
||||
|
||||
|
||||
@property
|
||||
def manager(self):
|
||||
"""
|
||||
@ -78,6 +83,16 @@ class BaseVM:
|
||||
|
||||
return self._manager
|
||||
|
||||
|
||||
@property
|
||||
def working_dir(self):
|
||||
"""
|
||||
Return VM working directory
|
||||
"""
|
||||
|
||||
return self._project.vm_working_directory(self._uuid)
|
||||
|
||||
|
||||
def create(self):
|
||||
"""
|
||||
Creates the VM.
|
||||
@ -85,6 +100,7 @@ class BaseVM:
|
||||
|
||||
return
|
||||
|
||||
|
||||
def start(self):
|
||||
"""
|
||||
Starts the VM process.
|
||||
@ -92,6 +108,7 @@ class BaseVM:
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def stop(self):
|
||||
"""
|
||||
Starts the VM process.
|
||||
|
Reference in New Issue
Block a user