Class: TutumNodes

Inherits:
TutumApi show all
Defined in:
lib/tutum_nodes.rb

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

#deploy(uuid) ⇒ Object



22
23
24
# File 'lib/tutum_nodes.rb', line 22

def deploy(uuid)
  http_post(deploy_url(uuid))
end

#deploy_url(uuid) ⇒ Object



18
19
20
# File 'lib/tutum_nodes.rb', line 18

def deploy_url(uuid)
  "/node/#{uuid}/deploy/"
end

#get(uuid) ⇒ Object



14
15
16
# File 'lib/tutum_nodes.rb', line 14

def get(uuid)
  http_get(get_url(uuid))
end

#get_url(uuid) ⇒ Object



10
11
12
# File 'lib/tutum_nodes.rb', line 10

def get_url(uuid)
  "/node/#{uuid}/"
end

#list(params = {}) ⇒ Object



6
7
8
# File 'lib/tutum_nodes.rb', line 6

def list(params={})
  http_get(list_url, params)
end

#list_urlObject



2
3
4
# File 'lib/tutum_nodes.rb', line 2

def list_url
  "/node/"
end

#terminate(uuid) ⇒ Object



30
31
32
# File 'lib/tutum_nodes.rb', line 30

def terminate(uuid)
  http_delete(terminate_url(uuid))
end

#terminate_url(uuid) ⇒ Object



26
27
28
# File 'lib/tutum_nodes.rb', line 26

def terminate_url(uuid)
  "/node/#{uuid}/"
end