From 664cec97ba1d84a19bf0cc53244059296b9eaf43 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 7 Mar 2016 15:01:35 +0100 Subject: [PATCH] Create /hypervisor and /controller namespace --- ...get_version.txt => common_get_version.txt} | 0 ...st_version.txt => common_post_version.txt} | 0 ...ervers.txt => controller_post_servers.txt} | 2 +- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...ptersadapternumberdportsportnumberdnio.txt | 13 -- ...> hypervisor_delete_projectsprojectid.txt} | 2 +- ...ptersadapternumberdportsportnumberdnio.txt | 13 ++ ...or_delete_projectsprojectidiouvmsvmid.txt} | 6 +- ...ptersadapternumberdportsportnumberdnio.txt | 13 ++ ...r_delete_projectsprojectidqemuvmsvmid.txt} | 6 +- ...ptersadapternumberdportsportnumberdnio.txt | 13 ++ ...ptersadapternumberdportsportnumberdnio.txt | 13 ++ ...r_delete_projectsprojectidvpcsvmsvmid.txt} | 6 +- ...ptersadapternumberdportsportnumberdnio.txt | 13 ++ ...aces.txt => hypervisor_get_interfaces.txt} | 2 +- ...t_iouvms.txt => hypervisor_get_iouvms.txt} | 2 +- ...ojects.txt => hypervisor_get_projects.txt} | 14 +- ...t => hypervisor_get_projectsprojectid.txt} | 6 +- ...hypervisor_get_projectsprojectidfiles.txt} | 2 +- ...visor_get_projectsprojectidiouvmsvmid.txt} | 10 +- ...et_projectsprojectidiouvmsvmidconfigs.txt} | 6 +- ...isor_get_projectsprojectidqemuvmsvmid.txt} | 14 +- ...et_projectsprojectidvirtualboxvmsvmid.txt} | 8 +- ...isor_get_projectsprojectidvpcsvmsvmid.txt} | 10 +- ...es.txt => hypervisor_get_qemubinaries.txt} | 2 +- ...xt => hypervisor_get_qemucapabilities.txt} | 2 +- ...d.txt => hypervisor_post_configreload.txt} | 2 +- ...jects.txt => hypervisor_post_projects.txt} | 8 +- ...ypervisor_post_projectsprojectidclose.txt} | 2 +- ...pervisor_post_projectsprojectidcommit.txt} | 2 +- ...tersadapternumberdportsportnumberdnio.txt} | 6 +- ...ernumberdportsportnumberdstartcapture.txt} | 8 +- ...pternumberdportsportnumberdstopcapture.txt | 13 ++ ...pervisor_post_projectsprojectidiouvms.txt} | 10 +- ...tersadapternumberdportsportnumberdnio.txt} | 6 +- ...ernumberdportsportnumberdstartcapture.txt} | 8 +- ...pternumberdportsportnumberdstopcapture.txt | 13 ++ ...post_projectsprojectidiouvmsvmidreload.txt | 13 ++ ...post_projectsprojectidiouvmsvmidstart.txt} | 12 +- ...r_post_projectsprojectidiouvmsvmidstop.txt | 13 ++ ...rvisor_post_projectsprojectidportsudp.txt} | 2 +- ...ervisor_post_projectsprojectidqemuvms.txt} | 14 +- ...tersadapternumberdportsportnumberdnio.txt} | 6 +- ...st_projectsprojectidqemuvmsvmidreload.txt} | 6 +- ...st_projectsprojectidqemuvmsvmidresume.txt} | 6 +- ...ost_projectsprojectidqemuvmsvmidstart.txt} | 14 +- ...post_projectsprojectidqemuvmsvmidstop.txt} | 6 +- ...t_projectsprojectidqemuvmsvmidsuspend.txt} | 6 +- ...r_post_projectsprojectidvirtualboxvms.txt} | 4 +- ...tersadapternumberdportsportnumberdnio.txt} | 6 +- ...jectsprojectidvirtualboxvmsvmidreload.txt} | 6 +- ...jectsprojectidvirtualboxvmsvmidresume.txt} | 6 +- ...ojectsprojectidvirtualboxvmsvmidstart.txt} | 6 +- ...rojectsprojectidvirtualboxvmsvmidstop.txt} | 6 +- ...jectsprojectidvirtualboxvmsvmidsuspend.txt | 13 ++ ...ervisor_post_projectsprojectidvpcsvms.txt} | 6 +- ...tersadapternumberdportsportnumberdnio.txt} | 6 +- ...st_projectsprojectidvpcsvmsvmidreload.txt} | 6 +- ...ost_projectsprojectidvpcsvmsvmidstart.txt} | 10 +- ...post_projectsprojectidvpcsvmsvmidstop.txt} | 6 +- ...emuimg.txt => hypervisor_post_qemuimg.txt} | 2 +- ...t => hypervisor_put_projectsprojectid.txt} | 8 +- ...or_put_projectsprojectiddockervmsvmid.txt} | 10 +- ...visor_put_projectsprojectidiouvmsvmid.txt} | 12 +- ...isor_put_projectsprojectidqemuvmsvmid.txt} | 14 +- ...ut_projectsprojectidvirtualboxvmsvmid.txt} | 8 +- ...isor_put_projectsprojectidvpcsvmsvmid.txt} | 10 +- ...pternumberdportsportnumberdstopcapture.txt | 13 -- ...pternumberdportsportnumberdstopcapture.txt | 13 -- ...post_projectsprojectidiouvmsvmidreload.txt | 13 -- .../post_projectsprojectidiouvmsvmidstop.txt | 13 -- ...jectsprojectidvirtualboxvmsvmidsuspend.txt | 13 -- docs/api/v1/{server => common}/version.rst | 2 +- .../v1/{server => common}/version/version.rst | 10 +- docs/api/v1/controller/server.rst | 2 +- docs/api/v1/controller/server/servers.rst | 10 +- .../server/servershutdown.rst | 8 +- docs/api/v1/{server => hypervisor}/config.rst | 2 +- .../config/configreload.rst | 10 +- docs/api/v1/{server => hypervisor}/docker.rst | 2 +- .../docker/dockerimages.rst | 8 +- .../docker/projectsprojectiddockervms.rst | 8 +- .../docker/projectsprojectiddockervmsid.rst | 10 +- .../projectsprojectiddockervmsidreload.rst | 10 +- .../projectsprojectiddockervmsidstart.rst | 10 +- .../projectsprojectiddockervmsidstop.rst | 10 +- .../projectsprojectiddockervmsidsuspend.rst | 10 +- .../docker/projectsprojectiddockervmsvmid.rst | 12 +- ...ptersadapternumberdportsportnumberdnio.rst | 24 ++-- ...ternumberdportsportnumberdstartcapture.rst | 14 +- ...pternumberdportsportnumberdstopcapture.rst | 14 +- .../dynamips_device.rst | 2 +- .../projectsprojectiddynamipsdevices.rst | 8 +- ...ojectsprojectiddynamipsdevicesdeviceid.rst | 16 +-- ...mipsdevicesdeviceidportsportnumberdnio.rst | 16 +-- ...esdeviceidportsportnumberdstartcapture.rst | 10 +- ...cesdeviceidportsportnumberdstopcapture.rst | 10 +- .../v1/{server => hypervisor}/dynamips_vm.rst | 2 +- .../dynamips_vm/dynamipsvms.rst | 8 +- .../dynamips_vm/dynamipsvmspath.rst | 8 +- .../projectsprojectiddynamipsvms.rst | 8 +- .../projectsprojectiddynamipsvmsvmid.rst | 22 +-- ...ptersadapternumberdportsportnumberdnio.rst | 20 +-- ...ternumberdportsportnumberdstartcapture.rst | 12 +- ...pternumberdportsportnumberdstopcapture.rst | 12 +- ...ectsprojectiddynamipsvmsvmidautoidlepc.rst | 8 +- ...rojectsprojectiddynamipsvmsvmidconfigs.rst | 8 +- ...ctsprojectiddynamipsvmsvmidconfigssave.rst | 8 +- ...rojectiddynamipsvmsvmididlepcproposals.rst | 8 +- ...projectsprojectiddynamipsvmsvmidreload.rst | 10 +- ...projectsprojectiddynamipsvmsvmidresume.rst | 10 +- .../projectsprojectiddynamipsvmsvmidstart.rst | 10 +- .../projectsprojectiddynamipsvmsvmidstop.rst | 10 +- ...rojectsprojectiddynamipsvmsvmidsuspend.rst | 10 +- docs/api/v1/{server => hypervisor}/file.rst | 2 +- .../file/filesstream.rst | 8 +- docs/api/v1/{server => hypervisor}/iou.rst | 2 +- .../v1/{server => hypervisor}/iou/iouvms.rst | 10 +- .../{server => hypervisor}/iou/iouvmspath.rst | 8 +- .../iou/projectsprojectidiouvms.rst | 10 +- .../iou/projectsprojectidiouvmsvmid.rst | 28 ++-- ...ptersadapternumberdportsportnumberdnio.rst | 24 ++-- ...ternumberdportsportnumberdstartcapture.rst | 14 +- ...pternumberdportsportnumberdstopcapture.rst | 14 +- .../projectsprojectidiouvmsvmidconfigs.rst | 10 +- ...projectsprojectidiouvmsvmidconfigssave.rst | 8 +- .../iou/projectsprojectidiouvmsvmidreload.rst | 12 +- .../iou/projectsprojectidiouvmsvmidstart.rst | 12 +- .../iou/projectsprojectidiouvmsvmidstop.rst | 12 +- .../api/v1/{server => hypervisor}/network.rst | 2 +- .../network/interfaces.rst | 10 +- .../network/projectsprojectidportsudp.rst | 10 +- .../api/v1/{server => hypervisor}/project.rst | 2 +- .../project/projects.rst | 16 +-- .../project/projectsprojectid.rst | 22 +-- .../project/projectsprojectidclose.rst | 10 +- .../project/projectsprojectidcommit.rst | 10 +- .../project/projectsprojectidfiles.rst | 10 +- .../project/projectsprojectidfilespath.rst | 8 +- .../projectsprojectidnotifications.rst | 8 +- docs/api/v1/{server => hypervisor}/qemu.rst | 2 +- .../qemu/projectsprojectidqemuvms.rst | 10 +- .../qemu/projectsprojectidqemuvmsvmid.rst | 28 ++-- ...ptersadapternumberdportsportnumberdnio.rst | 24 ++-- .../projectsprojectidqemuvmsvmidreload.rst | 12 +- .../projectsprojectidqemuvmsvmidresume.rst | 12 +- .../projectsprojectidqemuvmsvmidstart.rst | 12 +- .../qemu/projectsprojectidqemuvmsvmidstop.rst | 12 +- .../projectsprojectidqemuvmsvmidsuspend.rst | 12 +- .../qemu/qemubinaries.rst | 10 +- .../qemu/qemucapabilities.rst | 10 +- .../{server => hypervisor}/qemu/qemuimg.rst | 10 +- .../qemu/qemuimgbinaries.rst | 8 +- .../{server => hypervisor}/qemu/qemuvms.rst | 8 +- .../qemu/qemuvmspath.rst | 8 +- .../v1/{server => hypervisor}/virtualbox.rst | 2 +- .../projectsprojectidvirtualboxvms.rst | 10 +- .../projectsprojectidvirtualboxvmsvmid.rst | 26 ++-- ...ptersadapternumberdportsportnumberdnio.rst | 24 ++-- ...ternumberdportsportnumberdstartcapture.rst | 12 +- ...pternumberdportsportnumberdstopcapture.rst | 12 +- ...ojectsprojectidvirtualboxvmsvmidreload.rst | 12 +- ...ojectsprojectidvirtualboxvmsvmidresume.rst | 12 +- ...rojectsprojectidvirtualboxvmsvmidstart.rst | 12 +- ...projectsprojectidvirtualboxvmsvmidstop.rst | 12 +- ...jectsprojectidvirtualboxvmsvmidsuspend.rst | 12 +- .../virtualbox/virtualboxvms.rst | 8 +- docs/api/v1/{server => hypervisor}/vmware.rst | 2 +- .../vmware/projectsprojectidvmwarevms.rst | 8 +- .../vmware/projectsprojectidvmwarevmsvmid.rst | 22 +-- ...ptersadapternumberdportsportnumberdnio.rst | 20 +-- ...ternumberdportsportnumberdstartcapture.rst | 12 +- ...pternumberdportsportnumberdstopcapture.rst | 12 +- ...sprojectidvmwarevmsvmidinterfacesvmnet.rst | 10 +- .../projectsprojectidvmwarevmsvmidreload.rst | 10 +- .../projectsprojectidvmwarevmsvmidresume.rst | 10 +- .../projectsprojectidvmwarevmsvmidstart.rst | 10 +- .../projectsprojectidvmwarevmsvmidstop.rst | 10 +- .../projectsprojectidvmwarevmsvmidsuspend.rst | 10 +- .../vmware/vmwarevms.rst | 8 +- docs/api/v1/{server => hypervisor}/vpcs.rst | 2 +- .../vpcs/projectsprojectidvpcsvms.rst | 10 +- .../vpcs/projectsprojectidvpcsvmsvmid.rst | 28 ++-- ...ptersadapternumberdportsportnumberdnio.rst | 24 ++-- .../projectsprojectidvpcsvmsvmidreload.rst | 12 +- .../projectsprojectidvpcsvmsvmidstart.rst | 12 +- .../vpcs/projectsprojectidvpcsvmsvmidstop.rst | 12 +- docs/api/v1/server/server.rst | 8 -- docs/index.rst | 41 +++++- gns3server/handlers/__init__.py | 32 +++-- .../handlers/api/controller/__init__.py | 0 .../api/{ => controller}/server_handler.py | 13 +- .../handlers/api/hypervisor/__init__.py | 0 .../api/{ => hypervisor}/config_handler.py | 5 +- .../api/{ => hypervisor}/docker_handler.py | 10 +- .../dynamips_device_handler.py | 14 +- .../{ => hypervisor}/dynamips_vm_handler.py | 22 +-- .../api/{ => hypervisor}/file_handler.py | 4 +- .../api/{ => hypervisor}/iou_handler.py | 20 +-- .../api/{ => hypervisor}/network_handler.py | 8 +- .../api/{ => hypervisor}/project_handler.py | 8 +- .../api/{ => hypervisor}/qemu_handler.py | 26 ++-- .../{ => hypervisor}/virtualbox_handler.py | 16 +-- .../api/{ => hypervisor}/vmware_handler.py | 16 +-- .../api/{ => hypervisor}/vpcs_handler.py | 12 +- gns3server/web/documentation.py | 45 +++--- gns3server/web/route.py | 47 ++++--- scripts/documentation.sh | 2 +- tests/conftest.py | 38 ++++- tests/handlers/api/.!13639!base.py | 0 tests/handlers/api/base.py | 43 ++++-- tests/handlers/api/controller/__init__.py | 0 .../api/{ => controller}/test_server.py | 4 +- tests/handlers/api/hypervisor/__init__.py | 0 .../api/{ => hypervisor}/test_config.py | 8 +- .../api/{ => hypervisor}/test_docker.py | 72 +++++----- .../api/{ => hypervisor}/test_dynamips.py | 52 +++---- .../api/{ => hypervisor}/test_file.py | 8 +- .../handlers/api/{ => hypervisor}/test_iou.py | 132 ++++++++--------- .../api/{ => hypervisor}/test_network.py | 8 +- .../api/{ => hypervisor}/test_project.py | 108 +++++++------- .../api/{ => hypervisor}/test_qemu.py | 133 +++++++++--------- .../api/{ => hypervisor}/test_virtualbox.py | 68 ++++----- .../api/{ => hypervisor}/test_vpcs.py | 76 +++++----- tests/handlers/api/test_version.py | 20 +-- tests/handlers/test_index.py | 8 +- tests/handlers/test_upload.py | 28 ++-- tests/web/test_documentation.py | 15 +- 231 files changed, 1576 insertions(+), 1480 deletions(-) rename docs/api/examples/{get_version.txt => common_get_version.txt} (100%) rename docs/api/examples/{post_version.txt => common_post_version.txt} (100%) rename docs/api/examples/{post_servers.txt => controller_post_servers.txt} (95%) delete mode 100644 docs/api/examples/delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt delete mode 100644 docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename docs/api/examples/{delete_projectsprojectid.txt => hypervisor_delete_projectsprojectid.txt} (86%) create mode 100644 docs/api/examples/hypervisor_delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt rename docs/api/examples/{delete_projectsprojectidiouvmsvmid.txt => hypervisor_delete_projectsprojectidiouvmsvmid.txt} (59%) create mode 100644 docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename docs/api/examples/{delete_projectsprojectidqemuvmsvmid.txt => hypervisor_delete_projectsprojectidqemuvmsvmid.txt} (59%) create mode 100644 docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt create mode 100644 docs/api/examples/hypervisor_delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename docs/api/examples/{delete_projectsprojectidvpcsvmsvmid.txt => hypervisor_delete_projectsprojectidvpcsvmsvmid.txt} (59%) create mode 100644 docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename docs/api/examples/{get_interfaces.txt => hypervisor_get_interfaces.txt} (97%) rename docs/api/examples/{get_iouvms.txt => hypervisor_get_iouvms.txt} (90%) rename docs/api/examples/{get_projects.txt => hypervisor_get_projects.txt} (77%) rename docs/api/examples/{get_projectsprojectid.txt => hypervisor_get_projectsprojectid.txt} (81%) rename docs/api/examples/{get_projectsprojectidfiles.txt => hypervisor_get_projectsprojectidfiles.txt} (91%) rename docs/api/examples/{get_projectsprojectidiouvmsvmid.txt => hypervisor_get_projectsprojectidiouvmsvmid.txt} (63%) rename docs/api/examples/{get_projectsprojectidiouvmsvmidconfigs.txt => hypervisor_get_projectsprojectidiouvmsvmidconfigs.txt} (51%) rename docs/api/examples/{get_projectsprojectidqemuvmsvmid.txt => hypervisor_get_projectsprojectidqemuvmsvmid.txt} (73%) rename docs/api/examples/{get_projectsprojectidvirtualboxvmsvmid.txt => hypervisor_get_projectsprojectidvirtualboxvmsvmid.txt} (72%) rename docs/api/examples/{get_projectsprojectidvpcsvmsvmid.txt => hypervisor_get_projectsprojectidvpcsvmsvmid.txt} (55%) rename docs/api/examples/{get_qemubinaries.txt => hypervisor_get_qemubinaries.txt} (93%) rename docs/api/examples/{get_qemucapabilities.txt => hypervisor_get_qemucapabilities.txt} (87%) rename docs/api/examples/{post_configreload.txt => hypervisor_post_configreload.txt} (86%) rename docs/api/examples/{post_projects.txt => hypervisor_post_projects.txt} (72%) rename docs/api/examples/{post_projectsprojectidclose.txt => hypervisor_post_projectsprojectidclose.txt} (85%) rename docs/api/examples/{post_projectsprojectidcommit.txt => hypervisor_post_projectsprojectidcommit.txt} (85%) rename docs/api/examples/{post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt => hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt} (62%) rename docs/api/examples/{post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt => hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt} (58%) create mode 100644 docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt rename docs/api/examples/{post_projectsprojectidiouvms.txt => hypervisor_post_projectsprojectidiouvms.txt} (75%) rename docs/api/examples/{post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt => hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt} (52%) rename docs/api/examples/{post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt => hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt} (51%) create mode 100644 docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt create mode 100644 docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidreload.txt rename docs/api/examples/{post_projectsprojectidiouvmsvmidstart.txt => hypervisor_post_projectsprojectidiouvmsvmidstart.txt} (61%) create mode 100644 docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstop.txt rename docs/api/examples/{post_projectsprojectidportsudp.txt => hypervisor_post_projectsprojectidportsudp.txt} (87%) rename docs/api/examples/{post_projectsprojectidqemuvms.txt => hypervisor_post_projectsprojectidqemuvms.txt} (81%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt => hypervisor_post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt} (61%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidresume.txt => hypervisor_post_projectsprojectidqemuvmsvmidreload.txt} (56%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidstop.txt => hypervisor_post_projectsprojectidqemuvmsvmidresume.txt} (56%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidstart.txt => hypervisor_post_projectsprojectidqemuvmsvmidstart.txt} (75%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidreload.txt => hypervisor_post_projectsprojectidqemuvmsvmidstop.txt} (56%) rename docs/api/examples/{post_projectsprojectidqemuvmsvmidsuspend.txt => hypervisor_post_projectsprojectidqemuvmsvmidsuspend.txt} (55%) rename docs/api/examples/{post_projectsprojectidvirtualboxvms.txt => hypervisor_post_projectsprojectidvirtualboxvms.txt} (88%) rename docs/api/examples/{post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt => hypervisor_post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt} (62%) rename docs/api/examples/{post_projectsprojectidvirtualboxvmsvmidstart.txt => hypervisor_post_projectsprojectidvirtualboxvmsvmidreload.txt} (54%) rename docs/api/examples/{post_projectsprojectidvirtualboxvmsvmidstop.txt => hypervisor_post_projectsprojectidvirtualboxvmsvmidresume.txt} (54%) rename docs/api/examples/{post_projectsprojectidvirtualboxvmsvmidresume.txt => hypervisor_post_projectsprojectidvirtualboxvmsvmidstart.txt} (54%) rename docs/api/examples/{post_projectsprojectidvirtualboxvmsvmidreload.txt => hypervisor_post_projectsprojectidvirtualboxvmsvmidstop.txt} (54%) create mode 100644 docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidsuspend.txt rename docs/api/examples/{post_projectsprojectidvpcsvms.txt => hypervisor_post_projectsprojectidvpcsvms.txt} (74%) rename docs/api/examples/{post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt => hypervisor_post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt} (62%) rename docs/api/examples/{post_projectsprojectidvpcsvmsvmidstop.txt => hypervisor_post_projectsprojectidvpcsvmsvmidreload.txt} (56%) rename docs/api/examples/{post_projectsprojectidvpcsvmsvmidstart.txt => hypervisor_post_projectsprojectidvpcsvmsvmidstart.txt} (60%) rename docs/api/examples/{post_projectsprojectidvpcsvmsvmidreload.txt => hypervisor_post_projectsprojectidvpcsvmsvmidstop.txt} (56%) rename docs/api/examples/{post_qemuimg.txt => hypervisor_post_qemuimg.txt} (94%) rename docs/api/examples/{put_projectsprojectid.txt => hypervisor_put_projectsprojectid.txt} (54%) rename docs/api/examples/{put_projectsprojectiddockervmsvmid.txt => hypervisor_put_projectsprojectiddockervmsvmid.txt} (65%) rename docs/api/examples/{put_projectsprojectidiouvmsvmid.txt => hypervisor_put_projectsprojectidiouvmsvmid.txt} (70%) rename docs/api/examples/{put_projectsprojectidqemuvmsvmid.txt => hypervisor_put_projectsprojectidqemuvmsvmid.txt} (73%) rename docs/api/examples/{put_projectsprojectidvirtualboxvmsvmid.txt => hypervisor_put_projectsprojectidvirtualboxvmsvmid.txt} (70%) rename docs/api/examples/{put_projectsprojectidvpcsvmsvmid.txt => hypervisor_put_projectsprojectidvpcsvmsvmid.txt} (57%) delete mode 100644 docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt delete mode 100644 docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt delete mode 100644 docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt delete mode 100644 docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt delete mode 100644 docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt rename docs/api/v1/{server => common}/version.rst (67%) rename docs/api/v1/{server => common}/version/version.rst (90%) rename docs/api/v1/{server => controller}/server/servershutdown.rst (66%) rename docs/api/v1/{server => hypervisor}/config.rst (66%) rename docs/api/v1/{server => hypervisor}/config/configreload.rst (61%) rename docs/api/v1/{server => hypervisor}/docker.rst (66%) rename docs/api/v1/{server => hypervisor}/docker/dockerimages.rst (64%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervms.rst (95%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsid.rst (67%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsidreload.rst (95%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsidstart.rst (95%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsidstop.rst (95%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsidsuspend.rst (95%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsvmid.rst (93%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst (58%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst (70%) rename docs/api/v1/{server => hypervisor}/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst (55%) rename docs/api/v1/{server => hypervisor}/dynamips_device.rst (72%) rename docs/api/v1/{server => hypervisor}/dynamips_device/projectsprojectiddynamipsdevices.rst (90%) rename docs/api/v1/{server => hypervisor}/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst (91%) rename docs/api/v1/{server => hypervisor}/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst (93%) rename docs/api/v1/{server => hypervisor}/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst (76%) rename docs/api/v1/{server => hypervisor}/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst (61%) rename docs/api/v1/{server => hypervisor}/dynamips_vm.rst (70%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/dynamipsvms.rst (66%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/dynamipsvmspath.rst (62%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvms.rst (98%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst (98%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst (67%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst (75%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst (61%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst (59%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst (80%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst (59%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst (58%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst (65%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst (65%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst (65%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst (65%) rename docs/api/v1/{server => hypervisor}/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst (65%) rename docs/api/v1/{server => hypervisor}/file.rst (65%) rename docs/api/v1/{server => hypervisor}/file/filesstream.rst (82%) rename docs/api/v1/{server => hypervisor}/iou.rst (64%) rename docs/api/v1/{server => hypervisor}/iou/iouvms.rst (61%) rename docs/api/v1/{server => hypervisor}/iou/iouvmspath.rst (63%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvms.rst (96%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmid.rst (94%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst (60%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst (70%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst (56%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidconfigs.rst (76%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidconfigssave.rst (60%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidreload.rst (60%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidstart.rst (92%) rename docs/api/v1/{server => hypervisor}/iou/projectsprojectidiouvmsvmidstop.rst (60%) rename docs/api/v1/{server => hypervisor}/network.rst (67%) rename docs/api/v1/{server => hypervisor}/network/interfaces.rst (60%) rename docs/api/v1/{server => hypervisor}/network/projectsprojectidportsudp.rst (60%) rename docs/api/v1/{server => hypervisor}/project.rst (67%) rename docs/api/v1/{server => hypervisor}/project/projects.rst (88%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectid.rst (88%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectidclose.rst (61%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectidcommit.rst (61%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectidfiles.rst (61%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectidfilespath.rst (65%) rename docs/api/v1/{server => hypervisor}/project/projectsprojectidnotifications.rst (66%) rename docs/api/v1/{server => hypervisor}/qemu.rst (65%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvms.rst (98%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmid.rst (97%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst (59%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidreload.rst (60%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidresume.rst (60%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidstart.rst (96%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidstop.rst (60%) rename docs/api/v1/{server => hypervisor}/qemu/projectsprojectidqemuvmsvmidsuspend.rst (59%) rename docs/api/v1/{server => hypervisor}/qemu/qemubinaries.rst (77%) rename docs/api/v1/{server => hypervisor}/qemu/qemucapabilities.rst (75%) rename docs/api/v1/{server => hypervisor}/qemu/qemuimg.rst (92%) rename docs/api/v1/{server => hypervisor}/qemu/qemuimgbinaries.rst (68%) rename docs/api/v1/{server => hypervisor}/qemu/qemuvms.rst (67%) rename docs/api/v1/{server => hypervisor}/qemu/qemuvmspath.rst (62%) rename docs/api/v1/{server => hypervisor}/virtualbox.rst (69%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvms.rst (94%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmid.rst (92%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst (59%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst (75%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst (60%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst (59%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst (59%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst (59%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst (59%) rename docs/api/v1/{server => hypervisor}/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst (58%) rename docs/api/v1/{server => hypervisor}/virtualbox/virtualboxvms.rst (64%) rename docs/api/v1/{server => hypervisor}/vmware.rst (66%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevms.rst (96%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmid.rst (94%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst (67%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst (75%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst (61%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst (62%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidreload.rst (65%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidresume.rst (66%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidstart.rst (65%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidstop.rst (65%) rename docs/api/v1/{server => hypervisor}/vmware/projectsprojectidvmwarevmsvmidsuspend.rst (65%) rename docs/api/v1/{server => hypervisor}/vmware/vmwarevms.rst (65%) rename docs/api/v1/{server => hypervisor}/vpcs.rst (65%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvms.rst (91%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvmsvmid.rst (89%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst (60%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvmsvmidreload.rst (59%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvmsvmidstart.rst (87%) rename docs/api/v1/{server => hypervisor}/vpcs/projectsprojectidvpcsvmsvmidstop.rst (60%) delete mode 100644 docs/api/v1/server/server.rst create mode 100644 gns3server/handlers/api/controller/__init__.py rename gns3server/handlers/api/{ => controller}/server_handler.py (89%) create mode 100644 gns3server/handlers/api/hypervisor/__init__.py rename gns3server/handlers/api/{ => hypervisor}/config_handler.py (95%) rename gns3server/handlers/api/{ => hypervisor}/docker_handler.py (98%) rename gns3server/handlers/api/{ => hypervisor}/dynamips_device_handler.py (95%) rename gns3server/handlers/api/{ => hypervisor}/dynamips_vm_handler.py (97%) rename gns3server/handlers/api/{ => hypervisor}/file_handler.py (96%) rename gns3server/handlers/api/{ => hypervisor}/iou_handler.py (97%) rename gns3server/handlers/api/{ => hypervisor}/network_handler.py (90%) rename gns3server/handlers/api/{ => hypervisor}/project_handler.py (97%) rename gns3server/handlers/api/{ => hypervisor}/qemu_handler.py (95%) rename gns3server/handlers/api/{ => hypervisor}/virtualbox_handler.py (97%) rename gns3server/handlers/api/{ => hypervisor}/vmware_handler.py (97%) rename gns3server/handlers/api/{ => hypervisor}/vpcs_handler.py (96%) create mode 100644 tests/handlers/api/.!13639!base.py create mode 100644 tests/handlers/api/controller/__init__.py rename tests/handlers/api/{ => controller}/test_server.py (90%) create mode 100644 tests/handlers/api/hypervisor/__init__.py rename tests/handlers/api/{ => hypervisor}/test_config.py (85%) rename tests/handlers/api/{ => hypervisor}/test_docker.py (64%) rename tests/handlers/api/{ => hypervisor}/test_dynamips.py (72%) rename tests/handlers/api/{ => hypervisor}/test_file.py (83%) rename tests/handlers/api/{ => hypervisor}/test_iou.py (64%) rename tests/handlers/api/{ => hypervisor}/test_network.py (80%) rename tests/handlers/api/{ => hypervisor}/test_project.py (60%) rename tests/handlers/api/{ => hypervisor}/test_qemu.py (63%) rename tests/handlers/api/{ => hypervisor}/test_virtualbox.py (60%) rename tests/handlers/api/{ => hypervisor}/test_vpcs.py (57%) diff --git a/docs/api/examples/get_version.txt b/docs/api/examples/common_get_version.txt similarity index 100% rename from docs/api/examples/get_version.txt rename to docs/api/examples/common_get_version.txt diff --git a/docs/api/examples/post_version.txt b/docs/api/examples/common_post_version.txt similarity index 100% rename from docs/api/examples/post_version.txt rename to docs/api/examples/common_post_version.txt diff --git a/docs/api/examples/post_servers.txt b/docs/api/examples/controller_post_servers.txt similarity index 95% rename from docs/api/examples/post_servers.txt rename to docs/api/examples/controller_post_servers.txt index fbfff075..aba2d76a 100644 --- a/docs/api/examples/post_servers.txt +++ b/docs/api/examples/controller_post_servers.txt @@ -17,7 +17,7 @@ CONTENT-LENGTH: 176 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/servers +X-ROUTE: /v1/controller/servers { "connected": false, diff --git a/docs/api/examples/delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index b2d1a2ae..00000000 --- a/docs/api/examples/delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/e855808c-9a1c-4451-b9db-1abcf06438b3/adapters/0/ports/0/nio' - -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/e855808c-9a1c-4451-b9db-1abcf06438b3/adapters/0/ports/0/nio HTTP/1.1 - - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index 0c1a3792..00000000 --- a/docs/api/examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6febc8c7-15ae-4bcf-81d0-4320f8af74c3/adapters/1/ports/0/nio' - -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6febc8c7-15ae-4bcf-81d0-4320f8af74c3/adapters/1/ports/0/nio HTTP/1.1 - - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -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_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index f72fd4ad..00000000 --- a/docs/api/examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/07380e9c-270b-441a-ba40-9a96f61a9f42/adapters/1/ports/0/nio' - -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/07380e9c-270b-441a-ba40-9a96f61a9f42/adapters/1/ports/0/nio HTTP/1.1 - - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio - diff --git a/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt deleted file mode 100644 index bbb84600..00000000 --- a/docs/api/examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/b85227ef-5bd7-4f6f-8bee-fdc859ada69b/adapters/0/ports/0/nio' - -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/b85227ef-5bd7-4f6f-8bee-fdc859ada69b/adapters/0/ports/0/nio HTTP/1.1 - - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/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 13672573..00000000 --- a/docs/api/examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/8acc4ad4-9c93-4ac9-88ac-46fd449fa994/adapters/0/ports/0/nio' - -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/8acc4ad4-9c93-4ac9-88ac-46fd449fa994/adapters/0/ports/0/nio HTTP/1.1 - - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -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/delete_projectsprojectid.txt b/docs/api/examples/hypervisor_delete_projectsprojectid.txt similarity index 86% rename from docs/api/examples/delete_projectsprojectid.txt rename to docs/api/examples/hypervisor_delete_projectsprojectid.txt index 5a6f0870..7080eb25 100644 --- a/docs/api/examples/delete_projectsprojectid.txt +++ b/docs/api/examples/hypervisor_delete_projectsprojectid.txt @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id} +X-ROUTE: /v1/hypervisor/projects/{project_id} diff --git a/docs/api/examples/hypervisor_delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt new file mode 100644 index 00000000..e905d31f --- /dev/null +++ b/docs/api/examples/hypervisor_delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/95443b90-227a-4c50-acc4-41cce637a7fa/adapters/0/ports/0/nio' + +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/95443b90-227a-4c50-acc4-41cce637a7fa/adapters/0/ports/0/nio HTTP/1.1 + + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio + diff --git a/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt b/docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmid.txt similarity index 59% rename from docs/api/examples/delete_projectsprojectidiouvmsvmid.txt rename to docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmid.txt index 7b6f3d0c..22e0016a 100644 --- a/docs/api/examples/delete_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/462dc3bc-80d3-4597-afe9-332956132b1d' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/487f966e-f0b7-440e-9360-dd0b3ec85298' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/462dc3bc-80d3-4597-afe9-332956132b1d HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/487f966e-f0b7-440e-9360-dd0b3ec85298 HTTP/1.1 @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id} diff --git a/docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt new file mode 100644 index 00000000..67ef222a --- /dev/null +++ b/docs/api/examples/hypervisor_delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/397fcae2-0e84-4289-9bfc-9f647ffba05b/adapters/1/ports/0/nio' + +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/397fcae2-0e84-4289-9bfc-9f647ffba05b/adapters/1/ports/0/nio HTTP/1.1 + + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio + diff --git a/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmid.txt similarity index 59% rename from docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt rename to docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmid.txt index 9f4297a7..a047ee0d 100644 --- a/docs/api/examples/delete_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/faf129e7-c74c-4851-8677-7030cdc63a75' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/089172d7-6de2-4936-961f-1cddec3ec4df' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/faf129e7-c74c-4851-8677-7030cdc63a75 HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/089172d7-6de2-4936-961f-1cddec3ec4df HTTP/1.1 @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id} diff --git a/docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt new file mode 100644 index 00000000..c07b9c7c --- /dev/null +++ b/docs/api/examples/hypervisor_delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d734018d-601c-4b62-b044-5abd8c99bbd1/adapters/1/ports/0/nio' + +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d734018d-601c-4b62-b044-5abd8c99bbd1/adapters/1/ports/0/nio HTTP/1.1 + + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio + diff --git a/docs/api/examples/hypervisor_delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt new file mode 100644 index 00000000..2e1f614c --- /dev/null +++ b/docs/api/examples/hypervisor_delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/149016fb-30de-44c9-b28b-ddb3c66b150d/adapters/0/ports/0/nio' + +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/149016fb-30de-44c9-b28b-ddb3c66b150d/adapters/0/ports/0/nio HTTP/1.1 + + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio + diff --git a/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmid.txt similarity index 59% rename from docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt rename to docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmid.txt index 00b00189..6c1c462f 100644 --- a/docs/api/examples/delete_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/e2a4567d-d8e9-4bc9-aede-c00dce610025' +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/59b49b36-b525-48ef-8cdc-1d004fd3c93e' -DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/e2a4567d-d8e9-4bc9-aede-c00dce610025 HTTP/1.1 +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/59b49b36-b525-48ef-8cdc-1d004fd3c93e HTTP/1.1 @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id} diff --git a/docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt new file mode 100644 index 00000000..6152b562 --- /dev/null +++ b/docs/api/examples/hypervisor_delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -0,0 +1,13 @@ +curl -i -X DELETE 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c1431d7f-7a11-4765-bfcf-af3042313503/adapters/0/ports/0/nio' + +DELETE /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/c1431d7f-7a11-4765-bfcf-af3042313503/adapters/0/ports/0/nio HTTP/1.1 + + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/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/hypervisor_get_interfaces.txt similarity index 97% rename from docs/api/examples/get_interfaces.txt rename to docs/api/examples/hypervisor_get_interfaces.txt index b1ab25c1..17fb4b7a 100644 --- a/docs/api/examples/get_interfaces.txt +++ b/docs/api/examples/hypervisor_get_interfaces.txt @@ -10,7 +10,7 @@ CONTENT-LENGTH: 1253 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/interfaces +X-ROUTE: /v1/hypervisor/interfaces [ { diff --git a/docs/api/examples/get_iouvms.txt b/docs/api/examples/hypervisor_get_iouvms.txt similarity index 90% rename from docs/api/examples/get_iouvms.txt rename to docs/api/examples/hypervisor_get_iouvms.txt index 5b52e2ed..c0ec53e9 100644 --- a/docs/api/examples/get_iouvms.txt +++ b/docs/api/examples/hypervisor_get_iouvms.txt @@ -10,7 +10,7 @@ CONTENT-LENGTH: 72 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/iou/vms +X-ROUTE: /v1/hypervisor/iou/vms [ { diff --git a/docs/api/examples/get_projects.txt b/docs/api/examples/hypervisor_get_projects.txt similarity index 77% rename from docs/api/examples/get_projects.txt rename to docs/api/examples/hypervisor_get_projects.txt index 3e2f61a6..ad89c6bc 100644 --- a/docs/api/examples/get_projects.txt +++ b/docs/api/examples/hypervisor_get_projects.txt @@ -10,21 +10,21 @@ CONTENT-LENGTH: 692 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects +X-ROUTE: /v1/hypervisor/projects [ { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp56cw4wg9/projects", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpvw_p95ay/projects", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp56cw4wg9/projects/00010203-0405-0607-0809-0a0b0c0d0e0b", - "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0b", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpvw_p95ay/projects/00010203-0405-0607-0809-0a0b0c0d0e0f", + "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", "temporary": false }, { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp56cw4wg9/projects", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpvw_p95ay/projects", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp56cw4wg9/projects/00010203-0405-0607-0809-0a0b0c0d0e0f", - "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpvw_p95ay/projects/00010203-0405-0607-0809-0a0b0c0d0e0b", + "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0b", "temporary": false } ] diff --git a/docs/api/examples/get_projectsprojectid.txt b/docs/api/examples/hypervisor_get_projectsprojectid.txt similarity index 81% rename from docs/api/examples/get_projectsprojectid.txt rename to docs/api/examples/hypervisor_get_projectsprojectid.txt index 52db1d3b..db0372e4 100644 --- a/docs/api/examples/get_projectsprojectid.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectid.txt @@ -10,12 +10,12 @@ CONTENT-LENGTH: 315 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id} +X-ROUTE: /v1/hypervisor/projects/{project_id} { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2r8r1n4h/projects", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpifme43c6/projects", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp2r8r1n4h/projects/00010203-0405-0607-0809-0a0b0c0d0e02", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpifme43c6/projects/00010203-0405-0607-0809-0a0b0c0d0e02", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e02", "temporary": false } diff --git a/docs/api/examples/get_projectsprojectidfiles.txt b/docs/api/examples/hypervisor_get_projectsprojectidfiles.txt similarity index 91% rename from docs/api/examples/get_projectsprojectidfiles.txt rename to docs/api/examples/hypervisor_get_projectsprojectidfiles.txt index 328eacce..0f44d68f 100644 --- a/docs/api/examples/get_projectsprojectidfiles.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidfiles.txt @@ -10,7 +10,7 @@ CONTENT-LENGTH: 204 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/files +X-ROUTE: /v1/hypervisor/projects/{project_id}/files [ { diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt b/docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmid.txt similarity index 63% rename from docs/api/examples/get_projectsprojectidiouvmsvmid.txt rename to docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmid.txt index 55a4cf93..6822bc99 100644 --- a/docs/api/examples/get_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f2f721ce-fb76-4b27-bf90-c4fd548db372' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/88a020ea-366e-4cd1-8d4d-4963e11d61eb' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/f2f721ce-fb76-4b27-bf90-c4fd548db372 HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/88a020ea-366e-4cd1-8d4d-4963e11d61eb HTTP/1.1 @@ -10,7 +10,7 @@ CONTENT-LENGTH: 643 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id} { "command_line": "", @@ -28,6 +28,6 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} "serial_adapters": 2, "startup_config": null, "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/f2f721ce-fb76-4b27-bf90-c4fd548db372", - "vm_id": "f2f721ce-fb76-4b27-bf90-c4fd548db372" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/88a020ea-366e-4cd1-8d4d-4963e11d61eb", + "vm_id": "88a020ea-366e-4cd1-8d4d-4963e11d61eb" } diff --git a/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt b/docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmidconfigs.txt similarity index 51% rename from docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt rename to docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmidconfigs.txt index 179d2768..9ed58791 100644 --- a/docs/api/examples/get_projectsprojectidiouvmsvmidconfigs.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidiouvmsvmidconfigs.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/cce11ae9-169f-4be9-8104-3a1ad07d95ea/configs' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/a795d38e-6c70-423e-ba56-c847c9bea0e1/configs' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/cce11ae9-169f-4be9-8104-3a1ad07d95ea/configs HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/a795d38e-6c70-423e-ba56-c847c9bea0e1/configs HTTP/1.1 @@ -10,7 +10,7 @@ CONTENT-LENGTH: 40 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/configs +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/configs { "startup_config_content": "TEST" diff --git a/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/hypervisor_get_projectsprojectidqemuvmsvmid.txt similarity index 73% rename from docs/api/examples/get_projectsprojectidqemuvmsvmid.txt rename to docs/api/examples/hypervisor_get_projectsprojectidqemuvmsvmid.txt index b62fb757..598c74ba 100644 --- a/docs/api/examples/get_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidqemuvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b7c0e4f8-f8a9-4a48-9e5c-62b5845c22c6' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/87059fce-411b-4bde-9fe5-ff3a52b4665a' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/b7c0e4f8-f8a9-4a48-9e5c-62b5845c22c6 HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/87059fce-411b-4bde-9fe5-ff3a52b4665a HTTP/1.1 @@ -10,7 +10,7 @@ CONTENT-LENGTH: 1386 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id} { "acpi_shutdown": false, @@ -42,15 +42,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:22:c6:00", + "mac_address": "00:00:ab:66:5a:00", "name": "PC TEST 1", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 256, "usage": "", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/b7c0e4f8-f8a9-4a48-9e5c-62b5845c22c6", - "vm_id": "b7c0e4f8-f8a9-4a48-9e5c-62b5845c22c6" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/87059fce-411b-4bde-9fe5-ff3a52b4665a", + "vm_id": "87059fce-411b-4bde-9fe5-ff3a52b4665a" } diff --git a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/hypervisor_get_projectsprojectidvirtualboxvmsvmid.txt similarity index 72% rename from docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt rename to docs/api/examples/hypervisor_get_projectsprojectidvirtualboxvmsvmid.txt index 72296073..cbbd357a 100644 --- a/docs/api/examples/get_projectsprojectidvirtualboxvmsvmid.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidvirtualboxvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f8b22093-7b10-4043-ad98-1ff5d2d6bf64' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/90cbd7a9-dddf-43cf-90c7-766ae33a49f5' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/f8b22093-7b10-4043-ad98-1ff5d2d6bf64 HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/90cbd7a9-dddf-43cf-90c7-766ae33a49f5 HTTP/1.1 @@ -10,7 +10,7 @@ CONTENT-LENGTH: 415 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id} { "acpi_shutdown": false, @@ -24,6 +24,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "f8b22093-7b10-4043-ad98-1ff5d2d6bf64", + "vm_id": "90cbd7a9-dddf-43cf-90c7-766ae33a49f5", "vmname": "VMTEST" } diff --git a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/hypervisor_get_projectsprojectidvpcsvmsvmid.txt similarity index 55% rename from docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt rename to docs/api/examples/hypervisor_get_projectsprojectidvpcsvmsvmid.txt index 500be76d..17567224 100644 --- a/docs/api/examples/get_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/hypervisor_get_projectsprojectidvpcsvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/1ef629f2-14b4-40d8-8a38-6e5efd975bf3' +curl -i -X GET 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fdd9250a-63f3-4027-8754-eef610194c57' -GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/1ef629f2-14b4-40d8-8a38-6e5efd975bf3 HTTP/1.1 +GET /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fdd9250a-63f3-4027-8754-eef610194c57 HTTP/1.1 @@ -10,7 +10,7 @@ CONTENT-LENGTH: 455 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id} { "command_line": "", @@ -20,6 +20,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} "startup_script": null, "startup_script_path": null, "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/1ef629f2-14b4-40d8-8a38-6e5efd975bf3", - "vm_id": "1ef629f2-14b4-40d8-8a38-6e5efd975bf3" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/fdd9250a-63f3-4027-8754-eef610194c57", + "vm_id": "fdd9250a-63f3-4027-8754-eef610194c57" } diff --git a/docs/api/examples/get_qemubinaries.txt b/docs/api/examples/hypervisor_get_qemubinaries.txt similarity index 93% rename from docs/api/examples/get_qemubinaries.txt rename to docs/api/examples/hypervisor_get_qemubinaries.txt index 0b2b2065..b6a15496 100644 --- a/docs/api/examples/get_qemubinaries.txt +++ b/docs/api/examples/hypervisor_get_qemubinaries.txt @@ -14,7 +14,7 @@ CONTENT-LENGTH: 212 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/qemu/binaries +X-ROUTE: /v1/hypervisor/qemu/binaries [ { diff --git a/docs/api/examples/get_qemucapabilities.txt b/docs/api/examples/hypervisor_get_qemucapabilities.txt similarity index 87% rename from docs/api/examples/get_qemucapabilities.txt rename to docs/api/examples/hypervisor_get_qemucapabilities.txt index 681a2afe..706ec47f 100644 --- a/docs/api/examples/get_qemucapabilities.txt +++ b/docs/api/examples/hypervisor_get_qemucapabilities.txt @@ -10,7 +10,7 @@ CONTENT-LENGTH: 39 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/qemu/capabilities +X-ROUTE: /v1/hypervisor/qemu/capabilities { "kvm": [ diff --git a/docs/api/examples/post_configreload.txt b/docs/api/examples/hypervisor_post_configreload.txt similarity index 86% rename from docs/api/examples/post_configreload.txt rename to docs/api/examples/hypervisor_post_configreload.txt index 2b71315d..77f65a85 100644 --- a/docs/api/examples/post_configreload.txt +++ b/docs/api/examples/hypervisor_post_configreload.txt @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/config/reload +X-ROUTE: /v1/hypervisor/config/reload diff --git a/docs/api/examples/post_projects.txt b/docs/api/examples/hypervisor_post_projects.txt similarity index 72% rename from docs/api/examples/post_projects.txt rename to docs/api/examples/hypervisor_post_projects.txt index 184c1987..7f36b299 100644 --- a/docs/api/examples/post_projects.txt +++ b/docs/api/examples/hypervisor_post_projects.txt @@ -12,12 +12,12 @@ CONTENT-LENGTH: 315 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects +X-ROUTE: /v1/hypervisor/projects { - "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5mz0iw2t/projects", + "location": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpw5zez4l6/projects", "name": "test", - "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp5mz0iw2t/projects/3a5333d2-6f73-4647-a263-664b5eb427eb", - "project_id": "3a5333d2-6f73-4647-a263-664b5eb427eb", + "path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpw5zez4l6/projects/28e98ad8-23a2-48ea-a316-c9e5d9bb40d5", + "project_id": "28e98ad8-23a2-48ea-a316-c9e5d9bb40d5", "temporary": false } diff --git a/docs/api/examples/post_projectsprojectidclose.txt b/docs/api/examples/hypervisor_post_projectsprojectidclose.txt similarity index 85% rename from docs/api/examples/post_projectsprojectidclose.txt rename to docs/api/examples/hypervisor_post_projectsprojectidclose.txt index 93aebd77..174228ce 100644 --- a/docs/api/examples/post_projectsprojectidclose.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidclose.txt @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/close +X-ROUTE: /v1/hypervisor/projects/{project_id}/close diff --git a/docs/api/examples/post_projectsprojectidcommit.txt b/docs/api/examples/hypervisor_post_projectsprojectidcommit.txt similarity index 85% rename from docs/api/examples/post_projectsprojectidcommit.txt rename to docs/api/examples/hypervisor_post_projectsprojectidcommit.txt index fbd2f00a..de650a63 100644 --- a/docs/api/examples/post_projectsprojectidcommit.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidcommit.txt @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/commit +X-ROUTE: /v1/hypervisor/projects/{project_id}/commit diff --git a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt similarity index 62% rename from docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt rename to docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt index 2934c90c..87da743e 100644 --- a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/6bf1fc75-788a-4b87-89ee-3422d352fb91/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/d06db3b1-1bda-4758-b1e1-f28d84b30af8/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/6bf1fc75-788a-4b87-89ee-3422d352fb91/adapters/0/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/d06db3b1-1bda-4758-b1e1-f28d84b30af8/adapters/0/ports/0/nio HTTP/1.1 { "lport": 4242, "rhost": "127.0.0.1", @@ -15,7 +15,7 @@ CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +X-ROUTE: /v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { "lport": 4242, diff --git a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt similarity index 58% rename from docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt rename to docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt index 97ad851f..43395cb6 100644 --- a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/133a0c91-d934-4e2c-9fa0-db084a4a1630/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/0c55c22c-c92b-4352-8881-3777c22e39c1/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/133a0c91-d934-4e2c-9fa0-db084a4a1630/adapters/0/ports/0/start_capture HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/0c55c22c-c92b-4352-8881-3777c22e39c1/adapters/0/ports/0/start_capture HTTP/1.1 { "capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB" @@ -13,8 +13,8 @@ CONTENT-LENGTH: 167 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +X-ROUTE: /v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture { - "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" + "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" } diff --git a/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt new file mode 100644 index 00000000..8a955fa0 --- /dev/null +++ b/docs/api/examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/1e957352-5bcb-4655-9bc8-03f7e3b543b7/adapters/0/ports/0/stop_capture' -d '{}' + +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/1e957352-5bcb-4655-9bc8-03f7e3b543b7/adapters/0/ports/0/stop_capture HTTP/1.1 +{} + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture + diff --git a/docs/api/examples/post_projectsprojectidiouvms.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvms.txt similarity index 75% rename from docs/api/examples/post_projectsprojectidiouvms.txt rename to docs/api/examples/hypervisor_post_projectsprojectidiouvms.txt index be2f5abf..555327e7 100644 --- a/docs/api/examples/post_projectsprojectidiouvms.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvms.txt @@ -1,11 +1,11 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"name": "PC TEST 1", "path": "iou.bin", "startup_config_content": "hostname test", "vm_id": "0c8d2194-90a9-4877-bb6c-146dbd191115"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms' -d '{"name": "PC TEST 1", "path": "iou.bin", "startup_config_content": "hostname test", "vm_id": "939d59a8-17c9-40c5-8880-6d1bfc88a130"}' POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms HTTP/1.1 { "name": "PC TEST 1", "path": "iou.bin", "startup_config_content": "hostname test", - "vm_id": "0c8d2194-90a9-4877-bb6c-146dbd191115" + "vm_id": "939d59a8-17c9-40c5-8880-6d1bfc88a130" } @@ -15,7 +15,7 @@ CONTENT-LENGTH: 659 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms { "command_line": "", @@ -33,6 +33,6 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms "serial_adapters": 2, "startup_config": "startup-config.cfg", "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/0c8d2194-90a9-4877-bb6c-146dbd191115", - "vm_id": "0c8d2194-90a9-4877-bb6c-146dbd191115" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/939d59a8-17c9-40c5-8880-6d1bfc88a130", + "vm_id": "939d59a8-17c9-40c5-8880-6d1bfc88a130" } diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt similarity index 52% rename from docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename to docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 2fb8c0e5..06d1f43f 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/e1c1a20a-4580-4d22-bf5d-82e8c0eb4d0d/adapters/1/ports/0/nio' -d '{"ethernet_device": "bridge0", "type": "nio_generic_ethernet"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6ea8873d-ddda-47c1-afad-8303fcce4ac0/adapters/1/ports/0/nio' -d '{"ethernet_device": "bridge0", "type": "nio_generic_ethernet"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/e1c1a20a-4580-4d22-bf5d-82e8c0eb4d0d/adapters/1/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/6ea8873d-ddda-47c1-afad-8303fcce4ac0/adapters/1/ports/0/nio HTTP/1.1 { "ethernet_device": "bridge0", "type": "nio_generic_ethernet" @@ -13,7 +13,7 @@ CONTENT-LENGTH: 72 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { "ethernet_device": "bridge0", diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt similarity index 51% rename from docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt rename to docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt index 3a3254e7..d4af266c 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/4063d298-f884-45b7-be63-461cd7e3f245/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/8eb7925a-cd50-4fc6-bc55-30ea769d3a9a/adapters/0/ports/0/start_capture' -d '{"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/4063d298-f884-45b7-be63-461cd7e3f245/adapters/0/ports/0/start_capture HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/8eb7925a-cd50-4fc6-bc55-30ea769d3a9a/adapters/0/ports/0/start_capture HTTP/1.1 { "capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB" @@ -13,8 +13,8 @@ CONTENT-LENGTH: 167 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture { - "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" + "pcap_file_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/captures/test.pcap" } diff --git a/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt new file mode 100644 index 00000000..6480e491 --- /dev/null +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7bdba100-186c-4665-9f9e-beae8ccd47f6/adapters/0/ports/0/stop_capture' -d '{}' + +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/7bdba100-186c-4665-9f9e-beae8ccd47f6/adapters/0/ports/0/stop_capture HTTP/1.1 +{} + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture + diff --git a/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidreload.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidreload.txt new file mode 100644 index 00000000..282b1ee7 --- /dev/null +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidreload.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/78f1524b-0656-4666-94e5-d975c22a0362/reload' -d '{}' + +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/78f1524b-0656-4666-94e5-d975c22a0362/reload HTTP/1.1 +{} + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/reload + diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstart.txt similarity index 61% rename from docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt rename to docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstart.txt index 5f895737..49ec495b 100644 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidstart.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/88d36ca9-c18e-4d97-99ba-da62c2d37f0b/start' -d '{"iourc_content": "test"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2220af9e-1308-487c-9394-d07fc02b48d2/start' -d '{"iourc_content": "test"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/88d36ca9-c18e-4d97-99ba-da62c2d37f0b/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2220af9e-1308-487c-9394-d07fc02b48d2/start HTTP/1.1 { "iourc_content": "test" } @@ -12,13 +12,13 @@ CONTENT-LENGTH: 707 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/start +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/start { "command_line": "", "console": 2001, "ethernet_adapters": 2, - "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp8y4tqbp1/iourc", + "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpy0ailev_/iourc", "l1_keepalives": false, "md5sum": null, "name": "PC TEST 1", @@ -30,6 +30,6 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/start "serial_adapters": 2, "startup_config": null, "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/88d36ca9-c18e-4d97-99ba-da62c2d37f0b", - "vm_id": "88d36ca9-c18e-4d97-99ba-da62c2d37f0b" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/2220af9e-1308-487c-9394-d07fc02b48d2", + "vm_id": "2220af9e-1308-487c-9394-d07fc02b48d2" } diff --git a/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstop.txt b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstop.txt new file mode 100644 index 00000000..ee3691a3 --- /dev/null +++ b/docs/api/examples/hypervisor_post_projectsprojectidiouvmsvmidstop.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/afa54e26-adf2-48f7-b2ba-86f888de1898/stop' -d '{}' + +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/afa54e26-adf2-48f7-b2ba-86f888de1898/stop HTTP/1.1 +{} + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/stop + diff --git a/docs/api/examples/post_projectsprojectidportsudp.txt b/docs/api/examples/hypervisor_post_projectsprojectidportsudp.txt similarity index 87% rename from docs/api/examples/post_projectsprojectidportsudp.txt rename to docs/api/examples/hypervisor_post_projectsprojectidportsudp.txt index 82480352..d1133476 100644 --- a/docs/api/examples/post_projectsprojectidportsudp.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidportsudp.txt @@ -10,7 +10,7 @@ CONTENT-LENGTH: 25 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/ports/udp +X-ROUTE: /v1/hypervisor/projects/{project_id}/ports/udp { "udp_port": 10000 diff --git a/docs/api/examples/post_projectsprojectidqemuvms.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvms.txt similarity index 81% rename from docs/api/examples/post_projectsprojectidqemuvms.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvms.txt index 733be9a5..18bfdfd3 100644 --- a/docs/api/examples/post_projectsprojectidqemuvms.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvms.txt @@ -1,10 +1,10 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "linux\u8f7d.img", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", "ram": 1024}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms' -d '{"hda_disk_image": "linux\u8f7d.img", "name": "PC TEST 1", "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 1024}' POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms HTTP/1.1 { "hda_disk_image": "linux\u8f7d.img", "name": "PC TEST 1", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 1024 } @@ -15,7 +15,7 @@ CONTENT-LENGTH: 1432 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms { "acpi_shutdown": false, @@ -47,15 +47,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:51:28:00", + "mac_address": "00:00:ab:77:f2:00", "name": "PC TEST 1", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 1024, "usage": "", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/197873df-1639-4517-b9c0-401c9b325128", - "vm_id": "197873df-1639-4517-b9c0-401c9b325128" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/0a62f9a9-90e3-4248-84a9-01739dee77f2", + "vm_id": "0a62f9a9-90e3-4248-84a9-01739dee77f2" } diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt similarity index 61% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt index c9bc07e8..656d25c7 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a314a5ca-5b21-4aaf-90d4-1fcbf77a1195/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2ff68c2e-369e-44ba-8dbc-9126134132c5/adapters/1/ports/0/nio' -d '{"ethernet_device": "eth0", "type": "nio_generic_ethernet"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a314a5ca-5b21-4aaf-90d4-1fcbf77a1195/adapters/1/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/2ff68c2e-369e-44ba-8dbc-9126134132c5/adapters/1/ports/0/nio HTTP/1.1 { "ethernet_device": "eth0", "type": "nio_generic_ethernet" @@ -13,7 +13,7 @@ CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { "message": "NIO of type nio_generic_ethernet is not supported", diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidreload.txt similarity index 56% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidreload.txt index 2dbed605..797a778c 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidresume.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/362e8954-7222-4a5c-b3bb-8454ade32a11/resume' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a7ff3dd0-f7ac-4a56-b521-6bd4d328daf5/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/362e8954-7222-4a5c-b3bb-8454ade32a11/resume HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/a7ff3dd0-f7ac-4a56-b521-6bd4d328daf5/reload HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/resume +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidresume.txt similarity index 56% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidresume.txt index d7c6da74..a21a59e5 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidstop.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidresume.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d6dea08f-6d73-4406-8679-400318a53efb/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e52aeb77-ae1e-4a30-9611-c9932ed11bb6/resume' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/d6dea08f-6d73-4406-8679-400318a53efb/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/e52aeb77-ae1e-4a30-9611-c9932ed11bb6/resume HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/stop +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/resume diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstart.txt similarity index 75% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstart.txt index 69b50de5..0658c4ba 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidstart.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/cd228046-7147-47eb-adae-4f8a854a1f31/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da6bf262-3558-4159-9592-71af45849f81/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/cd228046-7147-47eb-adae-4f8a854a1f31/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/da6bf262-3558-4159-9592-71af45849f81/start HTTP/1.1 {} @@ -10,7 +10,7 @@ CONTENT-LENGTH: 1386 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/start +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/start { "acpi_shutdown": false, @@ -42,15 +42,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/start "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:1f:31:00", + "mac_address": "00:00:ab:9f:81:00", "name": "PC TEST 1", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 256, "usage": "", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/cd228046-7147-47eb-adae-4f8a854a1f31", - "vm_id": "cd228046-7147-47eb-adae-4f8a854a1f31" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/da6bf262-3558-4159-9592-71af45849f81", + "vm_id": "da6bf262-3558-4159-9592-71af45849f81" } diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstop.txt similarity index 56% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstop.txt index 671b160d..1083fbad 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidreload.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/612ea30a-90a3-417c-9ab5-c227fb37a4f3/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/19544b05-42c5-4e1e-a2f2-7f036f8ede75/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/612ea30a-90a3-417c-9ab5-c227fb37a4f3/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/19544b05-42c5-4e1e-a2f2-7f036f8ede75/stop HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/reload +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/stop diff --git a/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidsuspend.txt similarity index 55% rename from docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt rename to docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidsuspend.txt index 3c91a028..fe159e3b 100644 --- a/docs/api/examples/post_projectsprojectidqemuvmsvmidsuspend.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidqemuvmsvmidsuspend.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/467a2d94-f2ca-45b3-ac96-f3f0ae945623/suspend' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/6c7f9d40-72e3-4e90-bc69-51130cafebc9/suspend' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/467a2d94-f2ca-45b3-ac96-f3f0ae945623/suspend HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/6c7f9d40-72e3-4e90-bc69-51130cafebc9/suspend HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id}/suspend +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/suspend diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvms.txt similarity index 88% rename from docs/api/examples/post_projectsprojectidvirtualboxvms.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvms.txt index 0056e0bb..7d87650f 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvms.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvms.txt @@ -14,7 +14,7 @@ CONTENT-LENGTH: 409 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms { "acpi_shutdown": false, @@ -28,6 +28,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "db395c0e-8af7-4734-97cd-b62d6662d79a", + "vm_id": "4e0a9fb2-fae7-4ac8-8c95-3ffa5f39b187", "vmname": "VM1" } diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt similarity index 62% rename from docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 09e4c7b9..1704de79 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1f3a669e-b3f0-49b4-ba04-d76b1420a1cc/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6a1112d0-9001-4c57-9b91-6a1636b2f887/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/1f3a669e-b3f0-49b4-ba04-d76b1420a1cc/adapters/0/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6a1112d0-9001-4c57-9b91-6a1636b2f887/adapters/0/ports/0/nio HTTP/1.1 { "lport": 4242, "rhost": "127.0.0.1", @@ -15,7 +15,7 @@ CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { "lport": 4242, diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidreload.txt similarity index 54% rename from docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidreload.txt index eb9f8a18..98a5824a 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstart.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a91edead-cc20-498f-a45d-7cb20841733b/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5e20d5f0-1f8c-42e8-979f-2c57bbc9fc7f/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/a91edead-cc20-498f-a45d-7cb20841733b/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/5e20d5f0-1f8c-42e8-979f-2c57bbc9fc7f/reload HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/start +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidresume.txt similarity index 54% rename from docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidresume.txt index 316215fb..cacce35d 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidstop.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidresume.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/56604944-7340-4187-a378-dfbf0e7a5f13/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c5705196-021e-4b40-8361-be73c9d12c5d/resume' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/56604944-7340-4187-a378-dfbf0e7a5f13/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/c5705196-021e-4b40-8361-be73c9d12c5d/resume HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/resume diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstart.txt similarity index 54% rename from docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstart.txt index 724493b1..27230a98 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidresume.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/706462e6-5da3-4b1d-ace5-4043ed382ad4/resume' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/e7490dfc-a7aa-4d2b-8915-73cad6c93e70/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/706462e6-5da3-4b1d-ace5-4043ed382ad4/resume HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/e7490dfc-a7aa-4d2b-8915-73cad6c93e70/start HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/start diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstop.txt similarity index 54% rename from docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstop.txt index ee3bf4b6..107abe1f 100644 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidreload.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/3f2bad54-376d-4322-8403-848f62fa1554/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6081826a-ac27-42c7-95cd-30c5e8805aa9/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/3f2bad54-376d-4322-8403-848f62fa1554/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6081826a-ac27-42c7-95cd-30c5e8805aa9/stop HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/stop diff --git a/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidsuspend.txt b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidsuspend.txt new file mode 100644 index 00000000..e31537d8 --- /dev/null +++ b/docs/api/examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidsuspend.txt @@ -0,0 +1,13 @@ +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/98596a2c-a8e8-4870-a702-4f53747fdc7e/suspend' -d '{}' + +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/98596a2c-a8e8-4870-a702-4f53747fdc7e/suspend HTTP/1.1 +{} + + +HTTP/1.1 204 +ACCESS-CONTROL-ALLOW-ORIGIN: * +CONTENT-LENGTH: 0 +DATE: Thu, 08 Jan 2015 16:09:15 GMT +SERVER: Python/3.5 GNS3/1.5.0dev1 +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/suspend + diff --git a/docs/api/examples/post_projectsprojectidvpcsvms.txt b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvms.txt similarity index 74% rename from docs/api/examples/post_projectsprojectidvpcsvms.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvpcsvms.txt index d143e86d..a40a0d33 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvms.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvms.txt @@ -12,7 +12,7 @@ CONTENT-LENGTH: 455 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms { "command_line": "", @@ -22,6 +22,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms "startup_script": null, "startup_script_path": null, "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/95fe2288-5ce4-4502-a350-8e06d6c0b17a", - "vm_id": "95fe2288-5ce4-4502-a350-8e06d6c0b17a" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/d9573d45-01c0-4beb-ac3c-0d0d810c4a9f", + "vm_id": "d9573d45-01c0-4beb-ac3c-0d0d810c4a9f" } diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt similarity index 62% rename from docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt index 76c2b585..1b8d7768 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/bdad8fd9-951e-4078-8809-debd42657ed0/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4c222853-b5b2-435e-865f-cf66f0bd32da/adapters/0/ports/0/nio' -d '{"lport": 4242, "rhost": "127.0.0.1", "rport": 4343, "type": "nio_udp"}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/bdad8fd9-951e-4078-8809-debd42657ed0/adapters/0/ports/0/nio HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/4c222853-b5b2-435e-865f-cf66f0bd32da/adapters/0/ports/0/nio HTTP/1.1 { "lport": 4242, "rhost": "127.0.0.1", @@ -15,7 +15,7 @@ CONTENT-LENGTH: 89 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio { "lport": 4242, diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidreload.txt similarity index 56% rename from docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidreload.txt index 5a3ac61f..26127746 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstop.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidreload.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/421e1c3f-55db-478f-aac5-87445f8a241d/stop' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/be1f8feb-e276-43a9-a383-1899002c8871/reload' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/421e1c3f-55db-478f-aac5-87445f8a241d/stop HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/be1f8feb-e276-43a9-a383-1899002c8871/reload HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/stop +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/reload diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstart.txt similarity index 60% rename from docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstart.txt index e11b8fce..73ee2a0b 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidstart.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstart.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/76019245-f228-4c93-9bca-f19f93b17b2b/start' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b8c36dbd-2274-4148-923f-a35865b38a48/start' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/76019245-f228-4c93-9bca-f19f93b17b2b/start HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/b8c36dbd-2274-4148-923f-a35865b38a48/start HTTP/1.1 {} @@ -10,7 +10,7 @@ CONTENT-LENGTH: 455 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/start +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/start { "command_line": "", @@ -20,6 +20,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/start "startup_script": null, "startup_script_path": null, "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/76019245-f228-4c93-9bca-f19f93b17b2b", - "vm_id": "76019245-f228-4c93-9bca-f19f93b17b2b" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/b8c36dbd-2274-4148-923f-a35865b38a48", + "vm_id": "b8c36dbd-2274-4148-923f-a35865b38a48" } diff --git a/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstop.txt similarity index 56% rename from docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt rename to docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstop.txt index 955bc272..489ce1a2 100644 --- a/docs/api/examples/post_projectsprojectidvpcsvmsvmidreload.txt +++ b/docs/api/examples/hypervisor_post_projectsprojectidvpcsvmsvmidstop.txt @@ -1,6 +1,6 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fb3ee909-4dad-4c93-aaf9-d6229054f633/reload' -d '{}' +curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/58b7b281-a9f4-43f2-a5ad-316d78043ad3/stop' -d '{}' -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fb3ee909-4dad-4c93-aaf9-d6229054f633/reload HTTP/1.1 +POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/58b7b281-a9f4-43f2-a5ad-316d78043ad3/stop HTTP/1.1 {} @@ -9,5 +9,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id}/reload +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/stop diff --git a/docs/api/examples/post_qemuimg.txt b/docs/api/examples/hypervisor_post_qemuimg.txt similarity index 94% rename from docs/api/examples/post_qemuimg.txt rename to docs/api/examples/hypervisor_post_qemuimg.txt index 45ae339c..2e5879f9 100644 --- a/docs/api/examples/post_qemuimg.txt +++ b/docs/api/examples/hypervisor_post_qemuimg.txt @@ -18,5 +18,5 @@ ACCESS-CONTROL-ALLOW-ORIGIN: * CONTENT-LENGTH: 0 DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/qemu/img +X-ROUTE: /v1/hypervisor/qemu/img diff --git a/docs/api/examples/put_projectsprojectid.txt b/docs/api/examples/hypervisor_put_projectsprojectid.txt similarity index 54% rename from docs/api/examples/put_projectsprojectid.txt rename to docs/api/examples/hypervisor_put_projectsprojectid.txt index 11e98e43..d67740f9 100644 --- a/docs/api/examples/put_projectsprojectid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectid.txt @@ -1,9 +1,9 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/4941798d-9f60-4c60-a154-1b34aaf36f04' -d '{"name": "second_name", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-57/test_update_path_project_non_l0"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/c9b21e04-b7f1-4dfb-8ea0-d9b195fec5ff' -d '{"name": "second_name", "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-436/test_update_path_project_non_l0"}' -PUT /v1/projects/4941798d-9f60-4c60-a154-1b34aaf36f04 HTTP/1.1 +PUT /v1/projects/c9b21e04-b7f1-4dfb-8ea0-d9b195fec5ff HTTP/1.1 { "name": "second_name", - "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-57/test_update_path_project_non_l0" + "path": "/private/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/pytest-of-noplay/pytest-436/test_update_path_project_non_l0" } @@ -13,7 +13,7 @@ CONTENT-LENGTH: 96 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id} +X-ROUTE: /v1/hypervisor/projects/{project_id} { "message": "You are not allowed to modify the project directory path", diff --git a/docs/api/examples/put_projectsprojectiddockervmsvmid.txt b/docs/api/examples/hypervisor_put_projectsprojectiddockervmsvmid.txt similarity index 65% rename from docs/api/examples/put_projectsprojectiddockervmsvmid.txt rename to docs/api/examples/hypervisor_put_projectsprojectiddockervmsvmid.txt index 0a3241e7..ca1fda7f 100644 --- a/docs/api/examples/put_projectsprojectiddockervmsvmid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectiddockervmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/0c264aff-2a9f-4b78-8dd5-0364481a5cef' -d '{"console": 2003, "environment": "GNS3=1\nGNS4=0", "name": "test", "start_command": "yes"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/bee007f4-d97c-4273-9e17-b8f95ee25645' -d '{"console": 2003, "environment": "GNS3=1\nGNS4=0", "name": "test", "start_command": "yes"}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/0c264aff-2a9f-4b78-8dd5-0364481a5cef HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/bee007f4-d97c-4273-9e17-b8f95ee25645 HTTP/1.1 { "console": 2003, "environment": "GNS3=1\nGNS4=0", @@ -15,7 +15,7 @@ CONTENT-LENGTH: 531 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/docker/vms/{vm_id} { "adapters": 2, @@ -28,6 +28,6 @@ X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id} "name": "test", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", "start_command": "yes", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/docker/0c264aff-2a9f-4b78-8dd5-0364481a5cef", - "vm_id": "0c264aff-2a9f-4b78-8dd5-0364481a5cef" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/docker/bee007f4-d97c-4273-9e17-b8f95ee25645", + "vm_id": "bee007f4-d97c-4273-9e17-b8f95ee25645" } diff --git a/docs/api/examples/put_projectsprojectidiouvmsvmid.txt b/docs/api/examples/hypervisor_put_projectsprojectidiouvmsvmid.txt similarity index 70% rename from docs/api/examples/put_projectsprojectidiouvmsvmid.txt rename to docs/api/examples/hypervisor_put_projectsprojectidiouvmsvmid.txt index d544261f..add0355a 100644 --- a/docs/api/examples/put_projectsprojectidiouvmsvmid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectidiouvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/994d12ae-c1b6-441e-b483-f2a5bf398374' -d '{"console": 2002, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "startup_config_content": "hostname test", "use_default_iou_values": true}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/330e4cd0-f20e-4ee9-b15e-1f57dcbe7b9e' -d '{"console": 2002, "ethernet_adapters": 4, "iourc_content": "test", "l1_keepalives": true, "name": "test", "nvram": 2048, "ram": 512, "serial_adapters": 0, "startup_config_content": "hostname test", "use_default_iou_values": true}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/994d12ae-c1b6-441e-b483-f2a5bf398374 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/330e4cd0-f20e-4ee9-b15e-1f57dcbe7b9e HTTP/1.1 { "console": 2002, "ethernet_adapters": 4, @@ -21,13 +21,13 @@ CONTENT-LENGTH: 718 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/iou/vms/{vm_id} { "command_line": "", "console": 2002, "ethernet_adapters": 4, - "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp51cq19da/iourc", + "iourc_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxy5rc5sv/iourc", "l1_keepalives": true, "md5sum": null, "name": "test", @@ -39,6 +39,6 @@ X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id} "serial_adapters": 0, "startup_config": "startup-config.cfg", "use_default_iou_values": true, - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpsfiobxfb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/994d12ae-c1b6-441e-b483-f2a5bf398374", - "vm_id": "994d12ae-c1b6-441e-b483-f2a5bf398374" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpcf202_bh/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/iou/330e4cd0-f20e-4ee9-b15e-1f57dcbe7b9e", + "vm_id": "330e4cd0-f20e-4ee9-b15e-1f57dcbe7b9e" } diff --git a/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt b/docs/api/examples/hypervisor_put_projectsprojectidqemuvmsvmid.txt similarity index 73% rename from docs/api/examples/put_projectsprojectidqemuvmsvmid.txt rename to docs/api/examples/hypervisor_put_projectsprojectidqemuvmsvmid.txt index eb7a5846..99f0bb9c 100644 --- a/docs/api/examples/put_projectsprojectidqemuvmsvmid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectidqemuvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/c2fa621e-6bf7-4137-b097-035e3de00439' -d '{"console": 2002, "hdb_disk_image": "linux.img", "name": "test", "ram": 1024}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/138d36ec-6f7b-48b5-9e2b-7fa1eb9d2913' -d '{"console": 2002, "hdb_disk_image": "linux.img", "name": "test", "ram": 1024}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/c2fa621e-6bf7-4137-b097-035e3de00439 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/qemu/vms/138d36ec-6f7b-48b5-9e2b-7fa1eb9d2913 HTTP/1.1 { "console": 2002, "hdb_disk_image": "linux.img", @@ -15,7 +15,7 @@ CONTENT-LENGTH: 1391 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id} { "acpi_shutdown": false, @@ -47,15 +47,15 @@ X-ROUTE: /v1/projects/{project_id}/qemu/vms/{vm_id} "kernel_image": "", "kernel_image_md5sum": null, "legacy_networking": false, - "mac_address": "00:00:ab:04:39:00", + "mac_address": "00:00:ab:29:13:00", "name": "test", "options": "", "platform": "x86_64", "process_priority": "low", "project_id": "a1e920ca-338a-4e9f-b363-aa607b09dd80", - "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpich388hc/qemu-system-x86_64", + "qemu_path": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmp48y504z6/qemu-system-x86_64", "ram": 1024, "usage": "", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/c2fa621e-6bf7-4137-b097-035e3de00439", - "vm_id": "c2fa621e-6bf7-4137-b097-035e3de00439" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/qemu/138d36ec-6f7b-48b5-9e2b-7fa1eb9d2913", + "vm_id": "138d36ec-6f7b-48b5-9e2b-7fa1eb9d2913" } diff --git a/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt b/docs/api/examples/hypervisor_put_projectsprojectidvirtualboxvmsvmid.txt similarity index 70% rename from docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt rename to docs/api/examples/hypervisor_put_projectsprojectidvirtualboxvmsvmid.txt index 621999f3..6e80e088 100644 --- a/docs/api/examples/put_projectsprojectidvirtualboxvmsvmid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectidvirtualboxvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/7106debb-510b-4094-b694-8c3987f5c1de' -d '{"console": 2011, "name": "test"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6ae23735-e754-4e32-b6b5-458bd2828328' -d '{"console": 2011, "name": "test"}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/7106debb-510b-4094-b694-8c3987f5c1de HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/6ae23735-e754-4e32-b6b5-458bd2828328 HTTP/1.1 { "console": 2011, "name": "test" @@ -13,7 +13,7 @@ CONTENT-LENGTH: 413 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id} { "acpi_shutdown": false, @@ -27,6 +27,6 @@ X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id} "ram": 0, "use_any_adapter": false, "vm_directory": null, - "vm_id": "7106debb-510b-4094-b694-8c3987f5c1de", + "vm_id": "6ae23735-e754-4e32-b6b5-458bd2828328", "vmname": "VMTEST" } diff --git a/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt b/docs/api/examples/hypervisor_put_projectsprojectidvpcsvmsvmid.txt similarity index 57% rename from docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt rename to docs/api/examples/hypervisor_put_projectsprojectidvpcsvmsvmid.txt index 0db9421d..f16b5e85 100644 --- a/docs/api/examples/put_projectsprojectidvpcsvmsvmid.txt +++ b/docs/api/examples/hypervisor_put_projectsprojectidvpcsvmsvmid.txt @@ -1,6 +1,6 @@ -curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/e9d7b7e9-23bf-4b26-97c6-2b5ca0038092' -d '{"console": 2012, "name": "test", "startup_script": "ip 192.168.1.1"}' +curl -i -X PUT 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fed59d23-c0e8-4ce3-a4dd-9acc73d8b40c' -d '{"console": 2012, "name": "test", "startup_script": "ip 192.168.1.1"}' -PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/e9d7b7e9-23bf-4b26-97c6-2b5ca0038092 HTTP/1.1 +PUT /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/vpcs/vms/fed59d23-c0e8-4ce3-a4dd-9acc73d8b40c HTTP/1.1 { "console": 2012, "name": "test", @@ -14,7 +14,7 @@ CONTENT-LENGTH: 471 CONTENT-TYPE: application/json DATE: Thu, 08 Jan 2015 16:09:15 GMT SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} +X-ROUTE: /v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id} { "command_line": "", @@ -24,6 +24,6 @@ X-ROUTE: /v1/projects/{project_id}/vpcs/vms/{vm_id} "startup_script": "ip 192.168.1.1", "startup_script_path": "startup.vpc", "status": "stopped", - "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxhp21u5q/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/e9d7b7e9-23bf-4b26-97c6-2b5ca0038092", - "vm_id": "e9d7b7e9-23bf-4b26-97c6-2b5ca0038092" + "vm_directory": "/var/folders/3s/r2wbv07n7wg4vrsn874lmxxh0000gn/T/tmpxwj0vubb/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/project-files/vpcs/fed59d23-c0e8-4ce3-a4dd-9acc73d8b40c", + "vm_id": "fed59d23-c0e8-4ce3-a4dd-9acc73d8b40c" } diff --git a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt deleted file mode 100644 index eecfa751..00000000 --- a/docs/api/examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/aed39c77-db17-420d-87d3-aecd9a5748d4/adapters/0/ports/0/stop_capture' -d '{}' - -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/docker/vms/aed39c77-db17-420d-87d3-aecd9a5748d4/adapters/0/ports/0/stop_capture HTTP/1.1 -{} - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture - diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt deleted file mode 100644 index e55f1d54..00000000 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/a182c11a-29b5-4565-9f3b-0896382963db/adapters/0/ports/0/stop_capture' -d '{}' - -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/a182c11a-29b5-4565-9f3b-0896382963db/adapters/0/ports/0/stop_capture HTTP/1.1 -{} - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture - diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt deleted file mode 100644 index 5c1266c5..00000000 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidreload.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2ba21772-8623-4b47-9aca-4d976d899da7/reload' -d '{}' - -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/2ba21772-8623-4b47-9aca-4d976d899da7/reload HTTP/1.1 -{} - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/reload - diff --git a/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt b/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt deleted file mode 100644 index 142cafd4..00000000 --- a/docs/api/examples/post_projectsprojectidiouvmsvmidstop.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c54e54d0-dbe3-43cc-bf0e-27f199ffdad9/stop' -d '{}' - -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/iou/vms/c54e54d0-dbe3-43cc-bf0e-27f199ffdad9/stop HTTP/1.1 -{} - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/iou/vms/{vm_id}/stop - diff --git a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt b/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt deleted file mode 100644 index 5fd1bf5b..00000000 --- a/docs/api/examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt +++ /dev/null @@ -1,13 +0,0 @@ -curl -i -X POST 'http://localhost:8000/v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/eb76e968-9c4b-4ea3-939a-18b9d7515b4b/suspend' -d '{}' - -POST /v1/projects/a1e920ca-338a-4e9f-b363-aa607b09dd80/virtualbox/vms/eb76e968-9c4b-4ea3-939a-18b9d7515b4b/suspend HTTP/1.1 -{} - - -HTTP/1.1 204 -ACCESS-CONTROL-ALLOW-ORIGIN: * -CONTENT-LENGTH: 0 -DATE: Thu, 08 Jan 2015 16:09:15 GMT -SERVER: Python/3.5 GNS3/1.5.0dev1 -X-ROUTE: /v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend - diff --git a/docs/api/v1/server/version.rst b/docs/api/v1/common/version.rst similarity index 67% rename from docs/api/v1/server/version.rst rename to docs/api/v1/common/version.rst index adc4c1f0..70939776 100644 --- a/docs/api/v1/server/version.rst +++ b/docs/api/v1/common/version.rst @@ -1,5 +1,5 @@ Version ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/version/version.rst b/docs/api/v1/common/version/version.rst similarity index 90% rename from docs/api/v1/server/version/version.rst rename to docs/api/v1/common/version/version.rst index 3728155a..99130bbe 100644 --- a/docs/api/v1/server/version/version.rst +++ b/docs/api/v1/common/version/version.rst @@ -1,10 +1,10 @@ /v1/version ----------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: GET /v1/version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the server version number Response status codes @@ -25,11 +25,11 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_version.txt +.. literalinclude:: ../../../examples/common_get_version.txt POST /v1/version -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Check if version is the same as the server Response status codes @@ -61,5 +61,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_version.txt +.. literalinclude:: ../../../examples/common_post_version.txt diff --git a/docs/api/v1/controller/server.rst b/docs/api/v1/controller/server.rst index fcb176b4..d6b9081f 100644 --- a/docs/api/v1/controller/server.rst +++ b/docs/api/v1/controller/server.rst @@ -1,5 +1,5 @@ Server ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/controller/server/servers.rst b/docs/api/v1/controller/server/servers.rst index f3557094..59bce824 100644 --- a/docs/api/v1/controller/server/servers.rst +++ b/docs/api/v1/controller/server/servers.rst @@ -1,10 +1,10 @@ -/v1/servers ----------------------------------------------------------------------------------------------------------------------- +/v1/controller/servers +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/servers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/controller/servers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Register a server Response status codes @@ -44,5 +44,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_servers.txt +.. literalinclude:: ../../../examples/controller_post_servers.txt diff --git a/docs/api/v1/server/server/servershutdown.rst b/docs/api/v1/controller/server/servershutdown.rst similarity index 66% rename from docs/api/v1/server/server/servershutdown.rst rename to docs/api/v1/controller/server/servershutdown.rst index de662fd8..dcb4ffc2 100644 --- a/docs/api/v1/server/server/servershutdown.rst +++ b/docs/api/v1/controller/server/servershutdown.rst @@ -1,10 +1,10 @@ -/v1/server/shutdown ----------------------------------------------------------------------------------------------------------------------- +/v1/controller/server/shutdown +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/server/shutdown -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/controller/server/shutdown +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shutdown the local server Response status codes diff --git a/docs/api/v1/server/config.rst b/docs/api/v1/hypervisor/config.rst similarity index 66% rename from docs/api/v1/server/config.rst rename to docs/api/v1/hypervisor/config.rst index 7d03319f..5f404149 100644 --- a/docs/api/v1/server/config.rst +++ b/docs/api/v1/hypervisor/config.rst @@ -1,5 +1,5 @@ Config ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/config/configreload.rst b/docs/api/v1/hypervisor/config/configreload.rst similarity index 61% rename from docs/api/v1/server/config/configreload.rst rename to docs/api/v1/hypervisor/config/configreload.rst index 8f47659b..2a933681 100644 --- a/docs/api/v1/server/config/configreload.rst +++ b/docs/api/v1/hypervisor/config/configreload.rst @@ -1,10 +1,10 @@ -/v1/config/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/config/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/config/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/config/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Check if version is the same as the server Response status codes @@ -16,5 +16,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_configreload.txt +.. literalinclude:: ../../../examples/hypervisor_post_configreload.txt diff --git a/docs/api/v1/server/docker.rst b/docs/api/v1/hypervisor/docker.rst similarity index 66% rename from docs/api/v1/server/docker.rst rename to docs/api/v1/hypervisor/docker.rst index 2e700cc8..c035c8fd 100644 --- a/docs/api/v1/server/docker.rst +++ b/docs/api/v1/hypervisor/docker.rst @@ -1,5 +1,5 @@ Docker ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/docker/dockerimages.rst b/docs/api/v1/hypervisor/docker/dockerimages.rst similarity index 64% rename from docs/api/v1/server/docker/dockerimages.rst rename to docs/api/v1/hypervisor/docker/dockerimages.rst index d282af92..91860f98 100644 --- a/docs/api/v1/server/docker/dockerimages.rst +++ b/docs/api/v1/hypervisor/docker/dockerimages.rst @@ -1,10 +1,10 @@ -/v1/docker/images ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/docker/images +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/docker/images -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/docker/images +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get all available Docker images Response status codes diff --git a/docs/api/v1/server/docker/projectsprojectiddockervms.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervms.rst similarity index 95% rename from docs/api/v1/server/docker/projectsprojectiddockervms.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervms.rst index c788b59d..a97e307c 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervms.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/docker/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new Docker container Parameters diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsid.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsid.rst similarity index 67% rename from docs/api/v1/server/docker/projectsprojectiddockervmsid.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsid.rst index e93792a5..d9be1c62 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsid.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -DELETE /v1/projects/**{project_id}**/docker/vms/**{id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/docker/vms/**{id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a Docker container Parameters ********** -- **project_id**: UUID for the project - **id**: ID for the container +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsidreload.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidreload.rst similarity index 95% rename from docs/api/v1/server/docker/projectsprojectiddockervmsidreload.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidreload.rst index ef5f2fec..61591083 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsidreload.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms/**{id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Restart a Docker container Parameters ********** -- **project_id**: UUID of the project - **id**: ID of the container +- **project_id**: UUID of the project Response status codes ********************** diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsidstart.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstart.rst similarity index 95% rename from docs/api/v1/server/docker/projectsprojectiddockervmsidstart.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstart.rst index 45684fad..7e35f776 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsidstart.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms/**{id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a Docker container Parameters ********** -- **project_id**: UUID of the project - **id**: ID of the container +- **project_id**: UUID of the project Response status codes ********************** diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsidstop.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstop.rst similarity index 95% rename from docs/api/v1/server/docker/projectsprojectiddockervmsidstop.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstop.rst index 0eba0060..0708947b 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsidstop.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms/**{id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a Docker container Parameters ********** -- **project_id**: UUID of the project - **id**: ID of the container +- **project_id**: UUID of the project Response status codes ********************** diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsidsuspend.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidsuspend.rst similarity index 95% rename from docs/api/v1/server/docker/projectsprojectiddockervmsidsuspend.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidsuspend.rst index 86c61b98..d4710e1d 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsidsuspend.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsidsuspend.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{id}/suspend ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{id}/suspend +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms/**{id}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Pause a Docker container Parameters ********** -- **project_id**: UUID of the project - **id**: ID of the container +- **project_id**: UUID of the project Response status codes ********************** diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsvmid.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmid.rst similarity index 93% rename from docs/api/v1/server/docker/projectsprojectiddockervmsvmid.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmid.rst index 782d13b0..7aced4a1 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsvmid.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/docker/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -PUT /v1/projects/**{project_id}**/docker/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/docker/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a Docker instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -58,5 +58,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectiddockervmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectiddockervmsvmid.txt diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 58% rename from docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst index 83b8d3f6..4811f9b9 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a Docker container Parameters ********** -- **adapter_number**: Adapter where the nio should be added +- **id**: ID of the container - **project_id**: UUID for the project - **port_number**: Port on the adapter -- **id**: ID of the container +- **adapter_number**: Adapter where the nio should be added Response status codes ********************** @@ -24,19 +24,19 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt -DELETE /v1/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a Docker container Parameters ********** -- **adapter_number**: Adapter where the nio should be added +- **id**: ID of the container - **project_id**: UUID for the project - **port_number**: Port on the adapter -- **id**: ID of the container +- **adapter_number**: Adapter where the nio should be added Response status codes ********************** @@ -48,5 +48,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdnio.txt diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst similarity index 70% rename from docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 92328323..e84a5a8c 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **adapter_number**: Adapter to start a packet capture Response status codes ********************** @@ -35,5 +35,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt diff --git a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst similarity index 55% rename from docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 3aa8955d..7383615b 100644 --- a/docs/api/v1/server/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/docker/projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/docker/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/docker/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to stop a packet capture Response status codes ********************** @@ -25,5 +25,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectiddockervmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt diff --git a/docs/api/v1/server/dynamips_device.rst b/docs/api/v1/hypervisor/dynamips_device.rst similarity index 72% rename from docs/api/v1/server/dynamips_device.rst rename to docs/api/v1/hypervisor/dynamips_device.rst index 83c17b94..2135b93d 100644 --- a/docs/api/v1/server/dynamips_device.rst +++ b/docs/api/v1/hypervisor/dynamips_device.rst @@ -1,5 +1,5 @@ Dynamips device ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevices.rst b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevices.rst similarity index 90% rename from docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevices.rst rename to docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevices.rst index acbe839e..ec26e820 100644 --- a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevices.rst +++ b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevices.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/devices ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/devices +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/devices -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/devices +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new Dynamips device instance Parameters diff --git a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst similarity index 91% rename from docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst rename to docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst index 6a472e00..f1508dee 100644 --- a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst +++ b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceid.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/devices/{device_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/devices/{device_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a Dynamips device instance Parameters @@ -32,8 +32,8 @@ Output -PUT /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a Dynamips device instance Parameters @@ -90,8 +90,8 @@ Output -DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a Dynamips device instance Parameters diff --git a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst similarity index 93% rename from docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst rename to docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst index 97b14b9d..3b3f539a 100644 --- a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdnio.rst @@ -1,17 +1,17 @@ -/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a Dynamips device instance Parameters ********** - **project_id**: UUID for the project -- **device_id**: UUID for the instance - **port_number**: Port on the device +- **device_id**: UUID for the instance Response status codes ********************** @@ -133,15 +133,15 @@ Body -DELETE /v1/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a Dynamips device instance Parameters ********** - **project_id**: UUID for the project -- **device_id**: UUID for the instance - **port_number**: Port on the device +- **device_id**: UUID for the instance Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst similarity index 76% rename from docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst index 2227bc64..a72c3b05 100644 --- a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstartcapture.rst @@ -1,17 +1,17 @@ -/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a packet capture on a Dynamips device instance Parameters ********** - **project_id**: UUID for the project -- **device_id**: UUID for the instance - **port_number**: Port on the device +- **device_id**: UUID for the instance Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst similarity index 61% rename from docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst index cc312e43..dc01d2f2 100644 --- a/docs/api/v1/server/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/dynamips_device/projectsprojectiddynamipsdevicesdeviceidportsportnumberdstopcapture.rst @@ -1,17 +1,17 @@ -/v1/projects/{project_id}/dynamips/devices/{device_id}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/devices/**{device_id}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a packet capture on a Dynamips device instance Parameters ********** - **project_id**: UUID for the project -- **device_id**: UUID for the instance - **port_number**: Port on the device +- **device_id**: UUID for the instance Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm.rst b/docs/api/v1/hypervisor/dynamips_vm.rst similarity index 70% rename from docs/api/v1/server/dynamips_vm.rst rename to docs/api/v1/hypervisor/dynamips_vm.rst index f32d26b7..b8b7c175 100644 --- a/docs/api/v1/server/dynamips_vm.rst +++ b/docs/api/v1/hypervisor/dynamips_vm.rst @@ -1,5 +1,5 @@ Dynamips vm ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/dynamips_vm/dynamipsvms.rst b/docs/api/v1/hypervisor/dynamips_vm/dynamipsvms.rst similarity index 66% rename from docs/api/v1/server/dynamips_vm/dynamipsvms.rst rename to docs/api/v1/hypervisor/dynamips_vm/dynamipsvms.rst index 476814cd..0ae1842a 100644 --- a/docs/api/v1/server/dynamips_vm/dynamipsvms.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/dynamipsvms.rst @@ -1,10 +1,10 @@ -/v1/dynamips/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/dynamips/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/dynamips/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/dynamips/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the list of Dynamips VMS Response status codes diff --git a/docs/api/v1/server/dynamips_vm/dynamipsvmspath.rst b/docs/api/v1/hypervisor/dynamips_vm/dynamipsvmspath.rst similarity index 62% rename from docs/api/v1/server/dynamips_vm/dynamipsvmspath.rst rename to docs/api/v1/hypervisor/dynamips_vm/dynamipsvmspath.rst index 375c93c6..43ecfa8e 100644 --- a/docs/api/v1/server/dynamips_vm/dynamipsvmspath.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/dynamipsvmspath.rst @@ -1,10 +1,10 @@ -/v1/dynamips/vms/{path} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/dynamips/vms/{path} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/dynamips/vms/**{path}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/dynamips/vms/**{path}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload Dynamips image. Response status codes diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvms.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvms.rst similarity index 98% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvms.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvms.rst index cd11089f..36ac5176 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvms.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new Dynamips VM instance Parameters diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst similarity index 98% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst index 38bc4e01..4c0b85e0 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -71,14 +71,14 @@ Output -PUT /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -188,14 +188,14 @@ Output -DELETE /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 67% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 01614d10..0c53beba 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **adapter_number**: Adapter where the nio should be added Response status codes ********************** @@ -21,16 +21,16 @@ Response status codes - **404**: Instance doesn't exist -DELETE /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **adapter_number**: Adapter from where the nio should be removed Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst similarity index 75% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 7e727b50..95c3215b 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **adapter_number**: Adapter to start a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst similarity index 61% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 4d8ad822..00359821 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to stop a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst similarity index 59% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst index 24c17864..f9124af3 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidautoidlepc.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/auto_idlepc ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/auto_idlepc +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/auto_idlepc -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/auto_idlepc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the idlepc proposals Response status codes diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst similarity index 80% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst index d8aae9a1..97599c9a 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigs.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/configs ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/configs +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the startup and private configs content Response status codes diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst similarity index 59% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst index 064aad43..335d73ed 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidconfigssave.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/configs/save ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/configs/save +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs/save -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/configs/save +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Save the startup and private configs content Response status codes diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst similarity index 58% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst index 18722f8a..2d3223d6 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmididlepcproposals.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/idlepc_proposals ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/idlepc_proposals +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/idlepc_proposals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/idlepc_proposals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the idlepc proposals Response status codes diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst similarity index 65% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst index 23bb67f3..5bb6350d 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst similarity index 65% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst index 73ce9d01..16c96c45 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidresume.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/resume ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/resume +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/resume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst similarity index 65% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst index 24c3d2af..01214471 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst similarity index 65% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst index fca471b6..34641c1c 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst similarity index 65% rename from docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst rename to docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst index 54394e01..adec5eb8 100644 --- a/docs/api/v1/server/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst +++ b/docs/api/v1/hypervisor/dynamips_vm/projectsprojectiddynamipsvmsvmidsuspend.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/dynamips/vms/{vm_id}/suspend ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/dynamips/vms/{vm_id}/suspend +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/dynamips/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/dynamips/vms/**{vm_id}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a Dynamips VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/file.rst b/docs/api/v1/hypervisor/file.rst similarity index 65% rename from docs/api/v1/server/file.rst rename to docs/api/v1/hypervisor/file.rst index 47b74965..d3de2171 100644 --- a/docs/api/v1/server/file.rst +++ b/docs/api/v1/hypervisor/file.rst @@ -1,5 +1,5 @@ File ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/file/filesstream.rst b/docs/api/v1/hypervisor/file/filesstream.rst similarity index 82% rename from docs/api/v1/server/file/filesstream.rst rename to docs/api/v1/hypervisor/file/filesstream.rst index 7d61f7ce..d1c0e1ac 100644 --- a/docs/api/v1/server/file/filesstream.rst +++ b/docs/api/v1/hypervisor/file/filesstream.rst @@ -1,10 +1,10 @@ -/v1/files/stream ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/files/stream +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/files/stream -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/files/stream +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stream a file from the server Response status codes diff --git a/docs/api/v1/server/iou.rst b/docs/api/v1/hypervisor/iou.rst similarity index 64% rename from docs/api/v1/server/iou.rst rename to docs/api/v1/hypervisor/iou.rst index c2188031..e209e419 100644 --- a/docs/api/v1/server/iou.rst +++ b/docs/api/v1/hypervisor/iou.rst @@ -1,5 +1,5 @@ Iou ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/iou/iouvms.rst b/docs/api/v1/hypervisor/iou/iouvms.rst similarity index 61% rename from docs/api/v1/server/iou/iouvms.rst rename to docs/api/v1/hypervisor/iou/iouvms.rst index 22b399ca..e54a9fac 100644 --- a/docs/api/v1/server/iou/iouvms.rst +++ b/docs/api/v1/hypervisor/iou/iouvms.rst @@ -1,10 +1,10 @@ -/v1/iou/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/iou/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/iou/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/iou/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the list of IOU VMS Response status codes @@ -15,5 +15,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_iouvms.txt +.. literalinclude:: ../../../examples/hypervisor_get_iouvms.txt diff --git a/docs/api/v1/server/iou/iouvmspath.rst b/docs/api/v1/hypervisor/iou/iouvmspath.rst similarity index 63% rename from docs/api/v1/server/iou/iouvmspath.rst rename to docs/api/v1/hypervisor/iou/iouvmspath.rst index da07a57c..e43ebd9a 100644 --- a/docs/api/v1/server/iou/iouvmspath.rst +++ b/docs/api/v1/hypervisor/iou/iouvmspath.rst @@ -1,10 +1,10 @@ -/v1/iou/vms/{path} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/iou/vms/{path} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/iou/vms/**{path}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/iou/vms/**{path}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload IOU image. Response status codes diff --git a/docs/api/v1/server/iou/projectsprojectidiouvms.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvms.rst similarity index 96% rename from docs/api/v1/server/iou/projectsprojectidiouvms.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvms.rst index f9c4191e..7de42ac4 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvms.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/iou/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/iou/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/iou/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new IOU instance Parameters @@ -70,5 +70,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvms.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvms.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmid.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmid.rst similarity index 94% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmid.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmid.rst index 685fd66c..15a89fff 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmid.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/iou/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -47,17 +47,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidiouvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidiouvmsvmid.txt -PUT /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -116,17 +116,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectidiouvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectidiouvmsvmid.txt -DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -138,5 +138,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidiouvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidiouvmsvmid.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 60% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 86edcc97..bd79c841 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -24,19 +24,19 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt -DELETE /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -48,5 +48,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdnio.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst similarity index 70% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 7849cbce..20028dfc 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter +- **adapter_number**: Adapter to start a packet capture Response status codes ********************** @@ -35,5 +35,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstartcapture.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst similarity index 56% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index dd3b08ce..e125c4bd 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to stop a packet capture Response status codes ********************** @@ -25,5 +25,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidadaptersadapternumberdportsportnumberdstopcapture.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigs.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigs.rst similarity index 76% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigs.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigs.rst index d328c6f5..ff7d59f5 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigs.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigs.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/configs ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/configs +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/configs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}**/configs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the startup and private configs content Response status codes @@ -27,5 +27,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidiouvmsvmidconfigs.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidiouvmsvmidconfigs.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigssave.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigssave.rst similarity index 60% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigssave.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigssave.rst index b212fc51..667a7c69 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidconfigssave.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidconfigssave.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/configs/save ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/configs/save +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/configs/save -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}**/configs/save +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Save the startup and private configs content Response status codes diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidreload.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidreload.rst similarity index 60% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidreload.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidreload.rst index 0243d395..4e3a1907 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidreload.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidreload.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidreload.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidstart.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstart.rst similarity index 92% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidstart.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstart.rst index 50de685f..0942554a 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidstart.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -56,5 +56,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidstart.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidstart.txt diff --git a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidstop.rst b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstop.rst similarity index 60% rename from docs/api/v1/server/iou/projectsprojectidiouvmsvmidstop.rst rename to docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstop.rst index 4fdc31f5..4e1ecb77 100644 --- a/docs/api/v1/server/iou/projectsprojectidiouvmsvmidstop.rst +++ b/docs/api/v1/hypervisor/iou/projectsprojectidiouvmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/iou/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/iou/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/iou/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/iou/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a IOU instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidiouvmsvmidstop.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidiouvmsvmidstop.txt diff --git a/docs/api/v1/server/network.rst b/docs/api/v1/hypervisor/network.rst similarity index 67% rename from docs/api/v1/server/network.rst rename to docs/api/v1/hypervisor/network.rst index 38366abe..1b2ae186 100644 --- a/docs/api/v1/server/network.rst +++ b/docs/api/v1/hypervisor/network.rst @@ -1,5 +1,5 @@ Network ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/network/interfaces.rst b/docs/api/v1/hypervisor/network/interfaces.rst similarity index 60% rename from docs/api/v1/server/network/interfaces.rst rename to docs/api/v1/hypervisor/network/interfaces.rst index 15d026bb..f6d5b34c 100644 --- a/docs/api/v1/server/network/interfaces.rst +++ b/docs/api/v1/hypervisor/network/interfaces.rst @@ -1,10 +1,10 @@ -/v1/interfaces ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/interfaces +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/interfaces -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/interfaces +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List all the network interfaces available on the server Response status codes @@ -15,5 +15,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_interfaces.txt +.. literalinclude:: ../../../examples/hypervisor_get_interfaces.txt diff --git a/docs/api/v1/server/network/projectsprojectidportsudp.rst b/docs/api/v1/hypervisor/network/projectsprojectidportsudp.rst similarity index 60% rename from docs/api/v1/server/network/projectsprojectidportsudp.rst rename to docs/api/v1/hypervisor/network/projectsprojectidportsudp.rst index 20ebd7ef..a295a845 100644 --- a/docs/api/v1/server/network/projectsprojectidportsudp.rst +++ b/docs/api/v1/hypervisor/network/projectsprojectidportsudp.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/ports/udp ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/ports/udp +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/ports/udp -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/ports/udp +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allocate an UDP port on the server Parameters @@ -20,5 +20,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidportsudp.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidportsudp.txt diff --git a/docs/api/v1/server/project.rst b/docs/api/v1/hypervisor/project.rst similarity index 67% rename from docs/api/v1/server/project.rst rename to docs/api/v1/hypervisor/project.rst index 95453d81..75acbf89 100644 --- a/docs/api/v1/server/project.rst +++ b/docs/api/v1/hypervisor/project.rst @@ -1,5 +1,5 @@ Project ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/project/projects.rst b/docs/api/v1/hypervisor/project/projects.rst similarity index 88% rename from docs/api/v1/server/project/projects.rst rename to docs/api/v1/hypervisor/project/projects.rst index 50660c8f..70585f08 100644 --- a/docs/api/v1/server/project/projects.rst +++ b/docs/api/v1/hypervisor/project/projects.rst @@ -1,10 +1,10 @@ -/v1/projects ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List projects opened on the server Response status codes @@ -15,11 +15,11 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projects.txt +.. literalinclude:: ../../../examples/hypervisor_get_projects.txt -POST /v1/projects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new project on the server Response status codes @@ -56,5 +56,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projects.txt +.. literalinclude:: ../../../examples/hypervisor_post_projects.txt diff --git a/docs/api/v1/server/project/projectsprojectid.rst b/docs/api/v1/hypervisor/project/projectsprojectid.rst similarity index 88% rename from docs/api/v1/server/project/projectsprojectid.rst rename to docs/api/v1/hypervisor/project/projectsprojectid.rst index 0ed4eecb..8e57d7b5 100644 --- a/docs/api/v1/server/project/projectsprojectid.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectid.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get project information Parameters @@ -33,11 +33,11 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectid.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectid.txt -PUT /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a project Parameters @@ -78,11 +78,11 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectid.txt -DELETE /v1/projects/**{project_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a project from disk Parameters @@ -98,5 +98,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectid.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectid.txt diff --git a/docs/api/v1/server/project/projectsprojectidclose.rst b/docs/api/v1/hypervisor/project/projectsprojectidclose.rst similarity index 61% rename from docs/api/v1/server/project/projectsprojectidclose.rst rename to docs/api/v1/hypervisor/project/projectsprojectidclose.rst index 320a79fa..d0308f04 100644 --- a/docs/api/v1/server/project/projectsprojectidclose.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectidclose.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/close ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/close +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/close -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/close +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Close a project Parameters @@ -20,5 +20,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidclose.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidclose.txt diff --git a/docs/api/v1/server/project/projectsprojectidcommit.rst b/docs/api/v1/hypervisor/project/projectsprojectidcommit.rst similarity index 61% rename from docs/api/v1/server/project/projectsprojectidcommit.rst rename to docs/api/v1/hypervisor/project/projectsprojectidcommit.rst index fd26554c..98f0540e 100644 --- a/docs/api/v1/server/project/projectsprojectidcommit.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectidcommit.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/commit ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/commit +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/commit -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/commit +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Write changes on disk Parameters @@ -20,5 +20,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidcommit.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidcommit.txt diff --git a/docs/api/v1/server/project/projectsprojectidfiles.rst b/docs/api/v1/hypervisor/project/projectsprojectidfiles.rst similarity index 61% rename from docs/api/v1/server/project/projectsprojectidfiles.rst rename to docs/api/v1/hypervisor/project/projectsprojectidfiles.rst index 44ee247b..12fc682f 100644 --- a/docs/api/v1/server/project/projectsprojectidfiles.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectidfiles.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/files ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/files +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ List files of a project Parameters @@ -20,5 +20,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidfiles.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidfiles.txt diff --git a/docs/api/v1/server/project/projectsprojectidfilespath.rst b/docs/api/v1/hypervisor/project/projectsprojectidfilespath.rst similarity index 65% rename from docs/api/v1/server/project/projectsprojectidfilespath.rst rename to docs/api/v1/hypervisor/project/projectsprojectidfilespath.rst index 4ce054ef..2b13e82c 100644 --- a/docs/api/v1/server/project/projectsprojectidfilespath.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectidfilespath.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/files/{path:.+} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/files/{path:.+} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/files/**{path:.+}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/files/**{path:.+}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a file of a project Parameters diff --git a/docs/api/v1/server/project/projectsprojectidnotifications.rst b/docs/api/v1/hypervisor/project/projectsprojectidnotifications.rst similarity index 66% rename from docs/api/v1/server/project/projectsprojectidnotifications.rst rename to docs/api/v1/hypervisor/project/projectsprojectidnotifications.rst index 7967deb0..a23fa700 100644 --- a/docs/api/v1/server/project/projectsprojectidnotifications.rst +++ b/docs/api/v1/hypervisor/project/projectsprojectidnotifications.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/notifications ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/notifications +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/notifications -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/notifications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Receive notifications about the projects Parameters diff --git a/docs/api/v1/server/qemu.rst b/docs/api/v1/hypervisor/qemu.rst similarity index 65% rename from docs/api/v1/server/qemu.rst rename to docs/api/v1/hypervisor/qemu.rst index 70fd8fc2..5c46b504 100644 --- a/docs/api/v1/server/qemu.rst +++ b/docs/api/v1/hypervisor/qemu.rst @@ -1,5 +1,5 @@ Qemu ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvms.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvms.rst similarity index 98% rename from docs/api/v1/server/qemu/projectsprojectidqemuvms.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvms.rst index 9e5e972a..20b570b5 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvms.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/qemu/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new Qemu VM instance Parameters @@ -115,5 +115,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvms.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvms.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmid.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmid.rst similarity index 97% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmid.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmid.rst index 034e6d14..bba00e65 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmid.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/qemu/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -70,17 +70,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidqemuvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidqemuvmsvmid.txt -PUT /v1/projects/**{project_id}**/qemu/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -185,17 +185,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectidqemuvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectidqemuvmsvmid.txt -DELETE /v1/projects/**{project_id}**/qemu/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -207,5 +207,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidqemuvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidqemuvmsvmid.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 59% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 60c67e48..d322abbd 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a Qemu VM instance Parameters ********** -- **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -24,19 +24,19 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt -DELETE /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a Qemu VM instance Parameters ********** -- **adapter_number**: Network adapter where the nio is located -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -48,5 +48,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidqemuvmsvmidadaptersadapternumberdportsportnumberdnio.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidreload.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidreload.rst similarity index 60% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidreload.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidreload.rst index 35a3d01f..9e2dc98c 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidreload.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidreload.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidreload.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidresume.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidresume.rst similarity index 60% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidresume.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidresume.rst index 65c8f6f2..6bf24433 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidresume.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidresume.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/resume ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/resume +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/resume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidresume.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidresume.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstart.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstart.rst similarity index 96% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstart.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstart.rst index 8a35caea..c67d9e67 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstart.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -70,5 +70,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidstart.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidstart.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstop.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstop.rst similarity index 60% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstop.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstop.rst index b2ee9568..aa7ca312 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidstop.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidstop.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidstop.txt diff --git a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidsuspend.rst b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidsuspend.rst similarity index 59% rename from docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidsuspend.rst rename to docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidsuspend.rst index f57e6f23..39ecbf95 100644 --- a/docs/api/v1/server/qemu/projectsprojectidqemuvmsvmidsuspend.rst +++ b/docs/api/v1/hypervisor/qemu/projectsprojectidqemuvmsvmidsuspend.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/qemu/vms/{vm_id}/suspend ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/qemu/vms/{vm_id}/suspend +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/qemu/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/qemu/vms/**{vm_id}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a Qemu VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidqemuvmsvmidsuspend.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidqemuvmsvmidsuspend.txt diff --git a/docs/api/v1/server/qemu/qemubinaries.rst b/docs/api/v1/hypervisor/qemu/qemubinaries.rst similarity index 77% rename from docs/api/v1/server/qemu/qemubinaries.rst rename to docs/api/v1/hypervisor/qemu/qemubinaries.rst index a6a6c184..ff720d9f 100644 --- a/docs/api/v1/server/qemu/qemubinaries.rst +++ b/docs/api/v1/hypervisor/qemu/qemubinaries.rst @@ -1,10 +1,10 @@ -/v1/qemu/binaries ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/binaries +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/qemu/binaries -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/qemu/binaries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a list of available Qemu binaries Response status codes @@ -26,5 +26,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_qemubinaries.txt +.. literalinclude:: ../../../examples/hypervisor_get_qemubinaries.txt diff --git a/docs/api/v1/server/qemu/qemucapabilities.rst b/docs/api/v1/hypervisor/qemu/qemucapabilities.rst similarity index 75% rename from docs/api/v1/server/qemu/qemucapabilities.rst rename to docs/api/v1/hypervisor/qemu/qemucapabilities.rst index c34f0b58..f2d0251a 100644 --- a/docs/api/v1/server/qemu/qemucapabilities.rst +++ b/docs/api/v1/hypervisor/qemu/qemucapabilities.rst @@ -1,10 +1,10 @@ -/v1/qemu/capabilities ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/capabilities +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/qemu/capabilities -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/qemu/capabilities +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a list of Qemu capabilities on this server Response status codes @@ -24,5 +24,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_qemucapabilities.txt +.. literalinclude:: ../../../examples/hypervisor_get_qemucapabilities.txt diff --git a/docs/api/v1/server/qemu/qemuimg.rst b/docs/api/v1/hypervisor/qemu/qemuimg.rst similarity index 92% rename from docs/api/v1/server/qemu/qemuimg.rst rename to docs/api/v1/hypervisor/qemu/qemuimg.rst index 138fa88f..113ef946 100644 --- a/docs/api/v1/server/qemu/qemuimg.rst +++ b/docs/api/v1/hypervisor/qemu/qemuimg.rst @@ -1,10 +1,10 @@ -/v1/qemu/img ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/img +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/qemu/img -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/qemu/img +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a Qemu image Response status codes @@ -35,5 +35,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_qemuimg.txt +.. literalinclude:: ../../../examples/hypervisor_post_qemuimg.txt diff --git a/docs/api/v1/server/qemu/qemuimgbinaries.rst b/docs/api/v1/hypervisor/qemu/qemuimgbinaries.rst similarity index 68% rename from docs/api/v1/server/qemu/qemuimgbinaries.rst rename to docs/api/v1/hypervisor/qemu/qemuimgbinaries.rst index 596e0b69..b302e555 100644 --- a/docs/api/v1/server/qemu/qemuimgbinaries.rst +++ b/docs/api/v1/hypervisor/qemu/qemuimgbinaries.rst @@ -1,10 +1,10 @@ -/v1/qemu/img-binaries ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/img-binaries +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/qemu/img-binaries -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/qemu/img-binaries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a list of available Qemu-img binaries Response status codes diff --git a/docs/api/v1/server/qemu/qemuvms.rst b/docs/api/v1/hypervisor/qemu/qemuvms.rst similarity index 67% rename from docs/api/v1/server/qemu/qemuvms.rst rename to docs/api/v1/hypervisor/qemu/qemuvms.rst index fa8208c9..616ccc7d 100644 --- a/docs/api/v1/server/qemu/qemuvms.rst +++ b/docs/api/v1/hypervisor/qemu/qemuvms.rst @@ -1,10 +1,10 @@ -/v1/qemu/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/qemu/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/qemu/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the list of Qemu images Response status codes diff --git a/docs/api/v1/server/qemu/qemuvmspath.rst b/docs/api/v1/hypervisor/qemu/qemuvmspath.rst similarity index 62% rename from docs/api/v1/server/qemu/qemuvmspath.rst rename to docs/api/v1/hypervisor/qemu/qemuvmspath.rst index 625ed024..6ac41a86 100644 --- a/docs/api/v1/server/qemu/qemuvmspath.rst +++ b/docs/api/v1/hypervisor/qemu/qemuvmspath.rst @@ -1,10 +1,10 @@ -/v1/qemu/vms/{path:.+} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/qemu/vms/{path:.+} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/qemu/vms/**{path:.+}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/qemu/vms/**{path:.+}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Upload Qemu image. Response status codes diff --git a/docs/api/v1/server/virtualbox.rst b/docs/api/v1/hypervisor/virtualbox.rst similarity index 69% rename from docs/api/v1/server/virtualbox.rst rename to docs/api/v1/hypervisor/virtualbox.rst index 517624b2..1a0cf671 100644 --- a/docs/api/v1/server/virtualbox.rst +++ b/docs/api/v1/hypervisor/virtualbox.rst @@ -1,5 +1,5 @@ Virtualbox ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvms.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvms.rst similarity index 94% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvms.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvms.rst index a1931f69..79c9fab7 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvms.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/virtualbox/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VirtualBox VM instance Parameters @@ -62,5 +62,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvms.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvms.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmid.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmid.rst similarity index 92% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmid.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmid.rst index 820ab1b4..2c6d05b8 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmid.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -43,17 +43,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidvirtualboxvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidvirtualboxvmsvmid.txt -PUT /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -105,17 +105,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectidvirtualboxvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectidvirtualboxvmsvmid.txt -DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 59% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst index ace11bcf..97c431a8 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter where the nio should be added Response status codes ********************** @@ -24,19 +24,19 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt -DELETE /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter from where the nio should be removed Response status codes ********************** @@ -48,5 +48,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdnio.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst similarity index 75% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index ca465161..ab8e21e3 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to start a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst similarity index 60% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index 502d5ee7..22e45888 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to stop a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst similarity index 59% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst index 032312fb..32c1f305 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidreload.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidreload.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst similarity index 59% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst index f440f493..93cc1a7f 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidresume.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/resume ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/resume +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/resume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidresume.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidresume.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst similarity index 59% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst index 87b5766b..81a99555 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidstart.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstart.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst similarity index 59% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst index 5dc0be0c..0ac8cf75 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidstop.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidstop.txt diff --git a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst similarity index 58% rename from docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst rename to docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst index 824c9d3b..57e3b04d 100644 --- a/docs/api/v1/server/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst +++ b/docs/api/v1/hypervisor/virtualbox/projectsprojectidvirtualboxvmsvmidsuspend.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/virtualbox/vms/{vm_id}/suspend ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/virtualbox/vms/{vm_id}/suspend +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/virtualbox/vms/**{vm_id}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a VirtualBox VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvmsvmidsuspend.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvmsvmidsuspend.txt diff --git a/docs/api/v1/server/virtualbox/virtualboxvms.rst b/docs/api/v1/hypervisor/virtualbox/virtualboxvms.rst similarity index 64% rename from docs/api/v1/server/virtualbox/virtualboxvms.rst rename to docs/api/v1/hypervisor/virtualbox/virtualboxvms.rst index 6499008b..bf837242 100644 --- a/docs/api/v1/server/virtualbox/virtualboxvms.rst +++ b/docs/api/v1/hypervisor/virtualbox/virtualboxvms.rst @@ -1,10 +1,10 @@ -/v1/virtualbox/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/virtualbox/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/virtualbox/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/virtualbox/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get all VirtualBox VMs available Response status codes diff --git a/docs/api/v1/server/vmware.rst b/docs/api/v1/hypervisor/vmware.rst similarity index 66% rename from docs/api/v1/server/vmware.rst rename to docs/api/v1/hypervisor/vmware.rst index 6a3cf3a0..3b1b5582 100644 --- a/docs/api/v1/server/vmware.rst +++ b/docs/api/v1/hypervisor/vmware.rst @@ -1,5 +1,5 @@ Vmware ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevms.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevms.rst similarity index 96% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevms.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevms.rst index cf422e4c..8f79a549 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevms.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/vmware/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VMware VM instance Parameters diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmid.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmid.rst similarity index 94% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmid.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmid.rst index f3359fb0..294dc2ae 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmid.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/vmware/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -40,14 +40,14 @@ Output -PUT /v1/projects/**{project_id}**/vmware/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -96,14 +96,14 @@ Output -DELETE /v1/projects/**{project_id}**/vmware/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 67% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst index 326f61a1..8fe523da 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a NIO to a VMware VM instance Parameters ********** -- **adapter_number**: Adapter where the nio should be added -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter where the nio should be added Response status codes ********************** @@ -21,16 +21,16 @@ Response status codes - **404**: Instance doesn't exist -DELETE /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove a NIO from a VMware VM instance Parameters ********** -- **adapter_number**: Adapter from where the nio should be removed -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter from where the nio should be removed Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst similarity index 75% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst index 8de9c89d..6950bf88 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstartcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/start_capture +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/start_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a packet capture on a VMware VM instance Parameters ********** -- **adapter_number**: Adapter to start a packet capture -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to start a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst similarity index 61% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst index f03c23ca..6893dd18 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidadaptersadapternumberdportsportnumberdstopcapture.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/stop_capture +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/stop_capture +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a packet capture on a VMware VM instance Parameters ********** -- **adapter_number**: Adapter to stop a packet capture -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port on the adapter (always 0) +- **adapter_number**: Adapter to stop a packet capture Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst similarity index 62% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst index 0b30ef4b..589e5b2a 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidinterfacesvmnet.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/interfaces/vmnet ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/interfaces/vmnet +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/interfaces/vmnet -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/interfaces/vmnet +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allocate a VMware VMnet interface on the server Parameters ********** -- **project_id**: The UUID of the project - **vm_id**: UUID for the instance +- **project_id**: The UUID of the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidreload.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidreload.rst similarity index 65% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidreload.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidreload.rst index f3363785..bdc33592 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidreload.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidresume.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidresume.rst similarity index 66% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidresume.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidresume.rst index 66267bd8..cfed6b83 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidresume.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidresume.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/resume ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/resume +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/resume -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/resume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Resume a suspended VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstart.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstart.rst similarity index 65% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstart.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstart.rst index 57fdeab7..d1a3e291 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstart.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstop.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstop.rst similarity index 65% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstop.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstop.rst index 95a3f6fe..0c82c953 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidstop.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidsuspend.rst b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidsuspend.rst similarity index 65% rename from docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidsuspend.rst rename to docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidsuspend.rst index 5655b3ab..70e8f837 100644 --- a/docs/api/v1/server/vmware/projectsprojectidvmwarevmsvmidsuspend.rst +++ b/docs/api/v1/hypervisor/vmware/projectsprojectidvmwarevmsvmidsuspend.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vmware/vms/{vm_id}/suspend ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vmware/vms/{vm_id}/suspend +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vmware/vms/**{vm_id}**/suspend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vmware/vms/**{vm_id}**/suspend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suspend a VMware VM instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** diff --git a/docs/api/v1/server/vmware/vmwarevms.rst b/docs/api/v1/hypervisor/vmware/vmwarevms.rst similarity index 65% rename from docs/api/v1/server/vmware/vmwarevms.rst rename to docs/api/v1/hypervisor/vmware/vmwarevms.rst index af366959..b2c0eea8 100644 --- a/docs/api/v1/server/vmware/vmwarevms.rst +++ b/docs/api/v1/hypervisor/vmware/vmwarevms.rst @@ -1,10 +1,10 @@ -/v1/vmware/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/vmware/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/vmware/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/vmware/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get all VMware VMs available Response status codes diff --git a/docs/api/v1/server/vpcs.rst b/docs/api/v1/hypervisor/vpcs.rst similarity index 65% rename from docs/api/v1/server/vpcs.rst rename to docs/api/v1/hypervisor/vpcs.rst index ab00c921..30db7c0b 100644 --- a/docs/api/v1/server/vpcs.rst +++ b/docs/api/v1/hypervisor/vpcs.rst @@ -1,5 +1,5 @@ Vpcs ---------------------- +----------------------------- .. toctree:: :glob: diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvms.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvms.rst similarity index 91% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvms.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvms.rst index 5866acdd..03e055bd 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvms.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvms.rst @@ -1,10 +1,10 @@ -/v1/projects/{project_id}/vpcs/vms ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vpcs/vms +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vpcs/vms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vpcs/vms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Create a new VPCS instance Parameters @@ -50,5 +50,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvpcsvms.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvpcsvms.txt diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmid.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmid.rst similarity index 89% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmid.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmid.rst index 6b0082d0..0fb5c33f 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmid.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmid.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vpcs/vms/{vm_id} ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id} +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -GET /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +GET /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -39,17 +39,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/get_projectsprojectidvpcsvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_get_projectsprojectidvpcsvmsvmid.txt -PUT /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +PUT /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Update a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -90,17 +90,17 @@ Sample session *************** -.. literalinclude:: ../../../examples/put_projectsprojectidvpcsvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_put_projectsprojectidvpcsvmsvmid.txt -DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}** -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}** +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -112,5 +112,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidvpcsvmsvmid.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidvpcsvmsvmid.txt diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst similarity index 60% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst index 9dffd20c..3f1a742a 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.rst @@ -1,18 +1,18 @@ -/v1/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/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 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port where the nio should be added +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -24,19 +24,19 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt -DELETE /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/adapters/**{adapter_number:\d+}**/ports/**{port_number:\d+}**/nio -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DELETE /v1/hypervisor/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 -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project - **port_number**: Port from where the nio should be removed +- **adapter_number**: Network adapter where the nio is located Response status codes ********************** @@ -48,5 +48,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt +.. literalinclude:: ../../../examples/hypervisor_delete_projectsprojectidvpcsvmsvmidadaptersadapternumberdportsportnumberdnio.txt diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidreload.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidreload.rst similarity index 59% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidreload.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidreload.rst index 1f6f6cd8..3a0505b0 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidreload.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidreload.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vpcs/vms/{vm_id}/reload ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/reload +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/reload -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}**/reload +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reload a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvpcsvmsvmidreload.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvpcsvmsvmidreload.txt diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstart.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstart.rst similarity index 87% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstart.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstart.rst index ca70e4a1..b20b10b2 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstart.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstart.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vpcs/vms/{vm_id}/start ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/start +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/start -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}**/start +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Start a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -39,5 +39,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvpcsvmsvmidstart.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvpcsvmsvmidstart.txt diff --git a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstop.rst b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstop.rst similarity index 60% rename from docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstop.rst rename to docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstop.rst index 0264d441..642ba1b2 100644 --- a/docs/api/v1/server/vpcs/projectsprojectidvpcsvmsvmidstop.rst +++ b/docs/api/v1/hypervisor/vpcs/projectsprojectidvpcsvmsvmidstop.rst @@ -1,16 +1,16 @@ -/v1/projects/{project_id}/vpcs/vms/{vm_id}/stop ----------------------------------------------------------------------------------------------------------------------- +/v1/hypervisor/projects/{project_id}/vpcs/vms/{vm_id}/stop +------------------------------------------------------------------------------------------------------------------------------------------ .. contents:: -POST /v1/projects/**{project_id}**/vpcs/vms/**{vm_id}**/stop -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +POST /v1/hypervisor/projects/**{project_id}**/vpcs/vms/**{vm_id}**/stop +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stop a VPCS instance Parameters ********** -- **project_id**: UUID for the project - **vm_id**: UUID for the instance +- **project_id**: UUID for the project Response status codes ********************** @@ -22,5 +22,5 @@ Sample session *************** -.. literalinclude:: ../../../examples/post_projectsprojectidvpcsvmsvmidstop.txt +.. literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvpcsvmsvmidstop.txt diff --git a/docs/api/v1/server/server.rst b/docs/api/v1/server/server.rst deleted file mode 100644 index fcb176b4..00000000 --- a/docs/api/v1/server/server.rst +++ /dev/null @@ -1,8 +0,0 @@ -Server ---------------------- - -.. toctree:: - :glob: - :maxdepth: 2 - - server/* diff --git a/docs/index.rst b/docs/index.rst index 54c57bb0..9b2710c6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,9 +10,38 @@ Welcome to API documentation! glossary development + +Endpoints +------------ + +GNS3 expose two type of endpoints: + + * Controller + * Hypervisor + + +Common API Endpoints +~~~~~~~~~~~~~~~~~~~~ + +This calls are available on both server. + +.. toctree:: + :glob: + :maxdepth: 2 + + api/v1/common/* + Controller API Endpoints ~~~~~~~~~~~~~~~~~~~~~~~~ +The controller manage all the running topologies. The controller +has knowledge of everything on in GNS3. If you want to create and +manage a topology it's here. The controller will call the hypervisor API +when needed. + +In a standard GNS3 installation you have one controller and one or many +hypervisors. + .. toctree:: :glob: :maxdepth: 2 @@ -20,12 +49,18 @@ Controller API Endpoints api/v1/controller/* -Low level API Endpoints -~~~~~~~~~~~~~~~~~~~~~~~ +Hypervisor API Endpoints +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The hypervisor is the GNS3 process running on a server and controlling +the VM process. + +.. WARNING:: + Consider this endpoints as a private API used by the controller. .. toctree:: :glob: :maxdepth: 2 - api/v1/server/* + api/v1/hypervisor/* diff --git a/gns3server/handlers/__init__.py b/gns3server/handlers/__init__.py index d2fb9b5f..f266befa 100644 --- a/gns3server/handlers/__init__.py +++ b/gns3server/handlers/__init__.py @@ -17,23 +17,27 @@ import sys import os -from gns3server.handlers.api.version_handler import VersionHandler -from gns3server.handlers.api.network_handler import NetworkHandler -from gns3server.handlers.api.project_handler import ProjectHandler -from gns3server.handlers.api.dynamips_device_handler import DynamipsDeviceHandler -from gns3server.handlers.api.dynamips_vm_handler import DynamipsVMHandler -from gns3server.handlers.api.qemu_handler import QEMUHandler -from gns3server.handlers.api.virtualbox_handler import VirtualBoxHandler -from gns3server.handlers.api.docker_handler import DockerHandler -from gns3server.handlers.api.vpcs_handler import VPCSHandler -from gns3server.handlers.api.vmware_handler import VMwareHandler -from gns3server.handlers.api.config_handler import ConfigHandler -from gns3server.handlers.api.server_handler import ServerHandler -from gns3server.handlers.api.file_handler import FileHandler from gns3server.handlers.upload_handler import UploadHandler from gns3server.handlers.index_handler import IndexHandler +from gns3server.handlers.api.version_handler import VersionHandler + +# TODO: Do not load if controller is off +from gns3server.handlers.api.controller.server_handler import ServerHandler + +from gns3server.handlers.api.hypervisor.network_handler import NetworkHandler +from gns3server.handlers.api.hypervisor.project_handler import ProjectHandler +from gns3server.handlers.api.hypervisor.dynamips_device_handler import DynamipsDeviceHandler +from gns3server.handlers.api.hypervisor.dynamips_vm_handler import DynamipsVMHandler +from gns3server.handlers.api.hypervisor.qemu_handler import QEMUHandler +from gns3server.handlers.api.hypervisor.virtualbox_handler import VirtualBoxHandler +from gns3server.handlers.api.hypervisor.docker_handler import DockerHandler +from gns3server.handlers.api.hypervisor.vpcs_handler import VPCSHandler +from gns3server.handlers.api.hypervisor.vmware_handler import VMwareHandler +from gns3server.handlers.api.hypervisor.config_handler import ConfigHandler +from gns3server.handlers.api.hypervisor.file_handler import FileHandler + if sys.platform.startswith("linux") or hasattr(sys, "_called_from_test") or os.environ.get("PYTEST_BUILD_DOCUMENTATION") == "1": # IOU runs only on Linux but testsuite work on UNIX platform if not sys.platform.startswith("win"): - from gns3server.handlers.api.iou_handler import IOUHandler + from gns3server.handlers.api.hypervisor.iou_handler import IOUHandler diff --git a/gns3server/handlers/api/controller/__init__.py b/gns3server/handlers/api/controller/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/gns3server/handlers/api/server_handler.py b/gns3server/handlers/api/controller/server_handler.py similarity index 89% rename from gns3server/handlers/api/server_handler.py rename to gns3server/handlers/api/controller/server_handler.py index 019a841e..69070ce5 100644 --- a/gns3server/handlers/api/server_handler.py +++ b/gns3server/handlers/api/controller/server_handler.py @@ -18,12 +18,12 @@ import asyncio from aiohttp.web import HTTPForbidden -from ...web.route import Route -from ...config import Config -from ...modules.project_manager import ProjectManager -from ...schemas.server import SERVER_CREATE_SCHEMA, SERVER_OBJECT_SCHEMA -from ...controller import Controller -from ...controller.server import Server +from ....web.route import Route +from ....config import Config +from ....modules.project_manager import ProjectManager +from ....schemas.server import SERVER_CREATE_SCHEMA, SERVER_OBJECT_SCHEMA +from ....controller import Controller +from ....controller.server import Server import logging @@ -40,7 +40,6 @@ class ServerHandler: status_codes={ 201: "Server added" }, - controller=True, input=SERVER_CREATE_SCHEMA, output=SERVER_OBJECT_SCHEMA) def create(request, response): diff --git a/gns3server/handlers/api/hypervisor/__init__.py b/gns3server/handlers/api/hypervisor/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/gns3server/handlers/api/config_handler.py b/gns3server/handlers/api/hypervisor/config_handler.py similarity index 95% rename from gns3server/handlers/api/config_handler.py rename to gns3server/handlers/api/hypervisor/config_handler.py index fc1a61d0..aa3b1a99 100644 --- a/gns3server/handlers/api/config_handler.py +++ b/gns3server/handlers/api/hypervisor/config_handler.py @@ -15,10 +15,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ...web.route import Route -from ...config import Config from aiohttp.web import HTTPForbidden +from ....web.route import Route +from ....config import Config + class ConfigHandler: diff --git a/gns3server/handlers/api/docker_handler.py b/gns3server/handlers/api/hypervisor/docker_handler.py similarity index 98% rename from gns3server/handlers/api/docker_handler.py rename to gns3server/handlers/api/hypervisor/docker_handler.py index 467574d3..b9018107 100644 --- a/gns3server/handlers/api/docker_handler.py +++ b/gns3server/handlers/api/hypervisor/docker_handler.py @@ -18,17 +18,17 @@ import os from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...modules.docker import Docker +from ....web.route import Route +from ....modules.docker import Docker -from ...schemas.docker import ( +from ....schemas.docker import ( DOCKER_CREATE_SCHEMA, DOCKER_OBJECT_SCHEMA, DOCKER_UPDATE_SCHEMA, DOCKER_LIST_IMAGES_SCHEMA ) -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...schemas.nio import NIO_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....schemas.nio import NIO_SCHEMA class DockerHandler: diff --git a/gns3server/handlers/api/dynamips_device_handler.py b/gns3server/handlers/api/hypervisor/dynamips_device_handler.py similarity index 95% rename from gns3server/handlers/api/dynamips_device_handler.py rename to gns3server/handlers/api/hypervisor/dynamips_device_handler.py index 9f8f940b..0fa8d2a2 100644 --- a/gns3server/handlers/api/dynamips_device_handler.py +++ b/gns3server/handlers/api/hypervisor/dynamips_device_handler.py @@ -17,13 +17,13 @@ import os import asyncio -from ...web.route import Route -from ...schemas.dynamips_device import DEVICE_CREATE_SCHEMA -from ...schemas.dynamips_device import DEVICE_UPDATE_SCHEMA -from ...schemas.dynamips_device import DEVICE_OBJECT_SCHEMA -from ...schemas.dynamips_device import DEVICE_NIO_SCHEMA -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...modules.dynamips import Dynamips +from ....web.route import Route +from ....schemas.dynamips_device import DEVICE_CREATE_SCHEMA +from ....schemas.dynamips_device import DEVICE_UPDATE_SCHEMA +from ....schemas.dynamips_device import DEVICE_OBJECT_SCHEMA +from ....schemas.dynamips_device import DEVICE_NIO_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....modules.dynamips import Dynamips class DynamipsDeviceHandler: diff --git a/gns3server/handlers/api/dynamips_vm_handler.py b/gns3server/handlers/api/hypervisor/dynamips_vm_handler.py similarity index 97% rename from gns3server/handlers/api/dynamips_vm_handler.py rename to gns3server/handlers/api/hypervisor/dynamips_vm_handler.py index 0f1cc16c..6b643821 100644 --- a/gns3server/handlers/api/dynamips_vm_handler.py +++ b/gns3server/handlers/api/hypervisor/dynamips_vm_handler.py @@ -19,17 +19,17 @@ import os import sys import base64 -from ...web.route import Route -from ...schemas.nio import NIO_SCHEMA -from ...schemas.vm import VM_LIST_IMAGES_SCHEMA -from ...schemas.dynamips_vm import VM_CREATE_SCHEMA -from ...schemas.dynamips_vm import VM_UPDATE_SCHEMA -from ...schemas.dynamips_vm import VM_OBJECT_SCHEMA -from ...schemas.dynamips_vm import VM_CONFIGS_SCHEMA -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...modules.dynamips import Dynamips -from ...modules.dynamips.dynamips_error import DynamipsError -from ...modules.project_manager import ProjectManager +from ....web.route import Route +from ....schemas.nio import NIO_SCHEMA +from ....schemas.vm import VM_LIST_IMAGES_SCHEMA +from ....schemas.dynamips_vm import VM_CREATE_SCHEMA +from ....schemas.dynamips_vm import VM_UPDATE_SCHEMA +from ....schemas.dynamips_vm import VM_OBJECT_SCHEMA +from ....schemas.dynamips_vm import VM_CONFIGS_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....modules.dynamips import Dynamips +from ....modules.dynamips.dynamips_error import DynamipsError +from ....modules.project_manager import ProjectManager DEFAULT_CHASSIS = { "c1700": "1720", diff --git a/gns3server/handlers/api/file_handler.py b/gns3server/handlers/api/hypervisor/file_handler.py similarity index 96% rename from gns3server/handlers/api/file_handler.py rename to gns3server/handlers/api/hypervisor/file_handler.py index 4342f6c6..02243a01 100644 --- a/gns3server/handlers/api/file_handler.py +++ b/gns3server/handlers/api/hypervisor/file_handler.py @@ -17,8 +17,8 @@ import asyncio import aiohttp -from ...web.route import Route -from ...schemas.file import FILE_STREAM_SCHEMA +from ....web.route import Route +from ....schemas.file import FILE_STREAM_SCHEMA class FileHandler: diff --git a/gns3server/handlers/api/iou_handler.py b/gns3server/handlers/api/hypervisor/iou_handler.py similarity index 97% rename from gns3server/handlers/api/iou_handler.py rename to gns3server/handlers/api/hypervisor/iou_handler.py index dbc3d923..e466e797 100644 --- a/gns3server/handlers/api/iou_handler.py +++ b/gns3server/handlers/api/hypervisor/iou_handler.py @@ -18,16 +18,16 @@ import os from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...schemas.nio import NIO_SCHEMA -from ...schemas.iou import IOU_CREATE_SCHEMA -from ...schemas.iou import IOU_START_SCHEMA -from ...schemas.iou import IOU_UPDATE_SCHEMA -from ...schemas.iou import IOU_OBJECT_SCHEMA -from ...schemas.iou import IOU_CONFIGS_SCHEMA -from ...schemas.vm import VM_LIST_IMAGES_SCHEMA -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...modules.iou import IOU +from ....web.route import Route +from ....schemas.nio import NIO_SCHEMA +from ....schemas.iou import IOU_CREATE_SCHEMA +from ....schemas.iou import IOU_START_SCHEMA +from ....schemas.iou import IOU_UPDATE_SCHEMA +from ....schemas.iou import IOU_OBJECT_SCHEMA +from ....schemas.iou import IOU_CONFIGS_SCHEMA +from ....schemas.vm import VM_LIST_IMAGES_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....modules.iou import IOU class IOUHandler: diff --git a/gns3server/handlers/api/network_handler.py b/gns3server/handlers/api/hypervisor/network_handler.py similarity index 90% rename from gns3server/handlers/api/network_handler.py rename to gns3server/handlers/api/hypervisor/network_handler.py index 8eb5a364..526130b3 100644 --- a/gns3server/handlers/api/network_handler.py +++ b/gns3server/handlers/api/hypervisor/network_handler.py @@ -15,10 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ...web.route import Route -from ...modules.port_manager import PortManager -from ...modules.project_manager import ProjectManager -from ...utils.interfaces import interfaces +from ....web.route import Route +from ....modules.port_manager import PortManager +from ....modules.project_manager import ProjectManager +from ....utils.interfaces import interfaces class NetworkHandler: diff --git a/gns3server/handlers/api/project_handler.py b/gns3server/handlers/api/hypervisor/project_handler.py similarity index 97% rename from gns3server/handlers/api/project_handler.py rename to gns3server/handlers/api/hypervisor/project_handler.py index 866fddf1..96dc47d7 100644 --- a/gns3server/handlers/api/project_handler.py +++ b/gns3server/handlers/api/hypervisor/project_handler.py @@ -21,10 +21,10 @@ import json import os import psutil -from ...web.route import Route -from ...schemas.project import PROJECT_OBJECT_SCHEMA, PROJECT_CREATE_SCHEMA, PROJECT_UPDATE_SCHEMA, PROJECT_FILE_LIST_SCHEMA, PROJECT_LIST_SCHEMA -from ...modules.project_manager import ProjectManager -from ...modules import MODULES +from ....web.route import Route +from ....schemas.project import PROJECT_OBJECT_SCHEMA, PROJECT_CREATE_SCHEMA, PROJECT_UPDATE_SCHEMA, PROJECT_FILE_LIST_SCHEMA, PROJECT_LIST_SCHEMA +from ....modules.project_manager import ProjectManager +from ....modules import MODULES import logging log = logging.getLogger() diff --git a/gns3server/handlers/api/qemu_handler.py b/gns3server/handlers/api/hypervisor/qemu_handler.py similarity index 95% rename from gns3server/handlers/api/qemu_handler.py rename to gns3server/handlers/api/hypervisor/qemu_handler.py index c64d1904..aa1b7c08 100644 --- a/gns3server/handlers/api/qemu_handler.py +++ b/gns3server/handlers/api/hypervisor/qemu_handler.py @@ -19,19 +19,19 @@ import sys import os.path from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...modules.project_manager import ProjectManager -from ...schemas.nio import NIO_SCHEMA -from ...schemas.qemu import QEMU_CREATE_SCHEMA -from ...schemas.qemu import QEMU_UPDATE_SCHEMA -from ...schemas.qemu import QEMU_OBJECT_SCHEMA -from ...schemas.qemu import QEMU_BINARY_FILTER_SCHEMA -from ...schemas.qemu import QEMU_BINARY_LIST_SCHEMA -from ...schemas.qemu import QEMU_CAPABILITY_LIST_SCHEMA -from ...schemas.qemu import QEMU_IMAGE_CREATE_SCHEMA -from ...schemas.vm import VM_LIST_IMAGES_SCHEMA -from ...modules.qemu import Qemu -from ...config import Config +from ....web.route import Route +from ....modules.project_manager import ProjectManager +from ....schemas.nio import NIO_SCHEMA +from ....schemas.qemu import QEMU_CREATE_SCHEMA +from ....schemas.qemu import QEMU_UPDATE_SCHEMA +from ....schemas.qemu import QEMU_OBJECT_SCHEMA +from ....schemas.qemu import QEMU_BINARY_FILTER_SCHEMA +from ....schemas.qemu import QEMU_BINARY_LIST_SCHEMA +from ....schemas.qemu import QEMU_CAPABILITY_LIST_SCHEMA +from ....schemas.qemu import QEMU_IMAGE_CREATE_SCHEMA +from ....schemas.vm import VM_LIST_IMAGES_SCHEMA +from ....modules.qemu import Qemu +from ....config import Config class QEMUHandler: diff --git a/gns3server/handlers/api/virtualbox_handler.py b/gns3server/handlers/api/hypervisor/virtualbox_handler.py similarity index 97% rename from gns3server/handlers/api/virtualbox_handler.py rename to gns3server/handlers/api/hypervisor/virtualbox_handler.py index fbc45871..3368f158 100644 --- a/gns3server/handlers/api/virtualbox_handler.py +++ b/gns3server/handlers/api/hypervisor/virtualbox_handler.py @@ -18,14 +18,14 @@ import os from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...schemas.nio import NIO_SCHEMA -from ...schemas.virtualbox import VBOX_CREATE_SCHEMA -from ...schemas.virtualbox import VBOX_UPDATE_SCHEMA -from ...schemas.virtualbox import VBOX_OBJECT_SCHEMA -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...modules.virtualbox import VirtualBox -from ...modules.project_manager import ProjectManager +from ....web.route import Route +from ....schemas.nio import NIO_SCHEMA +from ....schemas.virtualbox import VBOX_CREATE_SCHEMA +from ....schemas.virtualbox import VBOX_UPDATE_SCHEMA +from ....schemas.virtualbox import VBOX_OBJECT_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....modules.virtualbox import VirtualBox +from ....modules.project_manager import ProjectManager class VirtualBoxHandler: diff --git a/gns3server/handlers/api/vmware_handler.py b/gns3server/handlers/api/hypervisor/vmware_handler.py similarity index 97% rename from gns3server/handlers/api/vmware_handler.py rename to gns3server/handlers/api/hypervisor/vmware_handler.py index d2b3d1ce..0dd35305 100644 --- a/gns3server/handlers/api/vmware_handler.py +++ b/gns3server/handlers/api/hypervisor/vmware_handler.py @@ -18,14 +18,14 @@ import os from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...schemas.vmware import VMWARE_CREATE_SCHEMA -from ...schemas.vmware import VMWARE_UPDATE_SCHEMA -from ...schemas.vmware import VMWARE_OBJECT_SCHEMA -from ...schemas.vm import VM_CAPTURE_SCHEMA -from ...schemas.nio import NIO_SCHEMA -from ...modules.vmware import VMware -from ...modules.project_manager import ProjectManager +from ....web.route import Route +from ....schemas.vmware import VMWARE_CREATE_SCHEMA +from ....schemas.vmware import VMWARE_UPDATE_SCHEMA +from ....schemas.vmware import VMWARE_OBJECT_SCHEMA +from ....schemas.vm import VM_CAPTURE_SCHEMA +from ....schemas.nio import NIO_SCHEMA +from ....modules.vmware import VMware +from ....modules.project_manager import ProjectManager class VMwareHandler: diff --git a/gns3server/handlers/api/vpcs_handler.py b/gns3server/handlers/api/hypervisor/vpcs_handler.py similarity index 96% rename from gns3server/handlers/api/vpcs_handler.py rename to gns3server/handlers/api/hypervisor/vpcs_handler.py index 59dd1dcd..4a172f08 100644 --- a/gns3server/handlers/api/vpcs_handler.py +++ b/gns3server/handlers/api/hypervisor/vpcs_handler.py @@ -16,12 +16,12 @@ # along with this program. If not, see . from aiohttp.web import HTTPConflict -from ...web.route import Route -from ...schemas.nio import NIO_SCHEMA -from ...schemas.vpcs import VPCS_CREATE_SCHEMA -from ...schemas.vpcs import VPCS_UPDATE_SCHEMA -from ...schemas.vpcs import VPCS_OBJECT_SCHEMA -from ...modules.vpcs import VPCS +from ....web.route import Route +from ....schemas.nio import NIO_SCHEMA +from ....schemas.vpcs import VPCS_CREATE_SCHEMA +from ....schemas.vpcs import VPCS_UPDATE_SCHEMA +from ....schemas.vpcs import VPCS_OBJECT_SCHEMA +from ....modules.vpcs import VPCS class VPCSHandler: diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py index 98a8fc11..c55d6037 100644 --- a/gns3server/web/documentation.py +++ b/gns3server/web/documentation.py @@ -36,11 +36,18 @@ class Documentation(object): self._directory = directory def write(self): - self.write_documentation(False) + self.write_documentation("hypervisor") # Controller documentation - self.write_documentation(True) + self.write_documentation("controller") + # Write doc common to both + self.write_documentation("common") - def write_documentation(self, controller): + def write_documentation(self, doc_type): + """ + Build all the doc page for handlers + + :param doc_type: Type of doc to generate (controller, hypervisor or common) + """ for handler_name in sorted(self._documentation): print("Build {}".format(handler_name)) @@ -50,25 +57,27 @@ class Documentation(object): if api_version is None: continue - if self._documentation[handler_name][path].get("controller", False): + if "controller." in handler_name: server_type = "controller" - if not controller: - continue + elif "hypervisor." in handler_name: + server_type = "hypervisor" else: - server_type = "server" - if controller: - continue + server_type = "common" - self._create_handler_directory(handler_name, api_version, server_type) + if doc_type != server_type: + continue filename = self._file_path(path) handler_doc = self._documentation[handler_name][path] - with open("{}/api/v{}/{}/{}/{}.rst".format(self._directory, api_version, server_type, handler_name, filename), 'w+') as f: - f.write('{}\n----------------------------------------------------------------------------------------------------------------------\n\n'.format(path)) + handler = handler_name.replace(server_type + ".", "") + + self._create_handler_directory(handler, api_version, server_type) + with open("{}/api/v{}/{}/{}/{}.rst".format(self._directory, api_version, server_type, handler, 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') f.write('{}\n\n'.format(method["description"])) if len(method["parameters"]) > 0: @@ -93,7 +102,7 @@ class Documentation(object): f.write("Output\n*******\n") self._write_json_schema(f, method["output_schema"]) - self._include_query_example(f, method, path, api_version) + self._include_query_example(f, method, path, api_version, server_type) def _create_handler_directory(self, handler_name, api_version, server_type): """Create a directory for the handler and add an index inside""" @@ -103,18 +112,20 @@ class Documentation(object): with open("{}/api/v{}/{}/{}.rst".format(self._directory, api_version, server_type, handler_name), "w+") as f: f.write(handler_name.replace("api.", "").replace("_", " ", ).capitalize()) - f.write("\n---------------------\n\n") + 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, api_version): + def _include_query_example(self, f, method, path, api_version, server_type): """If a sample session is available we include it in documentation""" m = method["method"].lower() - query_path = "{}_{}.txt".format(m, self._file_path(path)) + query_path = "{}_{}_{}.txt".format(server_type, m, self._file_path(path)) if os.path.isfile(os.path.join(self._directory, "api", "examples", query_path)): f.write("Sample session\n***************\n") f.write("\n\n.. literalinclude:: ../../../examples/{}\n\n".format(query_path)) def _file_path(self, path): + path = path.replace("hypervisor", "") + path = path.replace("controller", "") return re.sub("^v1", "", re.sub("[^a-z0-9]", "", path)) def _write_definitions(self, f, schema): diff --git a/gns3server/web/route.py b/gns3server/web/route.py index c71cf5d9..e8eebe3e 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -123,29 +123,34 @@ class Route(object): api_version = kw.get("api_version", 1) raw = kw.get("raw", False) - # If it's a JSON api endpoint just register the endpoint an do nothing - if api_version is None: - cls._path = path - else: - cls._path = "/v{version}{path}".format(path=path, version=api_version) - def register(func): - route = cls._path + # Add the type of server to the route + if "controller" in func.__module__: + route = "/v{version}/controller{path}".format(path=path, version=api_version) + elif "hypervisor" in func.__module__: + route = "/v{version}/hypervisor{path}".format(path=path, version=api_version) + elif "handlers.api" in func.__module__: + route = "/v{version}{path}".format(path=path, version=api_version) + else: + route = path - handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.api.", "") - cls._documentation.setdefault(handler, {}) - cls._documentation[handler].setdefault(route, {"api_version": api_version, - "controller": kw.get("controller", False), - "methods": []}) + # Compute metadata for the documentation + if api_version: + handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.api.", "") + cls._documentation.setdefault(handler, {}) + cls._documentation[handler].setdefault(route, {"api_version": api_version, + "controller": kw.get("controller", False), + "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", ""), + }) - 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", ""), - }) func = asyncio.coroutine(func) @asyncio.coroutine @@ -253,7 +258,7 @@ class Route(object): response = yield from control_schema(request) return response - cls._routes.append((method, cls._path, vm_concurrency)) + cls._routes.append((method, route, vm_concurrency)) return vm_concurrency return register diff --git a/scripts/documentation.sh b/scripts/documentation.sh index 91d9e026..3dd1db86 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 tests/handlers export PYTHONPATH=. python3 gns3server/web/documentation.py diff --git a/tests/conftest.py b/tests/conftest.py index ac8d1ec6..be2a8629 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -79,7 +79,7 @@ def _get_unused_port(): @pytest.fixture -def server(request, loop, port_manager, monkeypatch): +def http_server(request, loop, port_manager, monkeypatch): """A GNS3 server""" port = _get_unused_port() @@ -101,9 +101,45 @@ def server(request, loop, port_manager, monkeypatch): srv.close() srv.wait_closed() request.addfinalizer(tear_down) + return (host, port) + + +@pytest.fixture +def http_root(loop, http_server): + """ + Return an helper allowing you to call the server without any prefix + """ + host, port = http_server return Query(loop, host=host, port=port) +@pytest.fixture +def http_controller(loop, http_server): + """ + Return an helper allowing you to call the server API without any prefix + """ + host, port = http_server + return Query(loop, host=host, port=port, prefix="/controller", api_version=1) + + +@pytest.fixture +def http_hypervisor(loop, http_server): + """ + Return an helper allowing you to call the hypervisor API via HTTP + """ + host, port = http_server + return Query(loop, host=host, port=port, prefix="/hypervisor", api_version=1) + + +@pytest.fixture +def http_api(loop, http_server): + """ + Return an helper allowing you to call the root API via HTTP + """ + host, port = http_server + return Query(loop, host=host, port=port, api_version=1) + + @pytest.fixture(scope="function") def project(tmpdir): """A GNS3 lab""" diff --git a/tests/handlers/api/.!13639!base.py b/tests/handlers/api/.!13639!base.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/handlers/api/base.py b/tests/handlers/api/base.py index cfa9f848..30235a96 100644 --- a/tests/handlers/api/base.py +++ b/tests/handlers/api/base.py @@ -26,11 +26,20 @@ import os class Query: + """ + Helper to make query againt the test server + """ - def __init__(self, loop, host='localhost', port=8001): + def __init__(self, loop, host='localhost', port=8001, prefix='', api_version=None): + """ + :param prefix: Prefix added before path (ex: /hypervisor) + :param api_version: Version of the api + """ self._loop = loop self._port = port self._host = host + self._prefix = prefix + self._api_version = api_version def post(self, path, body={}, **kwargs): return self._fetch("POST", path, body, **kwargs) @@ -44,25 +53,24 @@ class Query: def delete(self, path, **kwargs): return self._fetch("DELETE", path, **kwargs) - def get_url(self, path, version): - if version is None: - return "http://{}:{}{}".format(self._host, self._port, path) - return "http://{}:{}/v{}{}".format(self._host, self._port, version, path) + def get_url(self, path): + if self._api_version is None: + return "http://{}:{}{}{}".format(self._host, self._port, self._prefix, path) + return "http://{}:{}/v{}{}{}".format(self._host, self._port, self._api_version, self._prefix, path) - def _fetch(self, method, path, body=None, api_version=1, **kwargs): + def _fetch(self, method, path, body=None, **kwargs): """Fetch an url, parse the JSON and return response Options: - example if True the session is included inside documentation - raw do not JSON encode the query - - api_version Version of API, None if no version """ if body is not None and not kwargs.get("raw", False): body = json.dumps(body) @asyncio.coroutine def go_request(future): - response = yield from aiohttp.request(method, self.get_url(path, api_version), data=body) + response = yield from aiohttp.request(method, self.get_url(path), data=body) future.set_result(response) future = asyncio.Future() asyncio.async(go_request(future)) @@ -79,7 +87,8 @@ class Query: response.body = future.result() x_route = response.headers.get('X-Route', None) if x_route is not None: - response.route = x_route.replace("/v1", "") + response.route = x_route.replace("/v{}".format(self._api_version), "") + response.route = response.route .replace(self._prefix, "") if response.body is not None: if response.headers.get("CONTENT-TYPE", "") == "application/json": @@ -96,27 +105,27 @@ class Query: response.json = {} response.html = "" if kwargs.get('example') and os.environ.get("PYTEST_BUILD_DOCUMENTATION") == "1": - self._dump_example(method, response.route, api_version, path, body, response) + self._dump_example(method, response.route, path, body, response) return response - def _dump_example(self, method, route, api_version, path, body, response): + def _dump_example(self, method, route, path, body, response): """Dump the request for the documentation""" if path is None: return with open(self._example_file_path(method, route), 'w+') as f: - f.write("curl -i -X {} 'http://localhost:8000/v{}{}'".format(method, api_version, path)) + f.write("curl -i -X {} 'http://localhost:8000/v{}{}'".format(method, self._api_version, path)) if body: f.write(" -d '{}'".format(re.sub(r"\n", "", json.dumps(json.loads(body), sort_keys=True)))) f.write("\n\n") - f.write("{} /v{}{} HTTP/1.1\n".format(method, api_version, path)) + f.write("{} /v{}{} HTTP/1.1\n".format(method, self._api_version, path)) if body: f.write(json.dumps(json.loads(body), sort_keys=True, indent=4)) f.write("\n\n\n") f.write("HTTP/1.1 {}\n".format(response.status)) for header, value in sorted(response.headers.items()): if header == 'DATE': - # We fix the date otherwise the example is always different + # We fix the date otherwise the example is always different and create change in git value = "Thu, 08 Jan 2015 16:09:15 GMT" f.write("{}: {}\n".format(header, value)) f.write("\n") @@ -126,4 +135,8 @@ class Query: def _example_file_path(self, method, path): path = re.sub('[^a-z0-9]', '', path) - return "docs/api/examples/{}_{}.txt".format(method.lower(), path) + if len(self._prefix): + prefix = self._prefix.replace('/', '') + else: + prefix = 'common' + return "docs/api/examples/{}_{}_{}.txt".format(prefix, method.lower(), path) diff --git a/tests/handlers/api/controller/__init__.py b/tests/handlers/api/controller/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/handlers/api/test_server.py b/tests/handlers/api/controller/test_server.py similarity index 90% rename from tests/handlers/api/test_server.py rename to tests/handlers/api/controller/test_server.py index 617c9277..7051941e 100644 --- a/tests/handlers/api/test_server.py +++ b/tests/handlers/api/controller/test_server.py @@ -16,7 +16,7 @@ # along with this program. If not, see . -def test_server_create(server, controller): +def test_server_create(http_controller, controller): params = { "server_id": "my_server_id", @@ -26,7 +26,7 @@ def test_server_create(server, controller): "user": "julien", "password": "secure" } - response = server.post("/servers", params, example=True) + response = http_controller.post("/servers", params, example=True) assert response.status == 201 assert response.route == "/servers" assert response.json["user"] == "julien" diff --git a/tests/handlers/api/hypervisor/__init__.py b/tests/handlers/api/hypervisor/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/handlers/api/test_config.py b/tests/handlers/api/hypervisor/test_config.py similarity index 85% rename from tests/handlers/api/test_config.py rename to tests/handlers/api/hypervisor/test_config.py index 542a1b72..0d6c6ea0 100644 --- a/tests/handlers/api/test_config.py +++ b/tests/handlers/api/hypervisor/test_config.py @@ -19,7 +19,7 @@ from unittest.mock import MagicMock, patch from gns3server.config import Config -def test_reload_accepted(server): +def test_reload_accepted(http_hypervisor): gns_config = MagicMock() config = Config.instance() @@ -27,17 +27,17 @@ def test_reload_accepted(server): gns_config.get_section_config.return_value = config.get_section_config("Server") with patch("gns3server.config.Config.instance", return_value=gns_config): - response = server.post('/config/reload', example=True) + response = http_hypervisor.post('/config/reload', example=True) assert response.status == 201 assert gns_config.reload.called -def test_reload_forbidden(server): +def test_reload_forbidden(http_hypervisor): config = Config.instance() config.set("Server", "local", "false") - response = server.post('/config/reload') + response = http_hypervisor.post('/config/reload') assert response.status == 403 diff --git a/tests/handlers/api/test_docker.py b/tests/handlers/api/hypervisor/test_docker.py similarity index 64% rename from tests/handlers/api/test_docker.py rename to tests/handlers/api/hypervisor/test_docker.py index 5a9b96e5..d1f870ef 100644 --- a/tests/handlers/api/test_docker.py +++ b/tests/handlers/api/hypervisor/test_docker.py @@ -43,20 +43,20 @@ def mock_connection(): @pytest.fixture -def vm(server, project, base_params): +def vm(http_hypervisor, project, base_params): with asyncio_patch("gns3server.modules.docker.Docker.list_images", return_value=[{"image": "nginx"}]) as mock_list: with asyncio_patch("gns3server.modules.docker.Docker.query", return_value={"Id": "8bd8153ea8f5"}) as mock: - response = server.post("/projects/{project_id}/docker/vms".format(project_id=project.id), base_params) + response = http_hypervisor.post("/projects/{project_id}/docker/vms".format(project_id=project.id), base_params) if response.status != 201: print(response.body) assert response.status == 201 return response.json -def test_docker_create(server, project, base_params): +def test_docker_create(http_hypervisor, project, base_params): with asyncio_patch("gns3server.modules.docker.Docker.list_images", return_value=[{"image": "nginx"}]) as mock_list: with asyncio_patch("gns3server.modules.docker.Docker.query", return_value={"Id": "8bd8153ea8f5"}) as mock: - response = server.post("/projects/{project_id}/docker/vms".format(project_id=project.id), base_params) + response = http_hypervisor.post("/projects/{project_id}/docker/vms".format(project_id=project.id), base_params) assert response.status == 201 assert response.route == "/projects/{project_id}/docker/vms" assert response.json["name"] == "PC TEST 1" @@ -67,66 +67,66 @@ def test_docker_create(server, project, base_params): assert response.json["environment"] == "YES=1\nNO=0" -def test_docker_start(server, vm): +def test_docker_start(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 204 -def test_docker_stop(server, vm): +def test_docker_stop(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.stop", return_value=True) as mock: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 204 -def test_docker_reload(server, vm): +def test_docker_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.restart", return_value=True) as mock: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 204 -def test_docker_delete(server, vm): +def test_docker_delete(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.delete", return_value=True) as mock: - response = server.delete("/projects/{project_id}/docker/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.delete("/projects/{project_id}/docker/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 204 -def test_docker_reload(server, vm): +def test_docker_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.pause", return_value=True) as mock: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 204 -def test_docker_nio_create_udp(server, vm): - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, - example=True) +def test_docker_nio_create_udp(http_hypervisor, vm): + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, + example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_udp" -def test_docker_delete_nio(server, vm): +def test_docker_delete_nio(http_hypervisor, vm): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.adapter_remove_nio_binding") as mock: - response = server.delete("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.delete("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert response.route == "/projects/{project_id}/docker/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" -def test_docker_update(server, vm, tmpdir, free_console_port): +def test_docker_update(http_hypervisor, vm, tmpdir, free_console_port): with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.update") as mock: - response = server.put("/projects/{project_id}/docker/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", - "console": free_console_port, - "start_command": "yes", - "environment": "GNS3=1\nGNS4=0"}, - example=True) + response = http_hypervisor.put("/projects/{project_id}/docker/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", + "console": free_console_port, + "start_command": "yes", + "environment": "GNS3=1\nGNS4=0"}, + example=True) assert mock.called assert response.status == 200 assert response.json["name"] == "test" @@ -135,13 +135,13 @@ def test_docker_update(server, vm, tmpdir, free_console_port): assert response.json["environment"] == "GNS3=1\nGNS4=0" -def test_docker_start_capture(server, vm, tmpdir, project): +def test_docker_start_capture(http_hypervisor, vm, tmpdir, project): with patch("gns3server.modules.docker.docker_vm.DockerVM.is_running", return_value=True) as mock: with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.start_capture") as start_capture: params = {"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"} - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params, example=True) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params, example=True) assert response.status == 200 @@ -149,36 +149,36 @@ def test_docker_start_capture(server, vm, tmpdir, project): assert "test.pcap" in response.json["pcap_file_path"] -def test_docker_start_capture_not_started(server, vm, tmpdir): +def test_docker_start_capture_not_started(http_hypervisor, vm, tmpdir): with patch("gns3server.modules.docker.docker_vm.DockerVM.is_running", return_value=False) as mock: with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.start_capture") as start_capture: params = {"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"} - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params) assert not start_capture.called assert response.status == 409 -def test_docker_stop_capture(server, vm, tmpdir, project): +def test_docker_stop_capture(http_hypervisor, vm, tmpdir, project): with patch("gns3server.modules.docker.docker_vm.DockerVM.is_running", return_value=True) as mock: with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.stop_capture") as stop_capture: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert stop_capture.called -def test_docker_stop_capture_not_started(server, vm, tmpdir): +def test_docker_stop_capture_not_started(http_hypervisor, vm, tmpdir): with patch("gns3server.modules.docker.docker_vm.DockerVM.is_running", return_value=False) as mock: with asyncio_patch("gns3server.modules.docker.docker_vm.DockerVM.stop_capture") as stop_capture: - response = server.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/docker/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert not stop_capture.called assert response.status == 409 diff --git a/tests/handlers/api/test_dynamips.py b/tests/handlers/api/hypervisor/test_dynamips.py similarity index 72% rename from tests/handlers/api/test_dynamips.py rename to tests/handlers/api/hypervisor/test_dynamips.py index ba652b5f..f68116ab 100644 --- a/tests/handlers/api/test_dynamips.py +++ b/tests/handlers/api/hypervisor/test_dynamips.py @@ -24,11 +24,11 @@ from tests.utils import asyncio_patch # @pytest.yield_fixture(scope="module") -# def vm(server, project): +# def vm(http_hypervisor, project): # # dynamips_path = "/fake/dynamips" # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.create", return_value=True) as mock: -# response = server.post("/projects/{project_id}/dynamips/vms".format(project_id=project.id), {"name": "My router", +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms".format(project_id=project.id), {"name": "My router", # "platform": "c3745", # "image": "somewhere", # "ram": 128}) @@ -39,10 +39,10 @@ from tests.utils import asyncio_patch # yield response.json # # -# def test_dynamips_vm_create(server, project): +# def test_dynamips_vm_create(http_hypervisor, project): # # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.create", return_value=True): -# response = server.post("/projects/{project_id}/dynamips/vms".format(project_id=project.id), {"name": "My router", +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms".format(project_id=project.id), {"name": "My router", # "platform": "c3745", # "image": "somewhere", # "ram": 128}, @@ -53,46 +53,46 @@ from tests.utils import asyncio_patch # assert response.json["dynamips_id"] # # -# def test_dynamips_vm_get(server, project, vm): -# response = server.get("/projects/{project_id}/dynamips/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +# def test_dynamips_vm_get(http_hypervisor, project, vm): +# response = http_hypervisor.get("/projects/{project_id}/dynamips/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) # assert response.status == 200 # assert response.route == "/projects/{project_id}/dynamips/vms/{vm_id}" # assert response.json["name"] == "My router" # assert response.json["project_id"] == project.id # # -# def test_dynamips_vm_start(server, vm): +# def test_dynamips_vm_start(http_hypervisor, vm): # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.start", return_value=True) as mock: -# response = server.post("/projects/{project_id}/dynamips/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) # assert mock.called # assert response.status == 204 # # -# def test_dynamips_vm_stop(server, vm): +# def test_dynamips_vm_stop(http_hypervisor, vm): # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.stop", return_value=True) as mock: -# response = server.post("/projects/{project_id}/dynamips/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) # assert mock.called # assert response.status == 204 # # -# def test_dynamips_vm_suspend(server, vm): +# def test_dynamips_vm_suspend(http_hypervisor, vm): # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.suspend", return_value=True) as mock: -# response = server.post("/projects/{project_id}/dynamips/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) # assert mock.called # assert response.status == 204 # # -# def test_dynamips_vm_resume(server, vm): +# def test_dynamips_vm_resume(http_hypervisor, vm): # with asyncio_patch("gns3server.modules.dynamips.nodes.router.Router.resume", return_value=True) as mock: -# response = server.post("/projects/{project_id}/dynamips/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) +# response = http_hypervisor.post("/projects/{project_id}/dynamips/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) # assert mock.called # assert response.status == 204 -# def test_vbox_nio_create_udp(server, vm): +# def test_vbox_nio_create_udp(http_hypervisor, vm): # # with asyncio_patch('gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.adapter_add_nio_binding') as mock: -# response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/nio".format(project_id=vm["project_id"], +# response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/nio".format(project_id=vm["project_id"], # vm_id=vm["vm_id"]), {"type": "nio_udp", # "lport": 4242, # "rport": 4343, @@ -108,10 +108,10 @@ from tests.utils import asyncio_patch # assert response.json["type"] == "nio_udp" # # -# def test_vbox_delete_nio(server, vm): +# def test_vbox_delete_nio(http_hypervisor, vm): # # with asyncio_patch('gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.adapter_remove_nio_binding') as mock: -# response = server.delete("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +# response = http_hypervisor.delete("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) # # assert mock.called # args, kwgars = mock.call_args @@ -121,8 +121,8 @@ from tests.utils import asyncio_patch # assert response.route == "/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_id:\d+}/nio" # # -# def test_vbox_update(server, vm, free_console_port): -# response = server.put("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", +# def test_vbox_update(http_hypervisor, vm, free_console_port): +# response = http_hypervisor.put("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", # "console": free_console_port}) # assert response.status == 200 # assert response.json["name"] == "test" @@ -151,17 +151,17 @@ def fake_file(tmpdir): return path -def test_vms(server, tmpdir, fake_dynamips, fake_file): +def test_vms(http_hypervisor, tmpdir, fake_dynamips, fake_file): with patch("gns3server.modules.Dynamips.get_images_directory", return_value=str(tmpdir), example=True): - response = server.get("/dynamips/vms") + response = http_hypervisor.get("/dynamips/vms") assert response.status == 200 assert response.json == [{"filename": "7200.bin", "path": "7200.bin"}] -def test_upload_vm(server, tmpdir): +def test_upload_vm(http_hypervisor, tmpdir): with patch("gns3server.modules.Dynamips.get_images_directory", return_value=str(tmpdir),): - response = server.post("/dynamips/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/dynamips/vms/test2", body="TEST", raw=True) assert response.status == 204 with open(str(tmpdir / "test2")) as f: @@ -172,11 +172,11 @@ def test_upload_vm(server, tmpdir): assert checksum == "033bd94b1168d7e4f0d644c3c95e35bf" -def test_upload_vm_permission_denied(server, tmpdir): +def test_upload_vm_permission_denied(http_hypervisor, tmpdir): with open(str(tmpdir / "test2"), "w+") as f: f.write("") os.chmod(str(tmpdir / "test2"), 0) with patch("gns3server.modules.Dynamips.get_images_directory", return_value=str(tmpdir),): - response = server.post("/dynamips/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/dynamips/vms/test2", body="TEST", raw=True) assert response.status == 409 diff --git a/tests/handlers/api/test_file.py b/tests/handlers/api/hypervisor/test_file.py similarity index 83% rename from tests/handlers/api/test_file.py rename to tests/handlers/api/hypervisor/test_file.py index 0b110b2e..1c86a85d 100644 --- a/tests/handlers/api/test_file.py +++ b/tests/handlers/api/hypervisor/test_file.py @@ -26,14 +26,14 @@ import aiohttp from gns3server.version import __version__ -def test_stream(server, tmpdir, loop): +def test_stream(http_hypervisor, tmpdir, loop): with open(str(tmpdir / "test"), 'w+') as f: f.write("hello") def go(future): query = json.dumps({"location": str(tmpdir / "test")}) headers = {'content-type': 'application/json'} - response = yield from aiohttp.request("GET", server.get_url("/files/stream", 1), data=query, headers=headers) + response = yield from aiohttp.request("GET", http_hypervisor.get_url("/files/stream"), data=query, headers=headers) response.body = yield from response.content.read(5) with open(str(tmpdir / "test"), 'a') as f: f.write("world") @@ -48,11 +48,11 @@ def test_stream(server, tmpdir, loop): assert response.body == b'helloworld' -def test_stream_file_not_found(server, tmpdir, loop): +def test_stream_file_not_found(http_hypervisor, tmpdir, loop): def go(future): query = json.dumps({"location": str(tmpdir / "test")}) headers = {'content-type': 'application/json'} - response = yield from aiohttp.request("GET", server.get_url("/files/stream", 1), data=query, headers=headers) + response = yield from aiohttp.request("GET", http_hypervisor.get_url("/files/stream"), data=query, headers=headers) response.close() future.set_result(response) diff --git a/tests/handlers/api/test_iou.py b/tests/handlers/api/hypervisor/test_iou.py similarity index 64% rename from tests/handlers/api/test_iou.py rename to tests/handlers/api/hypervisor/test_iou.py index 60c39d88..695dc223 100644 --- a/tests/handlers/api/test_iou.py +++ b/tests/handlers/api/hypervisor/test_iou.py @@ -46,8 +46,8 @@ def base_params(tmpdir, fake_iou_bin): @pytest.fixture -def vm(server, project, base_params): - response = server.post("/projects/{project_id}/iou/vms".format(project_id=project.id), base_params) +def vm(http_hypervisor, project, base_params): + response = http_hypervisor.post("/projects/{project_id}/iou/vms".format(project_id=project.id), base_params) assert response.status == 201 return response.json @@ -58,8 +58,8 @@ def startup_config_file(project, vm): return os.path.join(directory, "startup-config.cfg") -def test_iou_create(server, project, base_params): - response = server.post("/projects/{project_id}/iou/vms".format(project_id=project.id), base_params) +def test_iou_create(http_hypervisor, project, base_params): + response = http_hypervisor.post("/projects/{project_id}/iou/vms".format(project_id=project.id), base_params) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms" assert response.json["name"] == "PC TEST 1" @@ -71,7 +71,7 @@ def test_iou_create(server, project, base_params): assert response.json["l1_keepalives"] is False -def test_iou_create_with_params(server, project, base_params): +def test_iou_create_with_params(http_hypervisor, project, base_params): params = base_params params["ram"] = 1024 params["nvram"] = 512 @@ -82,7 +82,7 @@ def test_iou_create_with_params(server, project, base_params): params["use_default_iou_values"] = True params["iourc_content"] = "test" - response = server.post("/projects/{project_id}/iou/vms".format(project_id=project.id), params, example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms".format(project_id=project.id), params, example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms" assert response.json["name"] == "PC TEST 1" @@ -101,7 +101,7 @@ def test_iou_create_with_params(server, project, base_params): assert "iourc" in response.json["iourc_path"] -def test_iou_create_startup_config_already_exist(server, project, base_params): +def test_iou_create_startup_config_already_exist(http_hypervisor, project, base_params): """We don't erase a startup-config if already exist at project creation""" vm_id = str(uuid.uuid4()) @@ -113,7 +113,7 @@ def test_iou_create_startup_config_already_exist(server, project, base_params): params["vm_id"] = vm_id params["startup_config_content"] = "hostname test" - response = server.post("/projects/{project_id}/iou/vms".format(project_id=project.id), params, example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms".format(project_id=project.id), params, example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms" @@ -122,8 +122,8 @@ def test_iou_create_startup_config_already_exist(server, project, base_params): assert f.read() == "echo hello" -def test_iou_get(server, project, vm): - response = server.get("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_iou_get(http_hypervisor, project, vm): + response = http_hypervisor.get("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}" assert response.json["name"] == "PC TEST 1" @@ -135,50 +135,50 @@ def test_iou_get(server, project, vm): assert response.json["l1_keepalives"] is False -def test_iou_start(server, vm): +def test_iou_start(http_hypervisor, vm): with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert mock.called assert response.status == 200 assert response.json["name"] == "PC TEST 1" -def test_iou_start_with_iourc(server, vm, tmpdir): +def test_iou_start_with_iourc(http_hypervisor, vm, tmpdir): body = {"iourc_content": "test"} with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=body, example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=body, example=True) assert mock.called assert response.status == 200 - response = server.get("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.get("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert response.status == 200 with open(response.json["iourc_path"]) as f: assert f.read() == "test" -def test_iou_stop(server, vm): +def test_iou_stop(http_hypervisor, vm): with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.stop", return_value=True) as mock: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_iou_reload(server, vm): +def test_iou_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.reload", return_value=True) as mock: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_iou_delete(server, vm): +def test_iou_delete(http_hypervisor, vm): with asyncio_patch("gns3server.modules.iou.IOU.delete_vm", return_value=True) as mock: - response = server.delete("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.delete("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_iou_update(server, vm, tmpdir, free_console_port, project): +def test_iou_update(http_hypervisor, vm, tmpdir, free_console_port, project): params = { "name": "test", "console": free_console_port, @@ -191,7 +191,7 @@ def test_iou_update(server, vm, tmpdir, free_console_port, project): "use_default_iou_values": True, "iourc_content": "test" } - response = server.put("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True) + response = http_hypervisor.put("/projects/{project_id}/iou/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True) assert response.status == 200 assert response.json["name"] == "test" assert response.json["console"] == free_console_port @@ -208,65 +208,65 @@ def test_iou_update(server, vm, tmpdir, free_console_port, project): assert "iourc" in response.json["iourc_path"] -def test_iou_nio_create_udp(server, vm): - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, - example=True) +def test_iou_nio_create_udp(http_hypervisor, vm): + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, + example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_udp" -def test_iou_nio_create_ethernet(server, vm, ethernet_device): - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", - "ethernet_device": ethernet_device, - }, - example=True) +def test_iou_nio_create_ethernet(http_hypervisor, vm, ethernet_device): + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", + "ethernet_device": ethernet_device, + }, + example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_generic_ethernet" assert response.json["ethernet_device"] == ethernet_device -def test_iou_nio_create_ethernet_different_port(server, vm, ethernet_device): - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/3/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", - "ethernet_device": ethernet_device, - }, - example=False) +def test_iou_nio_create_ethernet_different_port(http_hypervisor, vm, ethernet_device): + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/3/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", + "ethernet_device": ethernet_device, + }, + example=False) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_generic_ethernet" assert response.json["ethernet_device"] == ethernet_device -def test_iou_nio_create_tap(server, vm, ethernet_device): +def test_iou_nio_create_tap(http_hypervisor, vm, ethernet_device): with patch("gns3server.modules.base_manager.BaseManager.has_privileged_access", return_value=True): - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_tap", - "tap_device": ethernet_device}) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_tap", + "tap_device": ethernet_device}) assert response.status == 201 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_tap" -def test_iou_delete_nio(server, vm): - server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}) - response = server.delete("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_iou_delete_nio(http_hypervisor, vm): + http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}) + response = http_hypervisor.delete("/projects/{project_id}/iou/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert response.route == "/projects/{project_id}/iou/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" -def test_iou_start_capture(server, vm, tmpdir, project): +def test_iou_start_capture(http_hypervisor, vm, tmpdir, project): with patch("gns3server.modules.iou.iou_vm.IOUVM.is_running", return_value=True) as mock: with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.start_capture") as start_capture: params = {"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"} - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params, example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params, example=True) assert response.status == 200 @@ -274,71 +274,71 @@ def test_iou_start_capture(server, vm, tmpdir, project): assert "test.pcap" in response.json["pcap_file_path"] -def test_iou_start_capture_not_started(server, vm, tmpdir): +def test_iou_start_capture_not_started(http_hypervisor, vm, tmpdir): with patch("gns3server.modules.iou.iou_vm.IOUVM.is_running", return_value=False) as mock: with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.start_capture") as start_capture: params = {"capture_file_name": "test.pcap", "data_link_type": "DLT_EN10MB"} - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/start_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), body=params) assert not start_capture.called assert response.status == 409 -def test_iou_stop_capture(server, vm, tmpdir, project): +def test_iou_stop_capture(http_hypervisor, vm, tmpdir, project): with patch("gns3server.modules.iou.iou_vm.IOUVM.is_running", return_value=True) as mock: with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.stop_capture") as stop_capture: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert stop_capture.called -def test_iou_stop_capture_not_started(server, vm, tmpdir): +def test_iou_stop_capture_not_started(http_hypervisor, vm, tmpdir): with patch("gns3server.modules.iou.iou_vm.IOUVM.is_running", return_value=False) as mock: with asyncio_patch("gns3server.modules.iou.iou_vm.IOUVM.stop_capture") as stop_capture: - response = server.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) + response = http_hypervisor.post("/projects/{project_id}/iou/vms/{vm_id}/adapters/0/ports/0/stop_capture".format(project_id=vm["project_id"], vm_id=vm["vm_id"])) assert not stop_capture.called assert response.status == 409 -def test_get_configs_without_configs_file(server, vm): +def test_get_configs_without_configs_file(http_hypervisor, vm): - response = server.get("/projects/{project_id}/iou/vms/{vm_id}/configs".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.get("/projects/{project_id}/iou/vms/{vm_id}/configs".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert "startup_config" not in response.json assert "private_config" not in response.json -def test_get_configs_with_startup_config_file(server, project, vm): +def test_get_configs_with_startup_config_file(http_hypervisor, project, vm): path = startup_config_file(project, vm) with open(path, "w+") as f: f.write("TEST") - response = server.get("/projects/{project_id}/iou/vms/{vm_id}/configs".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.get("/projects/{project_id}/iou/vms/{vm_id}/configs".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert response.json["startup_config_content"] == "TEST" -def test_vms(server, tmpdir, fake_iou_bin): +def test_vms(http_hypervisor, tmpdir, fake_iou_bin): with patch("gns3server.modules.IOU.get_images_directory", return_value=str(tmpdir)): - response = server.get("/iou/vms", example=True) + response = http_hypervisor.get("/iou/vms", example=True) assert response.status == 200 assert response.json == [{"filename": "iou.bin", "path": "iou.bin"}] -def test_upload_vm(server, tmpdir): +def test_upload_vm(http_hypervisor, tmpdir): with patch("gns3server.modules.IOU.get_images_directory", return_value=str(tmpdir),): - response = server.post("/iou/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/iou/vms/test2", body="TEST", raw=True) assert response.status == 204 with open(str(tmpdir / "test2")) as f: @@ -349,11 +349,11 @@ def test_upload_vm(server, tmpdir): assert checksum == "033bd94b1168d7e4f0d644c3c95e35bf" -def test_upload_vm_permission_denied(server, tmpdir): +def test_upload_vm_permission_denied(http_hypervisor, tmpdir): with open(str(tmpdir / "test2"), "w+") as f: f.write("") os.chmod(str(tmpdir / "test2"), 0) with patch("gns3server.modules.IOU.get_images_directory", return_value=str(tmpdir),): - response = server.post("/iou/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/iou/vms/test2", body="TEST", raw=True) assert response.status == 409 diff --git a/tests/handlers/api/test_network.py b/tests/handlers/api/hypervisor/test_network.py similarity index 80% rename from tests/handlers/api/test_network.py rename to tests/handlers/api/hypervisor/test_network.py index dec3a436..7314239d 100644 --- a/tests/handlers/api/test_network.py +++ b/tests/handlers/api/hypervisor/test_network.py @@ -19,15 +19,15 @@ import os import pytest -def test_udp_allocation(server, project): - response = server.post('/projects/{}/ports/udp'.format(project.id), {}, example=True) +def test_udp_allocation(http_hypervisor, project): + response = http_hypervisor.post('/projects/{}/ports/udp'.format(project.id), {}, example=True) assert response.status == 201 assert response.json == {'udp_port': 10000} # Netfifaces is not available on Travis @pytest.mark.skipif(os.environ.get("TRAVIS", False) is not False, reason="Not supported on Travis") -def test_interfaces(server): - response = server.get('/interfaces', example=True) +def test_interfaces(http_hypervisor): + response = http_hypervisor.get('/interfaces', example=True) assert response.status == 200 assert isinstance(response.json, list) diff --git a/tests/handlers/api/test_project.py b/tests/handlers/api/hypervisor/test_project.py similarity index 60% rename from tests/handlers/api/test_project.py rename to tests/handlers/api/hypervisor/test_project.py index 5af3d03c..b84a7e1f 100644 --- a/tests/handlers/api/test_project.py +++ b/tests/handlers/api/hypervisor/test_project.py @@ -27,49 +27,49 @@ import aiohttp from unittest.mock import patch from tests.utils import asyncio_patch -from gns3server.handlers.api.project_handler import ProjectHandler +from gns3server.handlers.api.hypervisor.project_handler import ProjectHandler from gns3server.modules.project_manager import ProjectManager -def test_create_project_with_path(server, tmpdir): +def test_create_project_with_path(http_hypervisor, tmpdir): with patch("gns3server.modules.project.Project.is_local", return_value=True): - response = server.post("/projects", {"name": "test", "path": str(tmpdir)}) + response = http_hypervisor.post("/projects", {"name": "test", "path": str(tmpdir)}) assert response.status == 201 assert response.json["path"] == str(tmpdir) assert response.json["name"] == "test" -def test_create_project_without_dir(server): +def test_create_project_without_dir(http_hypervisor): query = {"name": "test"} - response = server.post("/projects", query, example=True) + response = http_hypervisor.post("/projects", query, example=True) assert response.status == 201 assert response.json["project_id"] is not None assert response.json["temporary"] is False assert response.json["name"] == "test" -def test_create_temporary_project(server): +def test_create_temporary_project(http_hypervisor): query = {"name": "test", "temporary": True} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 assert response.json["project_id"] is not None assert response.json["temporary"] is True assert response.json["name"] == "test" -def test_create_project_with_uuid(server): +def test_create_project_with_uuid(http_hypervisor): query = {"name": "test", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f"} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 assert response.json["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e0f" assert response.json["name"] == "test" -def test_show_project(server): +def test_show_project(http_hypervisor): query = {"name": "test", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e02", "temporary": False} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 - response = server.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e02", example=True) + response = http_hypervisor.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e02", example=True) assert len(response.json.keys()) == 5 assert len(response.json["location"]) > 0 assert response.json["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e02" @@ -77,49 +77,49 @@ def test_show_project(server): assert response.json["name"] == "test" -def test_show_project_invalid_uuid(server): - response = server.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e42") +def test_show_project_invalid_uuid(http_hypervisor): + response = http_hypervisor.get("/projects/00010203-0405-0607-0809-0a0b0c0d0e42") assert response.status == 404 -def test_list_projects(server): +def test_list_projects(http_hypervisor): ProjectManager.instance()._projects = {} query = {"name": "test", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0f"} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 query = {"name": "test", "project_id": "00010203-0405-0607-0809-0a0b0c0d0e0b"} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 - response = server.get("/projects", example=True) + response = http_hypervisor.get("/projects", example=True) assert response.status == 200 print(response.json) assert len(response.json) == 2 assert response.json[0]["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e0b" or response.json[1]["project_id"] == "00010203-0405-0607-0809-0a0b0c0d0e0b" -def test_update_temporary_project(server): +def test_update_temporary_project(http_hypervisor): query = {"name": "test", "temporary": True} - response = server.post("/projects", query) + response = http_hypervisor.post("/projects", query) assert response.status == 201 query = {"name": "test", "temporary": False} - response = server.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) + response = http_hypervisor.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) assert response.status == 200 assert response.json["temporary"] is False -def test_update_path_project_temporary(server, tmpdir): +def test_update_path_project_temporary(http_hypervisor, tmpdir): os.makedirs(str(tmpdir / "a")) os.makedirs(str(tmpdir / "b")) with patch("gns3server.modules.project.Project.is_local", return_value=True): - response = server.post("/projects", {"name": "first_name", "path": str(tmpdir / "a"), "temporary": True}) + response = http_hypervisor.post("/projects", {"name": "first_name", "path": str(tmpdir / "a"), "temporary": True}) assert response.status == 201 assert response.json["name"] == "first_name" query = {"name": "second_name", "path": str(tmpdir / "b")} - response = server.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) + response = http_hypervisor.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) assert response.status == 200 assert response.json["path"] == str(tmpdir / "b") assert response.json["name"] == "second_name" @@ -128,17 +128,17 @@ def test_update_path_project_temporary(server, tmpdir): assert os.path.exists(str(tmpdir / "b")) -def test_update_path_project_non_temporary(server, tmpdir): +def test_update_path_project_non_temporary(http_hypervisor, tmpdir): os.makedirs(str(tmpdir / "a")) os.makedirs(str(tmpdir / "b")) with patch("gns3server.modules.project.Project.is_local", return_value=True): - response = server.post("/projects", {"name": "first_name", "path": str(tmpdir / "a")}) + response = http_hypervisor.post("/projects", {"name": "first_name", "path": str(tmpdir / "a")}) assert response.status == 201 assert response.json["name"] == "first_name" query = {"name": "second_name", "path": str(tmpdir / "b")} - response = server.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) + response = http_hypervisor.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) assert response.status == 200 assert response.json["path"] == str(tmpdir / "b") assert response.json["name"] == "second_name" @@ -147,66 +147,66 @@ def test_update_path_project_non_temporary(server, tmpdir): assert os.path.exists(str(tmpdir / "b")) -def test_update_path_project_non_local(server, tmpdir): +def test_update_path_project_non_local(http_hypervisor, tmpdir): with patch("gns3server.modules.project.Project.is_local", return_value=False): - response = server.post("/projects", {"name": "first_name"}) + response = http_hypervisor.post("/projects", {"name": "first_name"}) assert response.status == 201 query = {"name": "second_name", "path": str(tmpdir)} - response = server.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) + response = http_hypervisor.put("/projects/{project_id}".format(project_id=response.json["project_id"]), query, example=True) assert response.status == 403 -def test_commit_project(server, project): +def test_commit_project(http_hypervisor, project): with asyncio_patch("gns3server.modules.project.Project.commit", return_value=True) as mock: - response = server.post("/projects/{project_id}/commit".format(project_id=project.id), example=True) + response = http_hypervisor.post("/projects/{project_id}/commit".format(project_id=project.id), example=True) assert response.status == 204 assert mock.called -def test_commit_project_invalid_uuid(server): - response = server.post("/projects/{project_id}/commit".format(project_id=uuid.uuid4())) +def test_commit_project_invalid_uuid(http_hypervisor): + response = http_hypervisor.post("/projects/{project_id}/commit".format(project_id=uuid.uuid4())) assert response.status == 404 -def test_delete_project(server, project): +def test_delete_project(http_hypervisor, project): with asyncio_patch("gns3server.modules.project.Project.delete", return_value=True) as mock: - response = server.delete("/projects/{project_id}".format(project_id=project.id), example=True) + response = http_hypervisor.delete("/projects/{project_id}".format(project_id=project.id), example=True) assert response.status == 204 assert mock.called -def test_delete_project_invalid_uuid(server): - response = server.delete("/projects/{project_id}".format(project_id=uuid.uuid4())) +def test_delete_project_invalid_uuid(http_hypervisor): + response = http_hypervisor.delete("/projects/{project_id}".format(project_id=uuid.uuid4())) assert response.status == 404 -def test_close_project(server, project): +def test_close_project(http_hypervisor, project): with asyncio_patch("gns3server.modules.project.Project.close", return_value=True) as mock: - response = server.post("/projects/{project_id}/close".format(project_id=project.id), example=True) + response = http_hypervisor.post("/projects/{project_id}/close".format(project_id=project.id), example=True) assert response.status == 204 assert mock.called -def test_close_project_two_client_connected(server, project): +def test_close_project_two_client_connected(http_hypervisor, project): ProjectHandler._notifications_listening = {project.id: 2} with asyncio_patch("gns3server.modules.project.Project.close", return_value=True) as mock: - response = server.post("/projects/{project_id}/close".format(project_id=project.id), example=True) + response = http_hypervisor.post("/projects/{project_id}/close".format(project_id=project.id), example=True) assert response.status == 204 assert not mock.called -def test_close_project_invalid_uuid(server): - response = server.post("/projects/{project_id}/close".format(project_id=uuid.uuid4())) +def test_close_project_invalid_uuid(http_hypervisor): + response = http_hypervisor.post("/projects/{project_id}/close".format(project_id=uuid.uuid4())) assert response.status == 404 -def test_notification(server, project, loop): +def test_notification(http_hypervisor, project, loop): @asyncio.coroutine def go(future): - response = yield from aiohttp.request("GET", server.get_url("/projects/{project_id}/notifications".format(project_id=project.id), 1)) + response = yield from aiohttp.request("GET", http_hypervisor.get_url("/projects/{project_id}/notifications".format(project_id=project.id))) response.body = yield from response.content.read(200) project.emit("vm.created", {"a": "b"}) response.body += yield from response.content.read(50) @@ -222,12 +222,12 @@ def test_notification(server, project, loop): assert b'{"action": "vm.created", "event": {"a": "b"}}\n' in response.body -def test_notification_invalid_id(server): - response = server.get("/projects/{project_id}/notifications".format(project_id=uuid.uuid4())) +def test_notification_invalid_id(http_hypervisor): + response = http_hypervisor.get("/projects/{project_id}/notifications".format(project_id=uuid.uuid4())) assert response.status == 404 -def test_list_files(server, project): +def test_list_files(http_hypervisor, project): files = [ { "path": "test.txt", @@ -239,12 +239,12 @@ def test_list_files(server, project): } ] with asyncio_patch("gns3server.modules.project.Project.list_files", return_value=files) as mock: - response = server.get("/projects/{project_id}/files".format(project_id=project.id), example=True) + response = http_hypervisor.get("/projects/{project_id}/files".format(project_id=project.id), example=True) assert response.status == 200 assert response.json == files -def test_get_file(server, tmpdir): +def test_get_file(http_hypervisor, tmpdir): with patch("gns3server.config.Config.get_section_config", return_value={"project_directory": str(tmpdir)}): project = ProjectManager.instance().create_project() @@ -252,12 +252,12 @@ def test_get_file(server, tmpdir): with open(os.path.join(project.path, "hello"), "w+") as f: f.write("world") - response = server.get("/projects/{project_id}/files/hello".format(project_id=project.id), raw=True) + response = http_hypervisor.get("/projects/{project_id}/files/hello".format(project_id=project.id), raw=True) assert response.status == 200 assert response.body == b"world" - response = server.get("/projects/{project_id}/files/false".format(project_id=project.id), raw=True) + response = http_hypervisor.get("/projects/{project_id}/files/false".format(project_id=project.id), raw=True) assert response.status == 404 - response = server.get("/projects/{project_id}/files/../hello".format(project_id=project.id), raw=True) + response = http_hypervisor.get("/projects/{project_id}/files/../hello".format(project_id=project.id), raw=True) assert response.status == 403 diff --git a/tests/handlers/api/test_qemu.py b/tests/handlers/api/hypervisor/test_qemu.py similarity index 63% rename from tests/handlers/api/test_qemu.py rename to tests/handlers/api/hypervisor/test_qemu.py index 07073e60..38b1c518 100644 --- a/tests/handlers/api/test_qemu.py +++ b/tests/handlers/api/hypervisor/test_qemu.py @@ -23,6 +23,7 @@ from tests.utils import asyncio_patch from unittest.mock import patch from gns3server.config import Config + @pytest.fixture def fake_qemu_bin(): @@ -56,14 +57,14 @@ def base_params(tmpdir, fake_qemu_bin): @pytest.fixture -def vm(server, project, base_params): - response = server.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) +def vm(http_hypervisor, project, base_params): + response = http_hypervisor.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) assert response.status == 201 return response.json -def test_qemu_create(server, project, base_params, fake_qemu_bin): - response = server.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) +def test_qemu_create(http_hypervisor, project, base_params, fake_qemu_bin): + response = http_hypervisor.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) assert response.status == 201 assert response.route == "/projects/{project_id}/qemu/vms" assert response.json["name"] == "PC TEST 1" @@ -72,11 +73,11 @@ def test_qemu_create(server, project, base_params, fake_qemu_bin): assert response.json["platform"] == "x86_64" -def test_qemu_create_platform(server, project, base_params, fake_qemu_bin): +def test_qemu_create_platform(http_hypervisor, project, base_params, fake_qemu_bin): base_params["qemu_path"] = None base_params["platform"] = "x86_64" - response = server.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), base_params) assert response.status == 201 assert response.route == "/projects/{project_id}/qemu/vms" assert response.json["name"] == "PC TEST 1" @@ -85,12 +86,12 @@ def test_qemu_create_platform(server, project, base_params, fake_qemu_bin): assert response.json["platform"] == "x86_64" -def test_qemu_create_with_params(server, project, base_params, fake_qemu_vm): +def test_qemu_create_with_params(http_hypervisor, project, base_params, fake_qemu_vm): params = base_params params["ram"] = 1024 params["hda_disk_image"] = "linux载.img" - response = server.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), params, example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms".format(project_id=project.id), params, example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/qemu/vms" @@ -101,8 +102,8 @@ def test_qemu_create_with_params(server, project, base_params, fake_qemu_vm): assert response.json["hda_disk_image_md5sum"] == "c4ca4238a0b923820dcc509a6f75849b" -def test_qemu_get(server, project, vm): - response = server.get("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_qemu_get(http_hypervisor, project, vm): + response = http_hypervisor.get("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert response.route == "/projects/{project_id}/qemu/vms/{vm_id}" assert response.json["name"] == "PC TEST 1" @@ -110,57 +111,57 @@ def test_qemu_get(server, project, vm): assert response.json["vm_directory"] == os.path.join(project.path, "project-files", "qemu", vm["vm_id"]) -def test_qemu_start(server, vm): +def test_qemu_start(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 200 assert response.json["name"] == "PC TEST 1" -def test_qemu_stop(server, vm): +def test_qemu_stop(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.stop", return_value=True) as mock: - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_qemu_reload(server, vm): +def test_qemu_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.reload", return_value=True) as mock: - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_qemu_suspend(server, vm): +def test_qemu_suspend(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.suspend", return_value=True) as mock: - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_qemu_resume(server, vm): +def test_qemu_resume(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.qemu_vm.QemuVM.resume", return_value=True) as mock: - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_qemu_delete(server, vm): +def test_qemu_delete(http_hypervisor, vm): with asyncio_patch("gns3server.modules.qemu.Qemu.delete_vm", return_value=True) as mock: - response = server.delete("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.delete("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_qemu_update(server, vm, tmpdir, free_console_port, project, fake_qemu_vm): +def test_qemu_update(http_hypervisor, vm, tmpdir, free_console_port, project, fake_qemu_vm): params = { "name": "test", "console": free_console_port, "ram": 1024, "hdb_disk_image": "linux.img" } - response = server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True) + response = http_hypervisor.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), params, example=True) assert response.status == 200 assert response.json["name"] == "test" assert response.json["console"] == free_console_port @@ -168,71 +169,71 @@ def test_qemu_update(server, vm, tmpdir, free_console_port, project, fake_qemu_v assert response.json["ram"] == 1024 -def test_qemu_nio_create_udp(server, vm): - server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, - example=True) +def test_qemu_nio_create_udp(http_hypervisor, vm): + http_hypervisor.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, + example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_udp" -def test_qemu_nio_create_ethernet(server, vm): - server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) - response = server.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", - "ethernet_device": "eth0", - }, - example=True) +def test_qemu_nio_create_ethernet(http_hypervisor, vm): + http_hypervisor.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) + response = http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_generic_ethernet", + "ethernet_device": "eth0", + }, + example=True) assert response.status == 409 -def test_qemu_delete_nio(server, vm): - server.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) - server.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}) - response = server.delete("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_qemu_delete_nio(http_hypervisor, vm): + http_hypervisor.put("/projects/{project_id}/qemu/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"adapters": 2}) + http_hypervisor.post("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}) + response = http_hypervisor.delete("/projects/{project_id}/qemu/vms/{vm_id}/adapters/1/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert response.route == "/projects/{project_id}/qemu/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" -def test_qemu_list_binaries(server, vm): +def test_qemu_list_binaries(http_hypervisor, vm): ret = [{"path": "/tmp/1", "version": "2.2.0"}, {"path": "/tmp/2", "version": "2.1.0"}] with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock: - response = server.get("/qemu/binaries".format(project_id=vm["project_id"]), example=True) + response = http_hypervisor.get("/qemu/binaries".format(project_id=vm["project_id"]), example=True) assert mock.called_with(None) assert response.status == 200 assert response.json == ret -def test_qemu_list_binaries_filter(server, vm): +def test_qemu_list_binaries_filter(http_hypervisor, vm): ret = [ {"path": "/tmp/x86_64", "version": "2.2.0"}, {"path": "/tmp/alpha", "version": "2.1.0"}, {"path": "/tmp/i386", "version": "2.1.0"} ] with asyncio_patch("gns3server.modules.qemu.Qemu.binary_list", return_value=ret) as mock: - response = server.get("/qemu/binaries".format(project_id=vm["project_id"]), body={"archs": ["i386"]}, example=True) + response = http_hypervisor.get("/qemu/binaries".format(project_id=vm["project_id"]), body={"archs": ["i386"]}, example=True) assert response.status == 200 assert mock.called_with(["i386"]) assert response.json == ret -def test_vms(server, tmpdir, fake_qemu_vm): +def test_vms(http_hypervisor, tmpdir, fake_qemu_vm): - response = server.get("/qemu/vms") + response = http_hypervisor.get("/qemu/vms") assert response.status == 200 assert response.json == [{"filename": "linux载.img", "path": "linux载.img"}] -def test_upload_vm(server, tmpdir): +def test_upload_vm(http_hypervisor, tmpdir): with patch("gns3server.modules.Qemu.get_images_directory", return_value=str(tmpdir),): - response = server.post("/qemu/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/qemu/vms/test2", body="TEST", raw=True) assert response.status == 204 with open(str(tmpdir / "test2")) as f: @@ -243,9 +244,9 @@ def test_upload_vm(server, tmpdir): assert checksum == "033bd94b1168d7e4f0d644c3c95e35bf" -def test_upload_vm_ova(server, tmpdir): +def test_upload_vm_ova(http_hypervisor, tmpdir): with patch("gns3server.modules.Qemu.get_images_directory", return_value=str(tmpdir),): - response = server.post("/qemu/vms/test2.ova/test2.vmdk", body="TEST", raw=True) + response = http_hypervisor.post("/qemu/vms/test2.ova/test2.vmdk", body="TEST", raw=True) assert response.status == 204 with open(str(tmpdir / "test2.ova" / "test2.vmdk")) as f: @@ -256,23 +257,23 @@ def test_upload_vm_ova(server, tmpdir): assert checksum == "033bd94b1168d7e4f0d644c3c95e35bf" -def test_upload_vm_forbiden_location(server, tmpdir): +def test_upload_vm_forbiden_location(http_hypervisor, tmpdir): with patch("gns3server.modules.Qemu.get_images_directory", return_value=str(tmpdir),): - response = server.post("/qemu/vms/../../test2", body="TEST", raw=True) + response = http_hypervisor.post("/qemu/vms/../../test2", body="TEST", raw=True) assert response.status == 403 -def test_upload_vm_permission_denied(server, tmpdir): +def test_upload_vm_permission_denied(http_hypervisor, tmpdir): with open(str(tmpdir / "test2"), "w+") as f: f.write("") os.chmod(str(tmpdir / "test2"), 0) with patch("gns3server.modules.Qemu.get_images_directory", return_value=str(tmpdir),): - response = server.post("/qemu/vms/test2", body="TEST", raw=True) + response = http_hypervisor.post("/qemu/vms/test2", body="TEST", raw=True) assert response.status == 409 -def test_create_img_relative(server): +def test_create_img_relative(http_hypervisor): body = { "qemu_img": "/tmp/qemu-img", "path": "hda.qcow2", @@ -284,12 +285,12 @@ def test_create_img_relative(server): "size": 100 } with asyncio_patch("gns3server.modules.Qemu.create_disk"): - response = server.post("/qemu/img", body=body, example=True) + response = http_hypervisor.post("/qemu/img", body=body, example=True) assert response.status == 201 -def test_create_img_absolute_non_local(server): +def test_create_img_absolute_non_local(http_hypervisor): config = Config.instance() config.set("Server", "local", "false") @@ -305,12 +306,12 @@ def test_create_img_absolute_non_local(server): "size": 100 } with asyncio_patch("gns3server.modules.Qemu.create_disk"): - response = server.post("/qemu/img", body=body, example=True) + response = http_hypervisor.post("/qemu/img", body=body, example=True) assert response.status == 403 -def test_create_img_absolute_local(server): +def test_create_img_absolute_local(http_hypervisor): config = Config.instance() config.set("Server", "local", "true") @@ -326,12 +327,12 @@ def test_create_img_absolute_local(server): "size": 100 } with asyncio_patch("gns3server.modules.Qemu.create_disk"): - response = server.post("/qemu/img", body=body, example=True) + response = http_hypervisor.post("/qemu/img", body=body, example=True) assert response.status == 201 -def test_capabilities(server): +def test_capabilities(http_hypervisor): with asyncio_patch("gns3server.modules.Qemu.get_kvm_archs", return_value=["x86_64"]): - response = server.get("/qemu/capabilities", example=True) + response = http_hypervisor.get("/qemu/capabilities", example=True) assert response.json["kvm"] == ["x86_64"] diff --git a/tests/handlers/api/test_virtualbox.py b/tests/handlers/api/hypervisor/test_virtualbox.py similarity index 60% rename from tests/handlers/api/test_virtualbox.py rename to tests/handlers/api/hypervisor/test_virtualbox.py index c6214066..ed58c829 100644 --- a/tests/handlers/api/test_virtualbox.py +++ b/tests/handlers/api/hypervisor/test_virtualbox.py @@ -21,14 +21,14 @@ from unittest.mock import patch @pytest.yield_fixture(scope="function") -def vm(server, project, monkeypatch): +def vm(http_hypervisor, project, monkeypatch): vboxmanage_path = "/fake/VboxManage" with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.create", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms".format(project_id=project.id), {"name": "VMTEST", - "vmname": "VMTEST", - "linked_clone": False}) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms".format(project_id=project.id), {"name": "VMTEST", + "vmname": "VMTEST", + "linked_clone": False}) assert mock.called assert response.status == 201 @@ -36,71 +36,71 @@ def vm(server, project, monkeypatch): yield response.json -def test_vbox_create(server, project): +def test_vbox_create(http_hypervisor, project): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.create", return_value=True): - response = server.post("/projects/{project_id}/virtualbox/vms".format(project_id=project.id), {"name": "VM1", - "vmname": "VM1", - "linked_clone": False}, - example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms".format(project_id=project.id), {"name": "VM1", + "vmname": "VM1", + "linked_clone": False}, + example=True) assert response.status == 201 assert response.json["name"] == "VM1" assert response.json["project_id"] == project.id -def test_vbox_get(server, project, vm): - response = server.get("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_vbox_get(http_hypervisor, project, vm): + response = http_hypervisor.get("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert response.route == "/projects/{project_id}/virtualbox/vms/{vm_id}" assert response.json["name"] == "VMTEST" assert response.json["project_id"] == project.id -def test_vbox_start(server, vm): +def test_vbox_start(http_hypervisor, vm): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.check_hw_virtualization", return_value=True) as mock: with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vbox_stop(server, vm): +def test_vbox_stop(http_hypervisor, vm): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.stop", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vbox_suspend(server, vm): +def test_vbox_suspend(http_hypervisor, vm): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.suspend", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/suspend".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vbox_resume(server, vm): +def test_vbox_resume(http_hypervisor, vm): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.resume", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/resume".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vbox_reload(server, vm): +def test_vbox_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.reload", return_value=True) as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vbox_nio_create_udp(server, vm): +def test_vbox_nio_create_udp(http_hypervisor, vm): with asyncio_patch('gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.adapter_add_nio_binding') as mock: - response = server.post("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], - vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, - example=True) + response = http_hypervisor.post("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], + vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, + example=True) assert mock.called args, kwgars = mock.call_args @@ -111,10 +111,10 @@ def test_vbox_nio_create_udp(server, vm): assert response.json["type"] == "nio_udp" -def test_vbox_delete_nio(server, vm): +def test_vbox_delete_nio(http_hypervisor, vm): with asyncio_patch('gns3server.modules.virtualbox.virtualbox_vm.VirtualBoxVM.adapter_remove_nio_binding') as mock: - response = server.delete("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.delete("/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called args, kwgars = mock.call_args @@ -124,10 +124,10 @@ def test_vbox_delete_nio(server, vm): assert response.route == "/projects/{project_id}/virtualbox/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" -def test_vbox_update(server, vm, free_console_port): - response = server.put("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", - "console": free_console_port}, - example=True) +def test_vbox_update(http_hypervisor, vm, free_console_port): + response = http_hypervisor.put("/projects/{project_id}/virtualbox/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", + "console": free_console_port}, + example=True) assert response.status == 200 assert response.json["name"] == "test" assert response.json["console"] == free_console_port diff --git a/tests/handlers/api/test_vpcs.py b/tests/handlers/api/hypervisor/test_vpcs.py similarity index 57% rename from tests/handlers/api/test_vpcs.py rename to tests/handlers/api/hypervisor/test_vpcs.py index 2e5cb928..106a3a8d 100644 --- a/tests/handlers/api/test_vpcs.py +++ b/tests/handlers/api/hypervisor/test_vpcs.py @@ -23,22 +23,22 @@ from unittest.mock import patch @pytest.fixture(scope="function") -def vm(server, project): - response = server.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1"}) +def vm(http_hypervisor, project): + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1"}) assert response.status == 201 return response.json -def test_vpcs_create(server, project): - response = server.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1"}, example=True) +def test_vpcs_create(http_hypervisor, project): + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1"}, example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/vpcs/vms" assert response.json["name"] == "PC TEST 1" assert response.json["project_id"] == project.id -def test_vpcs_get(server, project, vm): - response = server.get("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_vpcs_get(http_hypervisor, project, vm): + response = http_hypervisor.get("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 200 assert response.route == "/projects/{project_id}/vpcs/vms/{vm_id}" assert response.json["name"] == "PC TEST 1" @@ -47,8 +47,8 @@ def test_vpcs_get(server, project, vm): assert response.json["status"] == "stopped" -def test_vpcs_create_startup_script(server, project): - response = server.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1", "startup_script": "ip 192.168.1.2\necho TEST"}) +def test_vpcs_create_startup_script(http_hypervisor, project): + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1", "startup_script": "ip 192.168.1.2\necho TEST"}) assert response.status == 201 assert response.route == "/projects/{project_id}/vpcs/vms" assert response.json["name"] == "PC TEST 1" @@ -57,8 +57,8 @@ def test_vpcs_create_startup_script(server, project): assert response.json["startup_script_path"] == "startup.vpc" -def test_vpcs_create_port(server, project, free_console_port): - response = server.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1", "console": free_console_port}) +def test_vpcs_create_port(http_hypervisor, project, free_console_port): + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1", "console": free_console_port}) assert response.status == 201 assert response.route == "/projects/{project_id}/vpcs/vms" assert response.json["name"] == "PC TEST 1" @@ -66,72 +66,72 @@ def test_vpcs_create_port(server, project, free_console_port): assert response.json["console"] == free_console_port -def test_vpcs_nio_create_udp(server, vm): - response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}, - example=True) +def test_vpcs_nio_create_udp(http_hypervisor, vm): + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}, + example=True) assert response.status == 201 assert response.route == "/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_udp" @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") -def test_vpcs_nio_create_tap(server, vm, ethernet_device): +def test_vpcs_nio_create_tap(http_hypervisor, vm, ethernet_device): with patch("gns3server.modules.base_manager.BaseManager.has_privileged_access", return_value=True): - response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_tap", - "tap_device": ethernet_device}) + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_tap", + "tap_device": ethernet_device}) assert response.status == 201 assert response.route == "/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" assert response.json["type"] == "nio_tap" -def test_vpcs_delete_nio(server, vm): - server.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", - "lport": 4242, - "rport": 4343, - "rhost": "127.0.0.1"}) - response = server.delete("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) +def test_vpcs_delete_nio(http_hypervisor, vm): + http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"type": "nio_udp", + "lport": 4242, + "rport": 4343, + "rhost": "127.0.0.1"}) + response = http_hypervisor.delete("/projects/{project_id}/vpcs/vms/{vm_id}/adapters/0/ports/0/nio".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert response.status == 204 assert response.route == "/projects/{project_id}/vpcs/vms/{vm_id}/adapters/{adapter_number:\d+}/ports/{port_number:\d+}/nio" -def test_vpcs_start(server, vm): +def test_vpcs_start(http_hypervisor, vm): with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.start", return_value=True) as mock: - response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/start".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 200 assert response.json["name"] == "PC TEST 1" -def test_vpcs_stop(server, vm): +def test_vpcs_stop(http_hypervisor, vm): with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.stop", return_value=True) as mock: - response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/stop".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vpcs_reload(server, vm): +def test_vpcs_reload(http_hypervisor, vm): with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.reload", return_value=True) as mock: - response = server.post("/projects/{project_id}/vpcs/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.post("/projects/{project_id}/vpcs/vms/{vm_id}/reload".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vpcs_delete(server, vm): +def test_vpcs_delete(http_hypervisor, vm): with asyncio_patch("gns3server.modules.vpcs.VPCS.delete_vm", return_value=True) as mock: - response = server.delete("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) + response = http_hypervisor.delete("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), example=True) assert mock.called assert response.status == 204 -def test_vpcs_update(server, vm, tmpdir, free_console_port): - response = server.put("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", - "console": free_console_port, - "startup_script": "ip 192.168.1.1"}, - example=True) +def test_vpcs_update(http_hypervisor, vm, tmpdir, free_console_port): + response = http_hypervisor.put("/projects/{project_id}/vpcs/vms/{vm_id}".format(project_id=vm["project_id"], vm_id=vm["vm_id"]), {"name": "test", + "console": free_console_port, + "startup_script": "ip 192.168.1.1"}, + example=True) assert response.status == 200 assert response.json["name"] == "test" assert response.json["console"] == free_console_port diff --git a/tests/handlers/api/test_version.py b/tests/handlers/api/test_version.py index 29cdebae..745d1e65 100644 --- a/tests/handlers/api/test_version.py +++ b/tests/handlers/api/test_version.py @@ -25,37 +25,37 @@ from gns3server.config import Config from gns3server.version import __version__ -def test_version_output(server): +def test_version_output(http_api): config = Config.instance() config.set("Server", "local", "true") - response = server.get('/version', example=True) + response = http_api.get('/version', example=True) assert response.status == 200 assert response.json == {'local': True, 'version': __version__} -def test_version_input(server): +def test_version_input(http_api): query = {'version': __version__} - response = server.post('/version', query, example=True) + response = http_api.post('/version', query, example=True) assert response.status == 200 assert response.json == {'version': __version__} -def test_version_invalid_input(server): +def test_version_invalid_input(http_api): query = {'version': "0.4.2"} - response = server.post('/version', query) + response = http_api.post('/version', query) assert response.status == 409 assert response.json == {'message': 'Client version 0.4.2 differs with server version {}'.format(__version__), 'status': 409} -def test_version_invalid_input_schema(server): +def test_version_invalid_input_schema(http_api): query = {'version': "0.4.2", "bla": "blu"} - response = server.post('/version', query) + response = http_api.post('/version', query) assert response.status == 400 -def test_version_invalid_json(server): +def test_version_invalid_json(http_api): query = "BOUM" - response = server.post('/version', query, raw=True) + response = http_api.post('/version', query, raw=True) assert response.status == 400 diff --git a/tests/handlers/test_index.py b/tests/handlers/test_index.py index 9866823f..7e935511 100644 --- a/tests/handlers/test_index.py +++ b/tests/handlers/test_index.py @@ -23,14 +23,14 @@ from unittest.mock import patch from gns3server.version import __version__ -def test_index(server): - response = server.get('/', api_version=None) +def test_index(http_root): + response = http_root.get('/') assert response.status == 200 html = response.html assert "Website" in html assert __version__ in html -def test_status(server): - response = server.get('/status', api_version=None) +def test_status(http_root): + response = http_root.get('/status') assert response.status == 200 diff --git a/tests/handlers/test_upload.py b/tests/handlers/test_upload.py index 3ef16c78..14f967f5 100644 --- a/tests/handlers/test_upload.py +++ b/tests/handlers/test_upload.py @@ -34,7 +34,7 @@ def restore_working_dir(): os.chdir(directory) -def test_index_upload(server, tmpdir): +def test_index_upload(http_root, tmpdir): Config.instance().set("Server", "images_path", str(tmpdir)) @@ -42,7 +42,7 @@ def test_index_upload(server, tmpdir): open(str(tmpdir / "alpha.md5sum"), "w+").close() open(str(tmpdir / ".beta"), "w+").close() - response = server.get('/upload', api_version=None) + response = http_root.get('/upload') assert response.status == 200 html = response.html assert "GNS3 Server" in html @@ -52,7 +52,7 @@ def test_index_upload(server, tmpdir): assert "alpha.md5sum" not in html -def test_upload(server, tmpdir): +def test_upload(http_root, tmpdir): content = ''.join(['a' for _ in range(0, 1025)]) @@ -64,7 +64,7 @@ def test_upload(server, tmpdir): Config.instance().set("Server", "images_path", str(tmpdir)) - response = server.post('/upload', api_version=None, body=body, raw=True) + response = http_root.post('/upload', body=body, raw=True) assert "test2" in response.body.decode("utf-8") @@ -76,7 +76,7 @@ def test_upload(server, tmpdir): assert checksum == "ae187e1febee2a150b64849c32d566ca" -def test_upload_previous_checksum(server, tmpdir): +def test_upload_previous_checksum(http_root, tmpdir): content = ''.join(['a' for _ in range(0, 1025)]) @@ -93,7 +93,7 @@ def test_upload_previous_checksum(server, tmpdir): with open(str(tmpdir / "QEMU" / "test2.md5sum"), 'w+') as f: f.write("FAKE checksum") - response = server.post('/upload', api_version=None, body=body, raw=True) + response = http_root.post('/upload', body=body, raw=True) assert "test2" in response.body.decode("utf-8") @@ -105,7 +105,7 @@ def test_upload_previous_checksum(server, tmpdir): assert checksum == "ae187e1febee2a150b64849c32d566ca" -def test_upload_images_backup(server, tmpdir): +def test_upload_images_backup(http_root, tmpdir): Config.instance().set("Server", "images_path", str(tmpdir / 'images')) os.makedirs(str(tmpdir / 'images' / 'IOU')) # An old IOU image that we need to replace @@ -126,7 +126,7 @@ def test_upload_images_backup(server, tmpdir): body = aiohttp.FormData() body.add_field('type', 'IMAGES') body.add_field('file', open(str(tmpdir / 'test.tar'), 'rb'), content_type='application/x-gtar', filename='test.tar') - response = server.post('/upload', api_version=None, body=body, raw=True) + response = http_root.post('/upload', body=body, raw=True) assert response.status == 200 with open(str(tmpdir / 'images' / 'QEMU' / 'a.img')) as f: @@ -139,7 +139,7 @@ def test_upload_images_backup(server, tmpdir): assert not os.path.exists(str(tmpdir / 'images' / 'archive.tar')) -def test_upload_projects_backup(server, tmpdir): +def test_upload_projects_backup(http_root, tmpdir): Config.instance().set("Server", "projects_path", str(tmpdir / 'projects')) os.makedirs(str(tmpdir / 'projects' / 'b')) # An old b image that we need to replace @@ -160,7 +160,7 @@ def test_upload_projects_backup(server, tmpdir): body = aiohttp.FormData() body.add_field('type', 'PROJECTS') body.add_field('file', open(str(tmpdir / 'test.tar'), 'rb'), content_type='application/x-gtar', filename='test.tar') - response = server.post('/upload', api_version=None, body=body, raw=True) + response = http_root.post('/upload', body=body, raw=True) assert response.status == 200 with open(str(tmpdir / 'projects' / 'a' / 'a.img')) as f: @@ -173,7 +173,7 @@ def test_upload_projects_backup(server, tmpdir): assert not os.path.exists(str(tmpdir / 'projects' / 'archive.tar')) -def test_backup_images(server, tmpdir, loop): +def test_backup_images(http_root, tmpdir, loop): Config.instance().set('Server', 'images_path', str(tmpdir)) os.makedirs(str(tmpdir / 'QEMU')) @@ -182,7 +182,7 @@ def test_backup_images(server, tmpdir, loop): with open(str(tmpdir / 'QEMU' / 'b.img'), 'w+') as f: f.write('world') - response = server.get('/backup/images.tar', api_version=None, raw=True) + response = http_root.get('/backup/images.tar', raw=True) assert response.status == 200 assert response.headers['CONTENT-TYPE'] == 'application/x-gtar' @@ -204,7 +204,7 @@ def test_backup_images(server, tmpdir, loop): assert open(os.path.join('QEMU', 'b.img')).read() == 'world' -def test_backup_projects(server, tmpdir, loop): +def test_backup_projects(http_root, tmpdir, loop): Config.instance().set('Server', 'projects_path', str(tmpdir)) os.makedirs(str(tmpdir / 'a')) @@ -214,7 +214,7 @@ def test_backup_projects(server, tmpdir, loop): with open(str(tmpdir / 'b' / 'b.gns3'), 'w+') as f: f.write('world') - response = server.get('/backup/projects.tar', api_version=None, raw=True) + response = http_root.get('/backup/projects.tar', raw=True) assert response.status == 200 assert response.headers['CONTENT-TYPE'] == 'application/x-gtar' diff --git a/tests/web/test_documentation.py b/tests/web/test_documentation.py index 6a57dcfe..ac2a6d43 100644 --- a/tests/web/test_documentation.py +++ b/tests/web/test_documentation.py @@ -24,20 +24,19 @@ from gns3server.web.route import Route def test_documentation_write(tmpdir): os.makedirs(str(tmpdir / "api/examples")) - with open(str(tmpdir / "api/examples/post_projectsprojectidvirtualboxvms.txt"), "w+") as f: + with open(str(tmpdir / "api/examples/hypervisor_post_projectsprojectidvirtualboxvms.txt"), "w+") as f: f.write("curl test") Documentation(Route, str(tmpdir)).write() assert os.path.exists(str(tmpdir / "api")) - assert os.path.exists(str(tmpdir / "api" / "v1" / "server")) - assert os.path.exists(str(tmpdir / "api" / "v1" / "server" / "virtualbox.rst")) - assert os.path.exists(str(tmpdir / "api" / "v1" / "server" / "virtualbox")) - assert os.path.exists(str(tmpdir / "api" / "v1" / "server" / "virtualbox" / "virtualboxvms.rst")) - with open(str(tmpdir / "api" / "v1" / "server" / "virtualbox" / "projectsprojectidvirtualboxvms.rst")) as f: + assert os.path.exists(str(tmpdir / "api" / "v1" / "hypervisor")) + assert os.path.exists(str(tmpdir / "api" / "v1" / "hypervisor" / "virtualbox.rst")) + assert os.path.exists(str(tmpdir / "api" / "v1" / "hypervisor" / "virtualbox")) + assert os.path.exists(str(tmpdir / "api" / "v1" / "hypervisor" / "virtualbox" / "virtualboxvms.rst")) + with open(str(tmpdir / "api" / "v1" / "hypervisor" / "virtualbox" / "projectsprojectidvirtualboxvms.rst")) as f: content = f.read() assert "Sample session" in content - assert "literalinclude:: ../../../examples/post_projectsprojectidvirtualboxvms.txt" in content + assert "literalinclude:: ../../../examples/hypervisor_post_projectsprojectidvirtualboxvms.txt" in content assert os.path.exists(str(tmpdir / "api" / "v1" / "controller" / "server.rst")) -