Class: OceanCommander::Droplets
- Defined in:
- lib/ocean_commander/droplets.rb
Instance Method Summary collapse
- #create(name, size, image, region, ssh_keys = '') ⇒ Object
- #delete(id) ⇒ Object
- #list ⇒ Object
- #password_reset(id, image_id) ⇒ Object
- #poweroff(id) ⇒ Object
- #poweron(id) ⇒ Object
- #reboot(id) ⇒ Object
- #rebuild(id, image_id) ⇒ Object
- #show(id) ⇒ Object
- #shutdown(id) ⇒ Object
Instance Method Details
#create(name, size, image, region, ssh_keys = '') ⇒ Object
8 9 10 |
# File 'lib/ocean_commander/droplets.rb', line 8 def create(name, size, image, region, ssh_keys='') tp api.droplets.create(name: name, size_id: size, image_id: image, region_id: region, ssh_key_ids: ssh_keys).droplet end |
#delete(id) ⇒ Object
13 14 15 |
# File 'lib/ocean_commander/droplets.rb', line 13 def delete(id) tp api.droplets.delete(id) end |
#list ⇒ Object
4 5 6 |
# File 'lib/ocean_commander/droplets.rb', line 4 def list tp api.droplets.list.droplets end |
#password_reset(id, image_id) ⇒ Object
48 49 50 |
# File 'lib/ocean_commander/droplets.rb', line 48 def password_reset(id, image_id) tp api.droplets.password_reset(id) end |
#poweroff(id) ⇒ Object
38 39 40 |
# File 'lib/ocean_commander/droplets.rb', line 38 def poweroff(id) tp api.droplets.power_off(id) end |
#poweron(id) ⇒ Object
33 34 35 |
# File 'lib/ocean_commander/droplets.rb', line 33 def poweron(id) tp api.droplets.power_on(id) end |
#reboot(id) ⇒ Object
23 24 25 |
# File 'lib/ocean_commander/droplets.rb', line 23 def reboot(id) tp api.droplets.reboot(id).droplet end |
#rebuild(id, image_id) ⇒ Object
43 44 45 |
# File 'lib/ocean_commander/droplets.rb', line 43 def rebuild(id, image_id) tp api.droplets.rebuild(id, image_id: image_id) end |
#show(id) ⇒ Object
18 19 20 |
# File 'lib/ocean_commander/droplets.rb', line 18 def show(id) tp api.droplets.show(id).droplet end |
#shutdown(id) ⇒ Object
28 29 30 |
# File 'lib/ocean_commander/droplets.rb', line 28 def shutdown(id) tp api.droplets.shutdown(id) end |