diff --git a/docs/general.rst b/docs/general.rst index 97fef935..a27035a8 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -29,7 +29,7 @@ You can check the server version with a simple curl command: .. code-block:: shell-session - # curl "http://localhost:8000/v1/version" + # curl "http://localhost:3080/v1/version" { "version": "1.3.dev1" } @@ -39,7 +39,7 @@ The next step is to create a project. .. code-block:: shell-session - # curl -X POST "http://localhost:8000/v1/projects" -d '{"name": "test"}' + # curl -X POST "http://localhost:3080/v1/projects" -d '{"name": "test"}' { "project_id": "42f9feee-3217-4104-981e-85d5f0a806ec", "temporary": false, @@ -50,7 +50,7 @@ With this project id we can now create two VPCS VM. .. code-block:: shell-session - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 1"}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 1"}' { "console": 2000, "name": "VPCS 1", @@ -58,7 +58,7 @@ With this project id we can now create two VPCS VM. "vm_id": "24d2e16b-fbef-4259-ae34-7bc21a41ee28" }% - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 2"}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms" -d '{"name": "VPCS 2"}' { "console": 2001, "name": "VPCS 2", @@ -70,12 +70,12 @@ two UDP ports. .. code-block:: shell-session - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}' { "udp_port": 10000 } - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/ports/udp" -d '{}' { "udp_port": 10001 } @@ -86,7 +86,7 @@ communication is made by creating two UDP tunnels. .. code-block:: shell-session - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/adapters/0/ports/0/nio" -d '{"lport": 10000, "rhost": "127.0.0.1", "rport": 10001, "type": "nio_udp"}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/adapters/0/ports/0/nio" -d '{"lport": 10000, "rhost": "127.0.0.1", "rport": 10001, "type": "nio_udp"}' { "lport": 10000, "rhost": "127.0.0.1", @@ -94,7 +94,7 @@ communication is made by creating two UDP tunnels. "type": "nio_udp" } - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/adapters/0/ports/0/nio" -d '{"lport": 10001, "rhost": "127.0.0.1", "rport": 10000, "type": "nio_udp"}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/adapters/0/ports/0/nio" -d '{"lport": 10001, "rhost": "127.0.0.1", "rport": 10000, "type": "nio_udp"}' { "lport": 10001, "rhost": "127.0.0.1", @@ -106,8 +106,8 @@ Now we can start the two VM .. code-block:: shell-session - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/start" -d "{}" - # curl -X POST "http://localhost:8000/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/start" -d '{}' + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/24d2e16b-fbef-4259-ae34-7bc21a41ee28/start" -d "{}" + # curl -X POST "http://localhost:3080/v1/projects/42f9feee-3217-4104-981e-85d5f0a806ec/vpcs/vms/daefc24a-103c-4717-8e01-6517d931c1ae/start" -d '{}' Everything should be started now. You can connect via telnet to the different VM. The port is the field console in the create VM request. @@ -190,7 +190,7 @@ complexity for the client due to the fact only some command on some VM can be concurrent. -Authentification +Authentication ----------------- In this version of the API you have no authentification system. If you