mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Definitions of port and adapter
This commit is contained in:
parent
49f012cf4c
commit
d86e880ff7
@ -13,8 +13,8 @@ SERVER: Python/3.4 GNS3/1.3.dev1
|
|||||||
X-ROUTE: /v1/projects/{project_id}
|
X-ROUTE: /v1/projects/{project_id}
|
||||||
|
|
||||||
{
|
{
|
||||||
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp95msfptc",
|
"location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5cndh7nh",
|
||||||
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp95msfptc/00010203-0405-0607-0809-0a0b0c0d0e0f",
|
"path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5cndh7nh/00010203-0405-0607-0809-0a0b0c0d0e0f",
|
||||||
"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f",
|
"project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f",
|
||||||
"temporary": false
|
"temporary": false
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}
|
|||||||
"l1_keepalives": false,
|
"l1_keepalives": false,
|
||||||
"name": "PC TEST 1",
|
"name": "PC TEST 1",
|
||||||
"nvram": 128,
|
"nvram": 128,
|
||||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_get0/iou.bin",
|
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_get0/iou.bin",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"ram": 256,
|
"ram": 256,
|
||||||
"serial_adapters": 2,
|
"serial_adapters": 2,
|
||||||
"vm_id": "3ab57efc-4016-4898-ac4c-6e804ed8d429"
|
"vm_id": "548ed6e5-2ab6-421d-8f85-9dee638617fb"
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}
|
|||||||
"name": "VMTEST",
|
"name": "VMTEST",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"use_any_adapter": false,
|
"use_any_adapter": false,
|
||||||
"vm_id": "3e6ed300-eefc-4582-80f0-acbdba7e2b9b",
|
"vm_id": "f70dc1dd-563e-46cc-9cf7-bb169730b8e2",
|
||||||
"vmname": "VMTEST"
|
"vmname": "VMTEST"
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}
|
|||||||
"name": "PC TEST 1",
|
"name": "PC TEST 1",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"startup_script": null,
|
"startup_script": null,
|
||||||
"vm_id": "b4ff501b-c24d-4f0c-854b-8163e31b9a8e"
|
"vm_id": "ed3e4572-df65-4581-9332-324e749d480a"
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms' -d '{"ethernet_adapters": 0, "iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_create_with_params0/iourc", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
|
curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms' -d '{"ethernet_adapters": 0, "iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iourc", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}'
|
||||||
|
|
||||||
POST /projects/{project_id}/iou/vms HTTP/1.1
|
POST /projects/{project_id}/iou/vms HTTP/1.1
|
||||||
{
|
{
|
||||||
"ethernet_adapters": 0,
|
"ethernet_adapters": 0,
|
||||||
"iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_create_with_params0/iourc",
|
"iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iourc",
|
||||||
"l1_keepalives": true,
|
"l1_keepalives": true,
|
||||||
"name": "PC TEST 1",
|
"name": "PC TEST 1",
|
||||||
"nvram": 512,
|
"nvram": 512,
|
||||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_create_with_params0/iou.bin",
|
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iou.bin",
|
||||||
"ram": 1024,
|
"ram": 1024,
|
||||||
"serial_adapters": 4
|
"serial_adapters": 4
|
||||||
}
|
}
|
||||||
@ -27,9 +27,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms
|
|||||||
"l1_keepalives": true,
|
"l1_keepalives": true,
|
||||||
"name": "PC TEST 1",
|
"name": "PC TEST 1",
|
||||||
"nvram": 512,
|
"nvram": 512,
|
||||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_iou_create_with_params0/iou.bin",
|
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iou.bin",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"ram": 1024,
|
"ram": 1024,
|
||||||
"serial_adapters": 4,
|
"serial_adapters": 4,
|
||||||
"vm_id": "b6a61d51-7225-4f4a-904a-54c8a8917b87"
|
"vm_id": "12acb1c1-304e-4c3e-81c4-23c52e6c01ba"
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms
|
|||||||
"name": "VM1",
|
"name": "VM1",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"use_any_adapter": false,
|
"use_any_adapter": false,
|
||||||
"vm_id": "7abbfc73-3d92-4e31-a99c-3b9519b2e0e8",
|
"vm_id": "ad5dba5d-0219-41a0-9bd3-eaca69649f6c",
|
||||||
"vmname": "VM1"
|
"vmname": "VM1"
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms
|
|||||||
"name": "PC TEST 1",
|
"name": "PC TEST 1",
|
||||||
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
"project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80",
|
||||||
"startup_script": null,
|
"startup_script": null,
|
||||||
"vm_id": "b481d455-16d3-450f-bcec-afdf1ec0c682"
|
"vm_id": "6c343265-dc55-4bfe-8d4e-f3f21eeeca8d"
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_update_path_project_non_l0"}'
|
curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_update_path_project_non_l0"}'
|
||||||
|
|
||||||
PUT /projects/{project_id} HTTP/1.1
|
PUT /projects/{project_id} HTTP/1.1
|
||||||
{
|
{
|
||||||
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2249/test_update_path_project_non_l0"
|
"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_update_path_project_non_l0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ Add a NIO to a IOU instance
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **port_number**: Port where the nio should be added
|
|
||||||
- **adapter_number**: Network adapter where the nio is located
|
- **adapter_number**: Network adapter where the nio is located
|
||||||
|
- **port_number**: Port where the nio should be added
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ Remove a NIO from a IOU instance
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **port_number**: Port from where the nio should be removed
|
|
||||||
- **adapter_number**: Network adapter where the nio is located
|
- **adapter_number**: Network adapter where the nio is located
|
||||||
|
- **port_number**: Port from where the nio should be removed
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ Parameters
|
|||||||
**********
|
**********
|
||||||
- **port_id**: Port in the adapter (always 0 for virtualbox)
|
- **port_id**: Port in the adapter (always 0 for virtualbox)
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **adapter_id**: Adapter where the nio should be added
|
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
- **adapter_id**: Adapter where the nio should be added
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
@ -29,8 +29,8 @@ Parameters
|
|||||||
**********
|
**********
|
||||||
- **port_id**: Port in the adapter (always 0 for virtualbox)
|
- **port_id**: Port in the adapter (always 0 for virtualbox)
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **adapter_id**: Adapter from where the nio should be removed
|
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
- **adapter_id**: Adapter from where the nio should be removed
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
|
@ -10,8 +10,8 @@ Start a packet capture on a VirtualBox VM instance
|
|||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **adapter_id**: Adapter to start a packet capture
|
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
- **adapter_id**: Adapter to start a packet capture
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
|
@ -10,8 +10,8 @@ Stop a packet capture on a VirtualBox VM instance
|
|||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **adapter_id**: Adapter to stop a packet capture
|
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
- **adapter_id**: Adapter to stop a packet capture
|
||||||
|
|
||||||
Response status codes
|
Response status codes
|
||||||
**********************
|
**********************
|
||||||
|
@ -9,8 +9,8 @@ Add a NIO to a VPCS instance
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **port_number**: Port where the nio should be added
|
|
||||||
- **adapter_number**: Network adapter where the nio is located
|
- **adapter_number**: Network adapter where the nio is located
|
||||||
|
- **port_number**: Port where the nio should be added
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
|
||||||
@ -27,8 +27,8 @@ Remove a NIO from a VPCS instance
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
**********
|
**********
|
||||||
- **port_number**: Port from where the nio should be removed
|
|
||||||
- **adapter_number**: Network adapter where the nio is located
|
- **adapter_number**: Network adapter where the nio is located
|
||||||
|
- **port_number**: Port from where the nio should be removed
|
||||||
- **vm_id**: UUID for the instance
|
- **vm_id**: UUID for the instance
|
||||||
- **project_id**: UUID for the project
|
- **project_id**: UUID for the project
|
||||||
|
|
||||||
|
@ -10,3 +10,24 @@ JSON like that
|
|||||||
"status": 409,
|
"status": 409,
|
||||||
"message": "Conflict"
|
"message": "Conflict"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Glossary
|
||||||
|
========
|
||||||
|
|
||||||
|
VM
|
||||||
|
---
|
||||||
|
|
||||||
|
A Virtual Machine (Dynamips, IOU, Qemu, VPCS...)
|
||||||
|
|
||||||
|
Adapter
|
||||||
|
-------
|
||||||
|
|
||||||
|
The physical network interface. The adapter can contain multiple ports.
|
||||||
|
|
||||||
|
Port
|
||||||
|
----
|
||||||
|
|
||||||
|
A port is an opening on network adapter that cable plug into.
|
||||||
|
|
||||||
|
For example a VM can have a serial and an ethernet adapter plugged in.
|
||||||
|
The ethernet adapter can have 4 ports.
|
||||||
|
Loading…
Reference in New Issue
Block a user