From 57348d05082faaa5c7beb7eaa323c1a63e2ae43b Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 17 Feb 2015 10:37:09 +0100 Subject: [PATCH] Better organisation of the API documentation --- docs/api/dynamips_device.rst | 8 + .../v1projectsprojectiddynamipsdevices.rst | 43 ++++++ ...ojectsprojectiddynamipsdevicesdeviceid.rst | 106 +++++++++++++ ...mipsdevicesdeviceidportsportnumberdnio.rst | 140 ++++++++++++++++++ ...esdeviceidportsportnumberdstartcapture.rst | 31 ++++ ...cesdeviceidportsportnumberdstopcapture.rst | 21 +++ docs/api/dynamips_vm.rst | 8 + .../v1projectsprojectiddynamipsvms.rst | 4 +- .../v1projectsprojectiddynamipsvmsvmid.rst | 8 +- ...ptersadapternumberdportsportnumberdnio.rst | 40 +++++ ...ternumberdportsportnumberdstartcapture.rst | 32 ++++ ...pternumberdportsportnumberdstopcapture.rst | 22 +++ ...projectsprojectiddynamipsvmsvmidreload.rst | 4 +- ...projectsprojectiddynamipsvmsvmidresume.rst | 4 +- ...1projectsprojectiddynamipsvmsvmidstart.rst | 4 +- ...v1projectsprojectiddynamipsvmsvmidstop.rst | 4 +- ...rojectsprojectiddynamipsvmsvmidsuspend.rst | 4 +- .../api/examples/delete_projectsprojectid.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- docs/api/examples/get_interfaces.txt | 60 -------- docs/api/examples/get_projectsprojectid.txt | 20 --- .../get_projectsprojectidiouvmsvmid.txt | 26 ---- ...get_projectsprojectidvirtualboxvmsvmid.txt | 26 ---- .../get_projectsprojectidvpcsvmsvmid.txt | 21 --- docs/api/examples/get_version.txt | 17 --- docs/api/examples/post_portsudp.txt | 17 --- .../examples/post_projectsprojectidclose.txt | 13 -- .../examples/post_projectsprojectidcommit.txt | 13 -- .../examples/post_projectsprojectidiouvms.txt | 36 ----- ...ptersadapternumberdportsportnumberdnio.txt | 21 --- .../post_projectsprojectidvirtualboxvms.txt | 30 ---- .../post_projectsprojectidvpcsvms.txt | 23 --- ...ptersadapternumberdportsportnumberdnio.txt | 25 ---- docs/api/examples/post_version.txt | 19 --- docs/api/examples/put_projectsprojectid.txt | 20 --- docs/api/iou.rst | 8 + .../{ => iou}/v1projectsprojectidiouvms.rst | 4 +- .../v1projectsprojectidiouvmsvmid.rst | 8 +- ...ptersadapternumberdportsportnumberdnio.rst | 10 +- ...ternumberdportsportnumberdstartcapture.rst | 32 ++++ ...pternumberdportsportnumberdstopcapture.rst | 22 +++ .../v1projectsprojectidiouvmsvmidreload.rst | 4 +- .../v1projectsprojectidiouvmsvmidstart.rst | 4 +- .../v1projectsprojectidiouvmsvmidstop.rst | 4 +- docs/api/network.rst | 8 + docs/api/{ => network}/v1interfaces.rst | 4 +- docs/api/{ => network}/v1portsudp.rst | 4 +- docs/api/project.rst | 8 + docs/api/{ => project}/v1projects.rst | 4 +- .../api/{ => project}/v1projectsprojectid.rst | 8 +- .../v1projectsprojectidclose.rst | 4 +- .../v1projectsprojectidcommit.rst | 4 +- docs/api/version.rst | 8 + docs/api/{ => version}/v1version.rst | 6 +- docs/api/virtualbox.rst | 8 + .../v1projectsprojectidvirtualboxvms.rst | 4 +- .../v1projectsprojectidvirtualboxvmsvmid.rst | 8 +- ...ptersadapternumberdportsportnumberdnio.rst | 40 +++++ ...ternumberdportsportnumberdstartcapture.rst | 31 ++++ ...pternumberdportsportnumberdstopcapture.rst | 22 +++ ...ojectsprojectidvirtualboxvmsvmidreload.rst | 4 +- ...ojectsprojectidvirtualboxvmsvmidresume.rst | 4 +- ...rojectsprojectidvirtualboxvmsvmidstart.rst | 4 +- ...projectsprojectidvirtualboxvmsvmidstop.rst | 4 +- ...jectsprojectidvirtualboxvmsvmidsuspend.rst | 4 +- docs/api/{ => virtualbox}/v1virtualboxvms.rst | 4 +- docs/api/vpcs.rst | 8 + .../{ => vpcs}/v1projectsprojectidvpcsvms.rst | 4 +- .../v1projectsprojectidvpcsvmsvmid.rst | 8 +- ...ptersadapternumberdportsportnumberdnio.rst | 10 +- .../v1projectsprojectidvpcsvmsvmidreload.rst | 4 +- .../v1projectsprojectidvpcsvmsvmidstart.rst | 4 +- .../v1projectsprojectidvpcsvmsvmidstop.rst | 4 +- gns3server/web/documentation.py | 74 +++++---- gns3server/web/route.py | 9 +- scripts/documentation.sh | 2 +- tests/modules/iou/test_iou_vm.py | 10 +- 78 files changed, 788 insertions(+), 549 deletions(-) create mode 100644 docs/api/dynamips_device.rst create mode 100644 docs/api/dynamips_device/v1projectsprojectiddynamipsdevices.rst create mode 100644 docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst create mode 100644 docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst create mode 100644 docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst create mode 100644 docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst create mode 100644 docs/api/dynamips_vm.rst rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvms.rst (99%) rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmid.rst (99%) create mode 100644 docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst create mode 100644 docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst create mode 100644 docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmidreload.rst (89%) rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmidresume.rst (89%) rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmidstart.rst (89%) rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmidstop.rst (89%) rename docs/api/{ => dynamips_vm}/v1projectsprojectiddynamipsvmsvmidsuspend.rst (89%) delete mode 100644 docs/api/examples/delete_projectsprojectid.txt delete mode 100644 docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/get_interfaces.txt delete mode 100644 docs/api/examples/get_projectsprojectid.txt delete mode 100644 docs/api/examples/get_projectsprojectidiouvmsvmid.txt delete mode 100644 docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt delete mode 100644 docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt delete mode 100644 docs/api/examples/get_version.txt delete mode 100644 docs/api/examples/post_portsudp.txt delete mode 100644 docs/api/examples/post_projectsprojectidclose.txt delete mode 100644 docs/api/examples/post_projectsprojectidcommit.txt delete mode 100644 docs/api/examples/post_projectsprojectidiouvms.txt delete mode 100644 docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/post_projectsprojectidvirtualboxvms.txt delete mode 100644 docs/api/examples/post_projectsprojectidvpcsvms.txt delete mode 100644 docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/post_version.txt delete mode 100644 docs/api/examples/put_projectsprojectid.txt create mode 100644 docs/api/iou.rst rename docs/api/{ => iou}/v1projectsprojectidiouvms.rst (98%) rename docs/api/{ => iou}/v1projectsprojectidiouvmsvmid.rst (98%) rename docs/api/{ => iou}/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst (94%) create mode 100644 docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst create mode 100644 docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename docs/api/{ => iou}/v1projectsprojectidiouvmsvmidreload.rst (89%) rename docs/api/{ => iou}/v1projectsprojectidiouvmsvmidstart.rst (89%) rename docs/api/{ => iou}/v1projectsprojectidiouvmsvmidstop.rst (89%) create mode 100644 docs/api/network.rst rename docs/api/{ => network}/v1interfaces.rst (83%) rename docs/api/{ => network}/v1portsudp.rst (83%) create mode 100644 docs/api/project.rst rename docs/api/{ => project}/v1projects.rst (96%) rename docs/api/{ => project}/v1projectsprojectid.rst (97%) rename docs/api/{ => project}/v1projectsprojectidclose.rst (87%) rename docs/api/{ => project}/v1projectsprojectidcommit.rst (87%) create mode 100644 docs/api/version.rst rename docs/api/{ => version}/v1version.rst (95%) create mode 100644 docs/api/virtualbox.rst rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvms.rst (98%) rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmid.rst (98%) create mode 100644 docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst create mode 100644 docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst create mode 100644 docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmidreload.rst (89%) rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmidresume.rst (89%) rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmidstart.rst (89%) rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmidstop.rst (89%) rename docs/api/{ => virtualbox}/v1projectsprojectidvirtualboxvmsvmidsuspend.rst (89%) rename docs/api/{ => virtualbox}/v1virtualboxvms.rst (83%) create mode 100644 docs/api/vpcs.rst rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvms.rst (97%) rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvmsvmid.rst (97%) rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst (94%) rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvmsvmidreload.rst (89%) rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvmsvmidstart.rst (89%) rename docs/api/{ => vpcs}/v1projectsprojectidvpcsvmsvmidstop.rst (89%) diff --git a/docs/api/dynamips_device.rst b/docs/api/dynamips_device.rst new file mode 100644 index 00000000..83c17b94 --- /dev/null +++ b/docs/api/dynamips_device.rst @@ -0,0 +1,8 @@ +Dynamips device +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + dynamips_device/* diff --git a/docs/api/dynamips_device/v1projectsprojectiddynamipsdevices.rst b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevices.rst new file mode 100644 index 00000000..d43ed5bf --- /dev/null +++ b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevices.rst @@ -0,0 +1,43 @@ +/v1/projects/{project_id}/dynamips/devices +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/devices +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Create a new Dynamips device instance + +Parameters +********** +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **201**: Instance created +- **409**: Conflict + +Input +******* +.. raw:: html + + + + + + +
Name Mandatory Type Description
device_id string Dynamips device instance identifier
device_type string Dynamips device type
name string Dynamips device name
+ +Output +******* +.. raw:: html + + + + + + + + +
Name Mandatory Type Description
device_id string Dynamips router instance UUID
mappings object
name string Dynamips device instance name
ports array
project_id string Project UUID
+ diff --git a/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst new file mode 100644 index 00000000..1ff726ba --- /dev/null +++ b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceid.rst @@ -0,0 +1,106 @@ +/v1/projects/{project_id}/dynamips/devices/{device_id} +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +GET /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Get a Dynamips device instance + +Parameters +********** +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Success +- **400**: Invalid request +- **404**: Instance doesn't exist + +Output +******* +.. raw:: html + + + + + + + + +
Name Mandatory Type Description
device_id string Dynamips router instance UUID
mappings object
name string Dynamips device instance name
ports array
project_id string Project UUID
+ + +PUT /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Update a Dynamips device instance + +Parameters +********** +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Instance updated +- **400**: Invalid request +- **404**: Instance doesn't exist +- **409**: Conflict + +Input +******* +Types ++++++++++ +EthernetSwitchPort +^^^^^^^^^^^^^^^^^^^^^^ +Ethernet switch port + +.. raw:: html + + + + + + +
Name Mandatory Type Description
port integer Port number
type enum Possible values: access, dot1q, qinq
vlan integer VLAN number
+ +Body ++++++++++ +.. raw:: html + + + + + +
Name Mandatory Type Description
name string Dynamips device instance name
ports array
+ +Output +******* +.. raw:: html + + + + + + + + +
Name Mandatory Type Description
device_id string Dynamips router instance UUID
mappings object
name string Dynamips device instance name
ports array
project_id string Project UUID
+ + +DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Delete a Dynamips device instance + +Parameters +********** +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: Instance deleted + diff --git a/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst new file mode 100644 index 00000000..bb237012 --- /dev/null +++ b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst @@ -0,0 +1,140 @@ +/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/nio +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Add a NIO to a Dynamips device instance + +Parameters +********** +- **port_number**: Port on the device +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **201**: NIO created +- **404**: Instance doesn't exist + +Input +******* +Types ++++++++++ +Ethernet +^^^^^^^^^^^^^^^^^^^^^^ +Generic Ethernet Network Input/Output + +.. raw:: html + + + + + +
Name Mandatory Type Description
ethernet_device string Ethernet device name e.g. eth0
type enum Possible values: nio_generic_ethernet
+ +LinuxEthernet +^^^^^^^^^^^^^^^^^^^^^^ +Linux Ethernet Network Input/Output + +.. raw:: html + + + + + +
Name Mandatory Type Description
ethernet_device string Ethernet device name e.g. eth0
type enum Possible values: nio_linux_ethernet
+ +NULL +^^^^^^^^^^^^^^^^^^^^^^ +NULL Network Input/Output + +.. raw:: html + + + + +
Name Mandatory Type Description
type enum Possible values: nio_null
+ +TAP +^^^^^^^^^^^^^^^^^^^^^^ +TAP Network Input/Output + +.. raw:: html + + + + + +
Name Mandatory Type Description
tap_device string TAP device name e.g. tap0
type enum Possible values: nio_tap
+ +UDP +^^^^^^^^^^^^^^^^^^^^^^ +UDP Network Input/Output + +.. raw:: html + + + + + + + +
Name Mandatory Type Description
lport integer Local port
rhost string Remote host
rport integer Remote port
type enum Possible values: nio_udp
+ +UNIX +^^^^^^^^^^^^^^^^^^^^^^ +UNIX Network Input/Output + +.. raw:: html + + + + + + +
Name Mandatory Type Description
local_file string path to the UNIX socket file (local)
remote_file string path to the UNIX socket file (remote)
type enum Possible values: nio_unix
+ +VDE +^^^^^^^^^^^^^^^^^^^^^^ +VDE Network Input/Output + +.. raw:: html + + + + + + +
Name Mandatory Type Description
control_file string path to the VDE control file
local_file string path to the VDE control file
type enum Possible values: nio_vde
+ +Body ++++++++++ +.. raw:: html + + + + + + +
Name Mandatory Type Description
mappings object
nio UDP, Ethernet, LinuxEthernet, TAP, UNIX, VDE, NULL
port_settings object Ethernet switch
+ + +DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Remove a NIO from a Dynamips device instance + +Parameters +********** +- **port_number**: Port on the device +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: NIO deleted + diff --git a/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst new file mode 100644 index 00000000..41cc168f --- /dev/null +++ b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst @@ -0,0 +1,31 @@ +/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/start_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Start a packet capture on a Dynamips device instance + +Parameters +********** +- **port_number**: Port on the device +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Capture started +- **400**: Invalid request +- **404**: Instance doesn't exist + +Input +******* +.. raw:: html + + + + + +
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type string PCAP data link type
+ diff --git a/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst new file mode 100644 index 00000000..9318bdd1 --- /dev/null +++ b/docs/api/dynamips_device/v1projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst @@ -0,0 +1,21 @@ +/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/stop_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Stop a packet capture on a Dynamips device instance + +Parameters +********** +- **port_number**: Port on the device +- **device_id**: UUID for the instance +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: Capture stopped + diff --git a/docs/api/dynamips_vm.rst b/docs/api/dynamips_vm.rst new file mode 100644 index 00000000..f32d26b7 --- /dev/null +++ b/docs/api/dynamips_vm.rst @@ -0,0 +1,8 @@ +Dynamips vm +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + dynamips_vm/* diff --git a/docs/api/v1projectsprojectiddynamipsvms.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvms.rst similarity index 99% rename from docs/api/v1projectsprojectiddynamipsvms.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvms.rst index 410f5f87..b50dfdad 100644 --- a/docs/api/v1projectsprojectiddynamipsvms.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvms.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new Dynamips VM instance Parameters diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmid.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmid.rst similarity index 99% rename from docs/api/v1projectsprojectiddynamipsvmsvmid.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmid.rst index bce8b927..6eb63363 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmid.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmid.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id} ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a Dynamips VM instance Parameters @@ -70,7 +70,7 @@ Output PUT /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a Dynamips VM instance Parameters @@ -184,7 +184,7 @@ Output DELETE /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a Dynamips VM instance Parameters diff --git a/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst new file mode 100644 index 00000000..ddff9476 --- /dev/null +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -0,0 +1,40 @@ +/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Add a NIO to a Dynamips VM instance + +Parameters +********** +- **adapter_number**: Adapter where the nio should be added +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **201**: NIO created +- **404**: Instance doesn't exist + + +DELETE /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Remove a NIO from a Dynamips VM instance + +Parameters +********** +- **adapter_number**: Adapter from where the nio should be removed +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: NIO deleted + diff --git a/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst new file mode 100644 index 00000000..43c9c0fe --- /dev/null +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -0,0 +1,32 @@ +/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Start a packet capture on a Dynamips VM instance + +Parameters +********** +- **adapter_number**: Adapter to start a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Capture started +- **400**: Invalid request +- **404**: Instance doesn't exist + +Input +******* +.. raw:: html + + + + + +
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type string PCAP data link type
+ diff --git a/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst new file mode 100644 index 00000000..1114fae5 --- /dev/null +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -0,0 +1,22 @@ +/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Stop a packet capture on a Dynamips VM instance + +Parameters +********** +- **adapter_number**: Adapter to stop a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: Capture stopped + diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmidreload.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidreload.rst similarity index 89% rename from docs/api/v1projectsprojectiddynamipsvmsvmidreload.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidreload.rst index a1544bf0..d7d7df55 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmidreload.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidreload.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id}/reload ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a Dynamips VM instance Parameters diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmidresume.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidresume.rst similarity index 89% rename from docs/api/v1projectsprojectiddynamipsvmsvmidresume.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidresume.rst index 9e5ca67c..fcd48ab5 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmidresume.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidresume.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id}/resume ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended Dynamips VM instance Parameters diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmidstart.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstart.rst similarity index 89% rename from docs/api/v1projectsprojectiddynamipsvmsvmidstart.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstart.rst index 446d6bca..2dbd25b8 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmidstart.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstart.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id}/start ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a Dynamips VM instance Parameters diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmidstop.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstop.rst similarity index 89% rename from docs/api/v1projectsprojectiddynamipsvmsvmidstop.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstop.rst index 9663fc78..ff62c2c9 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmidstop.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidstop.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id}/stop ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a Dynamips VM instance Parameters diff --git a/docs/api/v1projectsprojectiddynamipsvmsvmidsuspend.rst b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidsuspend.rst similarity index 89% rename from docs/api/v1projectsprojectiddynamipsvmsvmidsuspend.rst rename to docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidsuspend.rst index d53b213f..b6fb8a13 100644 --- a/docs/api/v1projectsprojectiddynamipsvmsvmidsuspend.rst +++ b/docs/api/dynamips_vm/v1projectsprojectiddynamipsvmsvmidsuspend.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/dynamips/vms/{vm_id}/suspend ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a Dynamips VM instance Parameters diff --git a/docs/api/examples/delete_projectsprojectid.txt b/docs/api/examples/delete_projectsprojectid.txt deleted file mode 100644 index 45efff6c..00000000 --- a/docs/api/examples/delete_projectsprojectid.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/projects/{project_id}' - -DELETE /projects/{project_id} HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id} - diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index f8aa407f..00000000 --- a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' - -DELETE /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index 6842905a..00000000 --- a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' - -DELETE /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1 - - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - diff --git a/docs/api/examples/get_interfaces.txt b/docs/api/examples/get_interfaces.txt deleted file mode 100644 index 7ac8c74d..00000000 --- a/docs/api/examples/get_interfaces.txt +++ /dev/null @@ -1,60 +0,0 @@ -curl -i -X GET 'http://localhost:8000/interfaces' - -GET /interfaces HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 652 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/interfaces - -[ - { - "id": "lo0", - "name": "lo0" - }, - { - "id": "gif0", - "name": "gif0" - }, - { - "id": "stf0", - "name": "stf0" - }, - { - "id": "en0", - "name": "en0" - }, - { - "id": "en1", - "name": "en1" - }, - { - "id": "fw0", - "name": "fw0" - }, - { - "id": "en2", - "name": "en2" - }, - { - "id": "p2p0", - "name": "p2p0" - }, - { - "id": "bridge0", - "name": "bridge0" - }, - { - "id": "vboxnet0", - "name": "vboxnet0" - }, - { - "id": "vboxnet1", - "name": "vboxnet1" - } -] diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/get_projectsprojectid.txt deleted file mode 100644 index 0823bf08..00000000 --- a/docs/api/examples/get_projectsprojectid.txt +++ /dev/null @@ -1,20 +0,0 @@ -curl -i -X GET 'http://localhost:8000/projects/{project_id}' - -GET /projects/{project_id} HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 277 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id} - -{ - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpd4_jlup7", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpd4_jlup7/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 deleted file mode 100644 index e702d104..00000000 --- a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt +++ /dev/null @@ -1,26 +0,0 @@ -curl -i -X GET 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}' - -GET /projects/{project_id}/iou/vms/{vm_id} HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 381 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} - -{ - "console": 2000, - "ethernet_adapters": 2, - "l1_keepalives": false, - "name": "PC TEST 1", - "nvram": 128, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_get0/iou.bin", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "ram": 256, - "serial_adapters": 2, - "vm_id": "8d4ce7ee-9c5e-4ac0-9106-f8cf28a12b5d" -} diff --git a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt deleted file mode 100644 index d87a9f2a..00000000 --- a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt +++ /dev/null @@ -1,26 +0,0 @@ -curl -i -X GET 'http://localhost:8000/projects/{project_id}/virtualbox/vms/{vm_id}' - -GET /projects/{project_id}/virtualbox/vms/{vm_id} HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 347 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} - -{ - "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)", - "adapters": 0, - "console": 2001, - "enable_remote_console": false, - "headless": false, - "name": "VMTEST", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "use_any_adapter": false, - "vm_id": "591dcdfc-f25f-4a87-bd06-6091551c6f8e", - "vmname": "VMTEST" -} diff --git a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt deleted file mode 100644 index 83c6f71d..00000000 --- a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt +++ /dev/null @@ -1,21 +0,0 @@ -curl -i -X GET 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}' - -GET /projects/{project_id}/vpcs/vms/{vm_id} HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 187 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} - -{ - "console": 2009, - "name": "PC TEST 1", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "startup_script": null, - "vm_id": "37726103-1521-42c3-8925-fd4fabea9caf" -} diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/get_version.txt deleted file mode 100644 index 88017034..00000000 --- a/docs/api/examples/get_version.txt +++ /dev/null @@ -1,17 +0,0 @@ -curl -i -X GET 'http://localhost:8000/version' - -GET /version HTTP/1.1 - - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 29 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/version - -{ - "version": "1.3.dev1" -} diff --git a/docs/api/examples/post_portsudp.txt b/docs/api/examples/post_portsudp.txt deleted file mode 100644 index 3be4b74c..00000000 --- a/docs/api/examples/post_portsudp.txt +++ /dev/null @@ -1,17 +0,0 @@ -curl -i -X POST 'http://localhost:8000/ports/udp' -d '{}' - -POST /ports/udp HTTP/1.1 -{} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 25 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/ports/udp - -{ - "udp_port": 10000 -} diff --git a/docs/api/examples/post_projectsprojectidclose.txt b/docs/api/examples/post_projectsprojectidclose.txt deleted file mode 100644 index bcc429c9..00000000 --- a/docs/api/examples/post_projectsprojectidclose.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/close' -d '{}' - -POST /projects/{project_id}/close HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/close - diff --git a/docs/api/examples/post_projectsprojectidcommit.txt b/docs/api/examples/post_projectsprojectidcommit.txt deleted file mode 100644 index 0b36f05d..00000000 --- a/docs/api/examples/post_projectsprojectidcommit.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/commit' -d '{}' - -POST /projects/{project_id}/commit HTTP/1.1 -{} - - -HTTP/1.1 204 -CONNECTION: keep-alive -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/commit - diff --git a/docs/api/examples/post_projectsprojectidiouvms.txt b/docs/api/examples/post_projectsprojectidiouvms.txt deleted file mode 100644 index 9f9a6d91..00000000 --- a/docs/api/examples/post_projectsprojectidiouvms.txt +++ /dev/null @@ -1,36 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms' -d '{"ethernet_adapters": 0, "initial_config": "hostname test", "iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_create_with_params0/iourc", "l1_keepalives": true, "name": "PC TEST 1", "nvram": 512, "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_create_with_params0/iou.bin", "ram": 1024, "serial_adapters": 4}' - -POST /projects/{project_id}/iou/vms HTTP/1.1 -{ - "ethernet_adapters": 0, - "initial_config": "hostname test", - "iourc_path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_create_with_params0/iourc", - "l1_keepalives": true, - "name": "PC TEST 1", - "nvram": 512, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_create_with_params0/iou.bin", - "ram": 1024, - "serial_adapters": 4 -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 396 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms - -{ - "console": 2000, - "ethernet_adapters": 0, - "l1_keepalives": true, - "name": "PC TEST 1", - "nvram": 512, - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_iou_create_with_params0/iou.bin", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "ram": 1024, - "serial_adapters": 4, - "vm_id": "f1bafbbe-96ba-4088-83e2-391cf9477e89" -} diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index 5940e201..00000000 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,21 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}' - -POST /projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1 -{ - "ethernet_device": "eth0", - "type": "nio_generic_ethernet" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 69 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - -{ - "ethernet_device": "eth0", - "type": "nio_generic_ethernet" -} diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt b/docs/api/examples/post_projectsprojectidvirtualboxvms.txt deleted file mode 100644 index 751f5867..00000000 --- a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt +++ /dev/null @@ -1,30 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/virtualbox/vms' -d '{"linked_clone": false, "name": "VM1", "vmname": "VM1"}' - -POST /projects/{project_id}/virtualbox/vms HTTP/1.1 -{ - "linked_clone": false, - "name": "VM1", - "vmname": "VM1" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 341 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms - -{ - "adapter_type": "Intel PRO/1000 MT Desktop (82540EM)", - "adapters": 0, - "console": 2000, - "enable_remote_console": false, - "headless": false, - "name": "VM1", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "use_any_adapter": false, - "vm_id": "be653307-d7d6-4884-932f-0d87c7e2c06b", - "vmname": "VM1" -} diff --git a/docs/api/examples/post_projectsprojectidvpcsvms.txt b/docs/api/examples/post_projectsprojectidvpcsvms.txt deleted file mode 100644 index 9ed92782..00000000 --- a/docs/api/examples/post_projectsprojectidvpcsvms.txt +++ /dev/null @@ -1,23 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms' -d '{"name": "PC TEST 1"}' - -POST /projects/{project_id}/vpcs/vms HTTP/1.1 -{ - "name": "PC TEST 1" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 187 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms - -{ - "console": 2009, - "name": "PC TEST 1", - "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "startup_script": null, - "vm_id": "154fff9a-bd47-4740-8a00-847ec30dd6e0" -} diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index e55c4ace..00000000 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,25 +0,0 @@ -curl -i -X POST 'http://localhost:8000/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' - -POST /projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio HTTP/1.1 -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} - - -HTTP/1.1 201 -CONNECTION: keep-alive -CONTENT-LENGTH: 89 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - -{ - "lport": 4242, - "rhost": "127.0.0.1", - "rport": 4343, - "type": "nio_udp" -} diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/post_version.txt deleted file mode 100644 index 2f6c1452..00000000 --- a/docs/api/examples/post_version.txt +++ /dev/null @@ -1,19 +0,0 @@ -curl -i -X POST 'http://localhost:8000/version' -d '{"version": "1.3.dev1"}' - -POST /version HTTP/1.1 -{ - "version": "1.3.dev1" -} - - -HTTP/1.1 200 -CONNECTION: keep-alive -CONTENT-LENGTH: 29 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/version - -{ - "version": "1.3.dev1" -} diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/put_projectsprojectid.txt deleted file mode 100644 index ebab8846..00000000 --- a/docs/api/examples/put_projectsprojectid.txt +++ /dev/null @@ -1,20 +0,0 @@ -curl -i -X PUT 'http://localhost:8000/projects/{project_id}' -d '{"path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_update_path_project_non_l0"}' - -PUT /projects/{project_id} HTTP/1.1 -{ - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-2628/test_update_path_project_non_l0" -} - - -HTTP/1.1 403 -CONNECTION: keep-alive -CONTENT-LENGTH: 100 -CONTENT-TYPE: application/json -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.4 GNS3/1.3.dev1 -X-ROUTE: /v1/projects/{project_id} - -{ - "message": "You are not allowed to modify the project directory location", - "status": 403 -} diff --git a/docs/api/iou.rst b/docs/api/iou.rst new file mode 100644 index 00000000..c2188031 --- /dev/null +++ b/docs/api/iou.rst @@ -0,0 +1,8 @@ +Iou +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + iou/* diff --git a/docs/api/v1projectsprojectidiouvms.rst b/docs/api/iou/v1projectsprojectidiouvms.rst similarity index 98% rename from docs/api/v1projectsprojectidiouvms.rst rename to docs/api/iou/v1projectsprojectidiouvms.rst index 978cf3ff..92cebf36 100644 --- a/docs/api/v1projectsprojectidiouvms.rst +++ b/docs/api/iou/v1projectsprojectidiouvms.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/iou/vms ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/iou/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new IOU instance Parameters diff --git a/docs/api/v1projectsprojectidiouvmsvmid.rst b/docs/api/iou/v1projectsprojectidiouvmsvmid.rst similarity index 98% rename from docs/api/v1projectsprojectidiouvmsvmid.rst rename to docs/api/iou/v1projectsprojectidiouvmsvmid.rst index e3dd7611..0fdbe2e2 100644 --- a/docs/api/v1projectsprojectidiouvmsvmid.rst +++ b/docs/api/iou/v1projectsprojectidiouvmsvmid.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/iou/vms/{vm_id} ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a IOU instance Parameters @@ -38,7 +38,7 @@ Output PUT /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a IOU instance Parameters @@ -91,7 +91,7 @@ Output DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a IOU instance Parameters diff --git a/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 94% rename from docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 56437eec..9e2ce5a8 100644 --- a/docs/api/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a IOU instance Parameters ********** - **adapter_number**: Network adapter where the nio is located - **vm_id**: UUID for the instance -- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **project_id**: UUID for the project Response status codes ********************** @@ -22,15 +22,15 @@ Response status codes DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a IOU instance Parameters ********** - **adapter_number**: Network adapter where the nio is located - **vm_id**: UUID for the instance -- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst new file mode 100644 index 00000000..fdd481c9 --- /dev/null +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -0,0 +1,32 @@ +/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Start a packet capture on a IOU VM instance + +Parameters +********** +- **adapter_number**: Adapter to start a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Capture started +- **400**: Invalid request +- **404**: Instance doesn't exist + +Input +******* +.. raw:: html + + + + + +
Name Mandatory Type Description
capture_file_name string Capture file name
data_link_type string PCAP data link type
+ diff --git a/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst new file mode 100644 index 00000000..a2441a3d --- /dev/null +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -0,0 +1,22 @@ +/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Stop a packet capture on a IOU VM instance + +Parameters +********** +- **adapter_number**: Adapter to stop a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: Capture stopped + diff --git a/docs/api/v1projectsprojectidiouvmsvmidreload.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidreload.rst similarity index 89% rename from docs/api/v1projectsprojectidiouvmsvmidreload.rst rename to docs/api/iou/v1projectsprojectidiouvmsvmidreload.rst index 33c1d767..90f3c56b 100644 --- a/docs/api/v1projectsprojectidiouvmsvmidreload.rst +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidreload.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/iou/vms/{vm_id}/reload ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a IOU instance Parameters diff --git a/docs/api/v1projectsprojectidiouvmsvmidstart.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidstart.rst similarity index 89% rename from docs/api/v1projectsprojectidiouvmsvmidstart.rst rename to docs/api/iou/v1projectsprojectidiouvmsvmidstart.rst index 3956f666..c781dfc3 100644 --- a/docs/api/v1projectsprojectidiouvmsvmidstart.rst +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidstart.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/iou/vms/{vm_id}/start ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a IOU instance Parameters diff --git a/docs/api/v1projectsprojectidiouvmsvmidstop.rst b/docs/api/iou/v1projectsprojectidiouvmsvmidstop.rst similarity index 89% rename from docs/api/v1projectsprojectidiouvmsvmidstop.rst rename to docs/api/iou/v1projectsprojectidiouvmsvmidstop.rst index 860b566d..4f60ad43 100644 --- a/docs/api/v1projectsprojectidiouvmsvmidstop.rst +++ b/docs/api/iou/v1projectsprojectidiouvmsvmidstop.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/iou/vms/{vm_id}/stop ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a IOU instance Parameters diff --git a/docs/api/network.rst b/docs/api/network.rst new file mode 100644 index 00000000..38366abe --- /dev/null +++ b/docs/api/network.rst @@ -0,0 +1,8 @@ +Network +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + network/* diff --git a/docs/api/v1interfaces.rst b/docs/api/network/v1interfaces.rst similarity index 83% rename from docs/api/v1interfaces.rst rename to docs/api/network/v1interfaces.rst index 73042f7d..2a1071f3 100644 --- a/docs/api/v1interfaces.rst +++ b/docs/api/network/v1interfaces.rst @@ -1,10 +1,10 @@ /v1/interfaces ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/interfaces -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List all the network interfaces available on the server Response status codes diff --git a/docs/api/v1portsudp.rst b/docs/api/network/v1portsudp.rst similarity index 83% rename from docs/api/v1portsudp.rst rename to docs/api/network/v1portsudp.rst index 69d90882..0d6f7975 100644 --- a/docs/api/v1portsudp.rst +++ b/docs/api/network/v1portsudp.rst @@ -1,10 +1,10 @@ /v1/ports/udp ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/ports/udp -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allocate an UDP port on the server Response status codes diff --git a/docs/api/project.rst b/docs/api/project.rst new file mode 100644 index 00000000..95453d81 --- /dev/null +++ b/docs/api/project.rst @@ -0,0 +1,8 @@ +Project +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + project/* diff --git a/docs/api/v1projects.rst b/docs/api/project/v1projects.rst similarity index 96% rename from docs/api/v1projects.rst rename to docs/api/project/v1projects.rst index fadee814..9ace36fe 100644 --- a/docs/api/v1projects.rst +++ b/docs/api/project/v1projects.rst @@ -1,10 +1,10 @@ /v1/projects ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new project on the server Response status codes diff --git a/docs/api/v1projectsprojectid.rst b/docs/api/project/v1projectsprojectid.rst similarity index 97% rename from docs/api/v1projectsprojectid.rst rename to docs/api/project/v1projectsprojectid.rst index 4881beae..c1a70376 100644 --- a/docs/api/v1projectsprojectid.rst +++ b/docs/api/project/v1projectsprojectid.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id} ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get project information Parameters @@ -30,7 +30,7 @@ Output PUT /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a project Parameters @@ -67,7 +67,7 @@ Output DELETE /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a project from disk Parameters diff --git a/docs/api/v1projectsprojectidclose.rst b/docs/api/project/v1projectsprojectidclose.rst similarity index 87% rename from docs/api/v1projectsprojectidclose.rst rename to docs/api/project/v1projectsprojectidclose.rst index e3d9e87c..c0623c9b 100644 --- a/docs/api/v1projectsprojectidclose.rst +++ b/docs/api/project/v1projectsprojectidclose.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/close ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/close -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Close a project Parameters diff --git a/docs/api/v1projectsprojectidcommit.rst b/docs/api/project/v1projectsprojectidcommit.rst similarity index 87% rename from docs/api/v1projectsprojectidcommit.rst rename to docs/api/project/v1projectsprojectidcommit.rst index a3e0aac5..49c6fb8a 100644 --- a/docs/api/v1projectsprojectidcommit.rst +++ b/docs/api/project/v1projectsprojectidcommit.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/commit ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/commit -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Write changes on disk Parameters diff --git a/docs/api/version.rst b/docs/api/version.rst new file mode 100644 index 00000000..adc4c1f0 --- /dev/null +++ b/docs/api/version.rst @@ -0,0 +1,8 @@ +Version +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + version/* diff --git a/docs/api/v1version.rst b/docs/api/version/v1version.rst similarity index 95% rename from docs/api/v1version.rst rename to docs/api/version/v1version.rst index ae53f9c2..2fdf1edb 100644 --- a/docs/api/v1version.rst +++ b/docs/api/version/v1version.rst @@ -1,10 +1,10 @@ /v1/version ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the server version number Response status codes @@ -22,7 +22,7 @@ Output POST /v1/version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Check if version is the same as the server Response status codes diff --git a/docs/api/virtualbox.rst b/docs/api/virtualbox.rst new file mode 100644 index 00000000..517624b2 --- /dev/null +++ b/docs/api/virtualbox.rst @@ -0,0 +1,8 @@ +Virtualbox +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + virtualbox/* diff --git a/docs/api/v1projectsprojectidvirtualboxvms.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvms.rst similarity index 98% rename from docs/api/v1projectsprojectidvirtualboxvms.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvms.rst index 2e0ce096..8f85e7a5 100644 --- a/docs/api/v1projectsprojectidvirtualboxvms.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvms.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VirtualBox VM instance Parameters diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmid.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst similarity index 98% rename from docs/api/v1projectsprojectidvirtualboxvmsvmid.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst index 11274204..ffb8670a 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmid.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmid.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id} ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VirtualBox VM instance Parameters @@ -38,7 +38,7 @@ Output PUT /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VirtualBox VM instance Parameters @@ -89,7 +89,7 @@ Output DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VirtualBox VM instance Parameters diff --git a/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst new file mode 100644 index 00000000..726fa494 --- /dev/null +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -0,0 +1,40 @@ +/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Add a NIO to a VirtualBox VM instance + +Parameters +********** +- **adapter_number**: Adapter where the nio should be added +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **201**: NIO created +- **404**: Instance doesn't exist + + +DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Remove a NIO from a VirtualBox VM instance + +Parameters +********** +- **adapter_number**: Adapter from where the nio should be removed +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always) +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: NIO deleted + diff --git a/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst new file mode 100644 index 00000000..67ff14c4 --- /dev/null +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -0,0 +1,31 @@ +/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Start a packet capture on a VirtualBox VM instance + +Parameters +********** +- **adapter_number**: Adapter to start a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project + +Response status codes +********************** +- **200**: Capture started +- **400**: Invalid request +- **404**: Instance doesn't exist + +Input +******* +.. raw:: html + + + + +
Name Mandatory Type Description
capture_file_name string Capture file name
+ diff --git a/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst new file mode 100644 index 00000000..1377be32 --- /dev/null +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -0,0 +1,22 @@ +/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture +---------------------------------------------------------------------------------------------------------------------- + +.. contents:: + +POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Stop a packet capture on a VirtualBox VM instance + +Parameters +********** +- **adapter_number**: Adapter to stop a packet capture +- **vm_id**: UUID for the instance +- **port_number**: Port on the adapter (always 0) +- **project_id**: UUID for the project + +Response status codes +********************** +- **400**: Invalid request +- **404**: Instance doesn't exist +- **204**: Capture stopped + diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidreload.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst similarity index 89% rename from docs/api/v1projectsprojectidvirtualboxvmsvmidreload.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst index d32b9e02..6001b143 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidreload.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidreload.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VirtualBox VM instance Parameters diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidresume.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst similarity index 89% rename from docs/api/v1projectsprojectidvirtualboxvmsvmidresume.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst index 7d82060f..cfdc6edc 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidresume.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidresume.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended VirtualBox VM instance Parameters diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidstart.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst similarity index 89% rename from docs/api/v1projectsprojectidvirtualboxvmsvmidstart.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst index 20a30a8a..695c2712 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidstart.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstart.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id}/start ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VirtualBox VM instance Parameters diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidstop.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst similarity index 89% rename from docs/api/v1projectsprojectidvirtualboxvmsvmidstop.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst index cafcbc1c..838a33c6 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidstop.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidstop.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VirtualBox VM instance Parameters diff --git a/docs/api/v1projectsprojectidvirtualboxvmsvmidsuspend.rst b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst similarity index 89% rename from docs/api/v1projectsprojectidvirtualboxvmsvmidsuspend.rst rename to docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst index 0652378e..a978baa5 100644 --- a/docs/api/v1projectsprojectidvirtualboxvmsvmidsuspend.rst +++ b/docs/api/virtualbox/v1projectsprojectidvirtualboxvmsvmidsuspend.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a VirtualBox VM instance Parameters diff --git a/docs/api/v1virtualboxvms.rst b/docs/api/virtualbox/v1virtualboxvms.rst similarity index 83% rename from docs/api/v1virtualboxvms.rst rename to docs/api/virtualbox/v1virtualboxvms.rst index a174df6c..6499008b 100644 --- a/docs/api/v1virtualboxvms.rst +++ b/docs/api/virtualbox/v1virtualboxvms.rst @@ -1,10 +1,10 @@ /v1/virtualbox/vms ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/virtualbox/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get all VirtualBox VMs available Response status codes diff --git a/docs/api/vpcs.rst b/docs/api/vpcs.rst new file mode 100644 index 00000000..ab00c921 --- /dev/null +++ b/docs/api/vpcs.rst @@ -0,0 +1,8 @@ +Vpcs +--------------------- + +.. toctree:: + :glob: + :maxdepth: 2 + + vpcs/* diff --git a/docs/api/v1projectsprojectidvpcsvms.rst b/docs/api/vpcs/v1projectsprojectidvpcsvms.rst similarity index 97% rename from docs/api/v1projectsprojectidvpcsvms.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvms.rst index 7dfb6bc9..c59992e6 100644 --- a/docs/api/v1projectsprojectidvpcsvms.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvms.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/vpcs/vms ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/vpcs/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VPCS instance Parameters diff --git a/docs/api/v1projectsprojectidvpcsvmsvmid.rst b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmid.rst similarity index 97% rename from docs/api/v1projectsprojectidvpcsvmsvmid.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvmsvmid.rst index 50268c7b..f49c5964 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmid.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmid.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/vpcs/vms/{vm_id} ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: GET /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VPCS instance Parameters @@ -33,7 +33,7 @@ Output PUT /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VPCS instance Parameters @@ -74,7 +74,7 @@ Output DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VPCS instance Parameters diff --git a/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 94% rename from docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index f1183c0a..bfb811dd 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a VPCS instance Parameters ********** - **adapter_number**: Network adapter where the nio is located - **vm_id**: UUID for the instance -- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **project_id**: UUID for the project Response status codes ********************** @@ -22,15 +22,15 @@ Response status codes DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a VPCS instance Parameters ********** - **adapter_number**: Network adapter where the nio is located - **vm_id**: UUID for the instance -- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1projectsprojectidvpcsvmsvmidreload.rst b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidreload.rst similarity index 89% rename from docs/api/v1projectsprojectidvpcsvmsvmidreload.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvmsvmidreload.rst index 33b4d868..4b5e197e 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmidreload.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidreload.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/vpcs/vms/{vm_id}/reload ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VPCS instance Parameters diff --git a/docs/api/v1projectsprojectidvpcsvmsvmidstart.rst b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstart.rst similarity index 89% rename from docs/api/v1projectsprojectidvpcsvmsvmidstart.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstart.rst index 46897b88..c8e7a550 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmidstart.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstart.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/vpcs/vms/{vm_id}/start ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VPCS instance Parameters diff --git a/docs/api/v1projectsprojectidvpcsvmsvmidstop.rst b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstop.rst similarity index 89% rename from docs/api/v1projectsprojectidvpcsvmsvmidstop.rst rename to docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstop.rst index 1bc21787..bf3b7fdb 100644 --- a/docs/api/v1projectsprojectidvpcsvmsvmidstop.rst +++ b/docs/api/vpcs/v1projectsprojectidvpcsvmsvmidstop.rst @@ -1,10 +1,10 @@ /v1/projects/{project_id}/vpcs/vms/{vm_id}/stop ------------------------------------------------------------------------------------------------------------------ +---------------------------------------------------------------------------------------------------------------------- .. contents:: POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VPCS instance Parameters diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py index caf73aa4..f2032c9b 100644 --- a/gns3server/web/documentation.py +++ b/gns3server/web/documentation.py @@ -17,6 +17,7 @@ import re import os.path +import os from gns3server.handlers import * from gns3server.web.route import Route @@ -30,40 +31,55 @@ class Documentation(object): self._documentation = route.get_documentation() def write(self): - for path in sorted(self._documentation): - filename = self._file_path(path) - handler_doc = self._documentation[path] - with open("docs/api/{}.rst".format(filename), 'w+') as f: - f.write('{}\n-----------------------------------------------------------------------------------------------------------------\n\n'.format(path)) - f.write('.. contents::\n') - for method in handler_doc["methods"]: - f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**"))) - f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n') - f.write('{}\n\n'.format(method["description"])) + for handler_name in sorted(self._documentation): - if len(method["parameters"]) > 0: - f.write("Parameters\n**********\n") - for parameter in method["parameters"]: - desc = method["parameters"][parameter] - f.write("- **{}**: {}\n".format(parameter, desc)) + self._create_handler_directory(handler_name) + + for path in sorted(self._documentation[handler_name]): + filename = self._file_path(path) + handler_doc = self._documentation[handler_name][path] + with open("docs/api/{}/{}.rst".format(handler_name, filename), 'w+') as f: + f.write('{}\n----------------------------------------------------------------------------------------------------------------------\n\n'.format(path)) + f.write('.. contents::\n') + for method in handler_doc["methods"]: + f.write('\n{} {}\n'.format(method["method"], path.replace("{", '**{').replace("}", "}**"))) + f.write('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n') + f.write('{}\n\n'.format(method["description"])) + + if len(method["parameters"]) > 0: + f.write("Parameters\n**********\n") + for parameter in method["parameters"]: + desc = method["parameters"][parameter] + f.write("- **{}**: {}\n".format(parameter, desc)) + f.write("\n") + + f.write("Response status codes\n**********************\n") + for code in method["status_codes"]: + desc = method["status_codes"][code] + f.write("- **{}**: {}\n".format(code, desc)) f.write("\n") - f.write("Response status codes\n**********************\n") - for code in method["status_codes"]: - desc = method["status_codes"][code] - f.write("- **{}**: {}\n".format(code, desc)) - f.write("\n") + if "properties" in method["input_schema"]: + f.write("Input\n*******\n") + self._write_definitions(f, method["input_schema"]) + self._write_json_schema(f, method["input_schema"]) - if "properties" in method["input_schema"]: - f.write("Input\n*******\n") - self._write_definitions(f, method["input_schema"]) - self._write_json_schema(f, method["input_schema"]) + if "properties" in method["output_schema"]: + f.write("Output\n*******\n") + self._write_json_schema(f, method["output_schema"]) - if "properties" in method["output_schema"]: - f.write("Output\n*******\n") - self._write_json_schema(f, method["output_schema"]) + self._include_query_example(f, method, path) - self._include_query_example(f, method, path) + def _create_handler_directory(self, handler_name): + """Create a directory for the handler and add an index inside""" + + directory = "docs/api/{}".format(handler_name) + os.makedirs(directory, exist_ok=True) + + with open("docs/api/{}.rst".format(handler_name), "w+") as f: + f.write(handler_name.replace("_", " ", ).capitalize()) + f.write("\n---------------------\n\n") + f.write(".. toctree::\n :glob:\n :maxdepth: 2\n\n {}/*\n".format(handler_name)) def _include_query_example(self, f, method, path): """If a sample session is available we include it in documentation""" @@ -81,7 +97,7 @@ class Documentation(object): f.write("Types\n+++++++++\n") for definition in sorted(schema['definitions']): desc = schema['definitions'][definition].get("description") - f.write("{}\n^^^^^^^^^^^^^^^^\n{}\n\n".format(definition, desc)) + f.write("{}\n^^^^^^^^^^^^^^^^^^^^^^\n{}\n\n".format(definition, desc)) self._write_json_schema(f, schema['definitions'][definition]) f.write("Body\n+++++++++\n") diff --git a/gns3server/web/route.py b/gns3server/web/route.py index 4de33da0..4bf5679b 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -83,18 +83,21 @@ class Route(object): input_schema = kw.get("input", {}) api_version = kw.get("version", 1) cls._path = "/v{version}{path}".format(path=path, version=api_version) - cls._documentation.setdefault(cls._path, {"methods": []}) def register(func): route = cls._path - cls._documentation[route]["methods"].append({ + handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.", "") + cls._documentation.setdefault(handler, {}) + cls._documentation[handler].setdefault(route, {"methods": []}) + + cls._documentation[handler][route]["methods"].append({ "method": method, "status_codes": kw.get("status_codes", {200: "OK"}), "parameters": kw.get("parameters", {}), "output_schema": output_schema, "input_schema": input_schema, - "description": kw.get("description", "") + "description": kw.get("description", ""), }) func = asyncio.coroutine(func) diff --git a/scripts/documentation.sh b/scripts/documentation.sh index 41111993..fff4ed24 100755 --- a/scripts/documentation.sh +++ b/scripts/documentation.sh @@ -28,7 +28,7 @@ export PYTEST_BUILD_DOCUMENTATION=1 rm -Rf docs/api/ mkdir -p docs/api/examples -py.test -v +#py.test -v python3 gns3server/web/documentation.py cd docs make html diff --git a/tests/modules/iou/test_iou_vm.py b/tests/modules/iou/test_iou_vm.py index 137bd984..1e93acd9 100644 --- a/tests/modules/iou/test_iou_vm.py +++ b/tests/modules/iou/test_iou_vm.py @@ -260,21 +260,21 @@ def test_enable_l1_keepalives(loop, vm): assert command == ["test"] -def test_start_capture(vm, tmpdir, manager, free_console_port): +def test_start_capture(vm, tmpdir, manager, free_console_port, loop): output_file = str(tmpdir / "test.pcap") nio = manager.create_nio(vm.iouyap_path, {"type": "nio_udp", "lport": free_console_port, "rport": free_console_port, "rhost": "192.168.1.2"}) vm.adapter_add_nio_binding(0, 0, nio) - vm.start_capture(0, 0, output_file) + loop.run_until_complete(asyncio.async(vm.start_capture(0, 0, output_file))) assert vm._adapters[0].get_nio(0).capturing -def test_stop_capture(vm, tmpdir, manager, free_console_port): +def test_stop_capture(vm, tmpdir, manager, free_console_port, loop): output_file = str(tmpdir / "test.pcap") nio = manager.create_nio(vm.iouyap_path, {"type": "nio_udp", "lport": free_console_port, "rport": free_console_port, "rhost": "192.168.1.2"}) vm.adapter_add_nio_binding(0, 0, nio) - vm.start_capture(0, 0, output_file) + loop.run_until_complete(vm.start_capture(0, 0, output_file)) assert vm._adapters[0].get_nio(0).capturing - vm.stop_capture(0, 0) + loop.run_until_complete(asyncio.async(vm.stop_capture(0, 0))) assert vm._adapters[0].get_nio(0).capturing == False