class DockerCloud::ContainerAPI

Constants

TYPE

Public Instance Methods

all(params = {}) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 9
def all(params = {})
  response = http_get(resource_url, params)
  format_object(response, TYPE)
end
get(uuid) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 14
def get(uuid)
  response = http_get(resource_url(uuid))
  format_object(response, TYPE)
end
logs(uuid) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 31
def logs(uuid)
  url = "#{uuid}/logs/"
  response = http_get(resource_url(url))
  format_object(response, TYPE)
end
redeploy(uuid) click to toggle source

NOTE: Container redeployment will make a destructive update.

redeploy will update the container UUID. 
But response is still the old UUID.
# File lib/docker_cloud/api/container_api.rb, line 45
def redeploy(uuid)
  url = "#{uuid}/redeploy/"
  response = http_post(resource_url(url))
  format_object(response, TYPE)
end
resource_url(params = '') click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 5
def resource_url(params = '')
  "/container/#{params}"
end
start(uuid) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 19
def start(uuid)
  url = "#{uuid}/start/"
  response = http_post(resource_url(url))
  format_object(response, TYPE)
end
stop(uuid) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 25
def stop(uuid)
  url = "#{uuid}/stop/"
  response = http_post(resource_url(url))
  format_object(response, TYPE)
end
terminate(uuid) click to toggle source
# File lib/docker_cloud/api/container_api.rb, line 37
def terminate(uuid)
  response = http_delete(resource_url(uuid))
  format_object(response, TYPE)
end