Skip to content

tamirko/cloudify-host-pool-service

 
 

Repository files navigation

Cloudify Host Pool Service

Build Status

  • Usage documentation can be found Here
  • Examples are available Here

Description

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.

[GET] /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] /hosts/{host_id}

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
}

[POST] /hosts

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
}

[DELETE] /hosts/{host_id}

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
}

About

host-pool service, used with the Cloudify host-pool plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.8%
  • Shell 4.2%