Class: TutumContainers
Constant Summary
Constants inherited
from TutumApi
TutumApi::API_VERSION, TutumApi::BASE_API_PATH
Instance Attribute Summary
Attributes inherited from TutumApi
#headers
Instance Method Summary
collapse
Methods inherited from TutumApi
#http_delete, #http_get, #http_patch, #http_post, #initialize, #url
Constructor Details
This class inherits a constructor from TutumApi
Instance Method Details
#get(uuid) ⇒ Object
14
15
16
|
# File 'lib/tutum_containers.rb', line 14
def get(uuid)
http_get(get_url(uuid))
end
|
#get_url(uuid) ⇒ Object
10
11
12
|
# File 'lib/tutum_containers.rb', line 10
def get_url(uuid)
"/container/#{uuid}/"
end
|
#list(params = {}) ⇒ Object
6
7
8
|
# File 'lib/tutum_containers.rb', line 6
def list(params={})
http_get(list_url, params)
end
|
#list_url ⇒ Object
2
3
4
|
# File 'lib/tutum_containers.rb', line 2
def list_url
"/container/"
end
|
#logs(uuid) ⇒ Object
38
39
40
|
# File 'lib/tutum_containers.rb', line 38
def logs(uuid)
http_get(logs_url(uuid))
end
|
#logs_url(uuid) ⇒ Object
34
35
36
|
# File 'lib/tutum_containers.rb', line 34
def logs_url(uuid)
"/container/#{uuid}/logs/"
end
|
#start(uuid) ⇒ Object
22
23
24
|
# File 'lib/tutum_containers.rb', line 22
def start(uuid)
http_post(start_url(uuid))
end
|
#start_url(uuid) ⇒ Object
18
19
20
|
# File 'lib/tutum_containers.rb', line 18
def start_url(uuid)
"/container/#{uuid}/start/"
end
|
#stop(uuid) ⇒ Object
30
31
32
|
# File 'lib/tutum_containers.rb', line 30
def stop(uuid)
http_post(stop_url(uuid))
end
|
#stop_url(uuid) ⇒ Object
26
27
28
|
# File 'lib/tutum_containers.rb', line 26
def stop_url(uuid)
"/container/#{uuid}/stop/"
end
|
#terminate(uuid) ⇒ Object
46
47
48
|
# File 'lib/tutum_containers.rb', line 46
def terminate(uuid)
http_terminate(terminate_url(uuid))
end
|
#terminate_url(uuid) ⇒ Object
42
43
44
|
# File 'lib/tutum_containers.rb', line 42
def terminate_url(uuid)
"/container/#{uuid}/"
end
|