The service is a python web service based on [flask-restful] (https://flask-restful.readthedocs.org/en/0.3.2/) that exposes a REST API to be consumed by clients who are interested in using hosts from a pool of pre-existing hosts.
Queries the service for all allocated hosts.
{
"hosts": [
{
"host_id": "ed11c216-0bd5-4beb-94e1-6d782acb365e",
"host": "192.168.9.11",
"public_address": "15.16.17.18",
"auth": {
"username": "username",
"password": "password",
"keyfile": null
},
"port": 22
}
]
}
Get information on a specific host. The host id generated while acquiring this host must be passed.
{
"host_id": "ed11c216-0bd5-4beb-94e1-6d782acb365e",
"host": "192.168.9.11",
"public_address": "15.16.17.18",
"auth": {
"username": "username",
"password": "password",
"keyfile": null
},
"port": 22
}
Acquire a host.
{
"host_id": "ed11c216-0bd5-4beb-94e1-6d782acb365e",
"host": "192.168.9.11",
"public_address": "15.16.17.18",
"auth": {
"username": "username",
"password": "password",
"keyfile": null
},
"port": 22
}
Release a host by its id. response is the deleted host
{
"host_id": "ed11c216-0bd5-4beb-94e1-6d782acb365e",
"host": "192.168.9.11",
"public_address": "15.16.17.18",
"auth": {
"username": "username",
"password": "password",
"keyfile": null
},
"port": 22
}