1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Add a vm_directory field to Dynamips / VPCS / IOU

Fix #246
This commit is contained in:
Julien Duponchelle 2015-06-25 11:17:32 +02:00
parent 3bb1509f41
commit ccd3224490
6 changed files with 15 additions and 0 deletions

View File

@ -131,6 +131,7 @@ class Router(BaseVM):
router_info = {"name": self.name,
"vm_id": self.id,
"vm_directory": os.path.join(self.project.module_working_directory(self.manager.module_name.lower())),
"project_id": self.project.id,
"dynamips_id": self._dynamips_id,
"platform": self._platform,

View File

@ -206,6 +206,7 @@ class IOUVM(BaseVM):
iou_vm_info = {"name": self.name,
"vm_id": self.id,
"vm_directory": self.working_dir,
"console": self._console,
"project_id": self.project.id,
"path": self.path,

View File

@ -109,6 +109,7 @@ class VPCSVM(BaseVM):
return {"name": self.name,
"vm_id": self.id,
"vm_directory": self.working_dir,
"status": self.status,
"console": self._console,
"project_id": self.project.id,

View File

@ -527,6 +527,10 @@ VM_OBJECT_SCHEMA = {
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"vm_directory": {
"decription": "Path to the VM working directory",
"type": "string"
},
"project_id": {
"description": "Project UUID",
"type": "string",

View File

@ -180,6 +180,10 @@ IOU_OBJECT_SCHEMA = {
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"vm_directory": {
"decription": "Path to the VM working directory",
"type": "string"
},
"console": {
"description": "console TCP port",
"minimum": 1,

View File

@ -92,6 +92,10 @@ VPCS_OBJECT_SCHEMA = {
"maxLength": 36,
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"vm_directory": {
"decription": "Path to the VM working directory",
"type": "string"
},
"status": {
"description": "VM status",
"enum": ["started", "stopped"]