From d86e880ff779b58b74b0ccc1c7a5ea6badb75ec6 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 13 Feb 2015 18:40:40 +0100 Subject: [PATCH] Definitions of port and adapter --- docs/api/examples/get_projectsprojectid.txt | 4 ++-- .../get_projectsprojectidiouvmsvmid.txt | 4 ++-- ...get_projectsprojectidvirtualboxvmsvmid.txt | 2 +- .../get_projectsprojectidvpcsvmsvmid.txt | 2 +- .../examples/post_projectsprojectidiouvms.txt | 10 ++++----- .../post_projectsprojectidvirtualboxvms.txt | 2 +- .../post_projectsprojectidvpcsvms.txt | 2 +- docs/api/examples/put_projectsprojectid.txt | 4 ++-- ...ptersadapternumberdportsportnumberdnio.rst | 4 ++-- ...svmidadaptersadapteriddportsportiddnio.rst | 4 ++-- ...xvmsvmidadaptersadapteriddstartcapture.rst | 2 +- ...oxvmsvmidadaptersadapteriddstopcapture.rst | 2 +- ...ptersadapternumberdportsportnumberdnio.rst | 4 ++-- docs/conf.py | 2 +- docs/general.rst | 21 +++++++++++++++++++ 15 files changed, 45 insertions(+), 24 deletions(-) diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/get_projectsprojectid.txt index 1c1716fd..2cfcf9d8 100644 --- a/docs/api/examples/get_projectsprojectid.txt +++ b/docs/api/examples/get_projectsprojectid.txt @@ -13,8 +13,8 @@ SERVER: Python/3.4 GNS3/1.3.dev1 X-ROUTE: /v1/projects/{project_id} { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp95msfptc", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp95msfptc/00010203-0405-0607-0809-0a0b0c0d0e0f", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5cndh7nh", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5cndh7nh/00010203-0405-0607-0809-0a0b0c0d0e0f", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "temporary": false } diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt index 0e1faa6c..3cd4491d 100644 --- a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidiouvmsvmid.txt @@ -18,9 +18,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} "l1_keepalives": false, "name": "PC TEST 1", "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", "ram": 256, "serial_adapters": 2, - "vm_id": "3ab57efc-4016-4898-ac4c-6e804ed8d429" + "vm_id": "548ed6e5-2ab6-421d-8f85-9dee638617fb" } diff --git a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt index cbb4296b..fc9f1ff6 100644 --- a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt @@ -21,6 +21,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} "name": "VMTEST", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "use_any_adapter": false, - "vm_id": "3e6ed300-eefc-4582-80f0-acbdba7e2b9b", + "vm_id": "f70dc1dd-563e-46cc-9cf7-bb169730b8e2", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt index 36365cd4..cde6eea4 100644 --- a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt @@ -17,5 +17,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} "name": "PC TEST 1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "startup_script": null, - "vm_id": "b4ff501b-c24d-4f0c-854b-8163e31b9a8e" + "vm_id": "ed3e4572-df65-4581-9332-324e749d480a" } diff --git a/docs/api/examples/post_projectsprojectidiouvms.txt b/docs/api/examples/post_projectsprojectidiouvms.txt index 72501ea2..0e129869 100644 --- a/docs/api/examples/post_projectsprojectidiouvms.txt +++ b/docs/api/examples/post_projectsprojectidiouvms.txt @@ -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 { "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, "name": "PC TEST 1", "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, "serial_adapters": 4 } @@ -27,9 +27,9 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms "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", + "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2262/test_iou_create_with_params0/iou.bin", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "ram": 1024, "serial_adapters": 4, - "vm_id": "b6a61d51-7225-4f4a-904a-54c8a8917b87" + "vm_id": "12acb1c1-304e-4c3e-81c4-23c52e6c01ba" } diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt index 9509fef5..2b3c4fb3 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt +++ b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt @@ -25,6 +25,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms "name": "VM1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "use_any_adapter": false, - "vm_id": "7abbfc73-3d92-4e31-a99c-3b9519b2e0e8", + "vm_id": "ad5dba5d-0219-41a0-9bd3-eaca69649f6c", "vmname": "VM1" } diff --git a/docs/api/examples/post_projectsprojectidvpcsvms.txt b/docs/api/examples/post_projectsprojectidvpcsvms.txt index d3309113..60df8000 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvms.txt +++ b/docs/api/examples/post_projectsprojectidvpcsvms.txt @@ -19,5 +19,5 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms "name": "PC TEST 1", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "startup_script": null, - "vm_id": "b481d455-16d3-450f-bcec-afdf1ec0c682" + "vm_id": "6c343265-dc55-4bfe-8d4e-f3f21eeeca8d" } diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/put_projectsprojectid.txt index 0e7f4503..878274d0 100644 --- a/docs/api/examples/put_projectsprojectid.txt +++ b/docs/api/examples/put_projectsprojectid.txt @@ -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 { - "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" } diff --git a/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 68065488..cd0e5f27 100644 --- a/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -9,8 +9,8 @@ Add a NIO to a IOU instance Parameters ********** -- **port_number**: Port where the nio should be added - **adapter_number**: Network adapter where the nio is located +- **port_number**: Port where the nio should be added - **vm_id**: UUID for the instance - **project_id**: UUID for the project @@ -27,8 +27,8 @@ Remove a NIO from a IOU instance Parameters ********** -- **port_number**: Port from where the nio should be removed - **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 - **project_id**: UUID for the project diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddportsportiddnio.rst b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddportsportiddnio.rst index 5104eb2d..7a9228c5 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddportsportiddnio.rst +++ b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddportsportiddnio.rst @@ -11,8 +11,8 @@ Parameters ********** - **port_id**: Port in the adapter (always 0 for virtualbox) - **vm_id**: UUID for the instance -- **adapter_id**: Adapter where the nio should be added - **project_id**: UUID for the project +- **adapter_id**: Adapter where the nio should be added Response status codes ********************** @@ -29,8 +29,8 @@ Parameters ********** - **port_id**: Port in the adapter (always 0 for virtualbox) - **vm_id**: UUID for the instance -- **adapter_id**: Adapter from where the nio should be removed - **project_id**: UUID for the project +- **adapter_id**: Adapter from where the nio should be removed Response status codes ********************** diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstartcapture.rst b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstartcapture.rst index ceab89f1..6a3320de 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstartcapture.rst +++ b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstartcapture.rst @@ -10,8 +10,8 @@ Start a packet capture on a VirtualBox VM instance Parameters ********** - **vm_id**: UUID for the instance -- **adapter_id**: Adapter to start a packet capture - **project_id**: UUID for the project +- **adapter_id**: Adapter to start a packet capture Response status codes ********************** diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstopcapture.rst b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstopcapture.rst index 4c2a6072..9ceeef26 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstopcapture.rst +++ b/docs/api/v1projectsprojectidvirtualboxvmsvmidadaptersadapteriddstopcapture.rst @@ -10,8 +10,8 @@ Stop a packet capture on a VirtualBox VM instance Parameters ********** - **vm_id**: UUID for the instance -- **adapter_id**: Adapter to stop a packet capture - **project_id**: UUID for the project +- **adapter_id**: Adapter to stop a packet capture Response status codes ********************** diff --git a/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 4e7cc653..1c756021 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -9,8 +9,8 @@ Add a NIO to a VPCS instance Parameters ********** -- **port_number**: Port where the nio should be added - **adapter_number**: Network adapter where the nio is located +- **port_number**: Port where the nio should be added - **vm_id**: UUID for the instance - **project_id**: UUID for the project @@ -27,8 +27,8 @@ Remove a NIO from a VPCS instance Parameters ********** -- **port_number**: Port from where the nio should be removed - **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 - **project_id**: UUID for the project diff --git a/docs/conf.py b/docs/conf.py index 4cef3395..1c05ec66 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,7 +105,7 @@ pygments_style = 'sphinx' html_theme = 'default' html_sidebars = { - '**': ['sourcelink.html', 'searchbox.html'], + '**': ['sourcelink.html', 'searchbox.html'], } # html_theme = 'nature' diff --git a/docs/general.rst b/docs/general.rst index efc3cb3c..5e01f896 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -10,3 +10,24 @@ JSON like that "status": 409, "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.