Class: Barge::Resource::Droplet
- Inherits:
-
Object
- Object
- Barge::Resource::Droplet
- Includes:
- Base
- Defined in:
- lib/barge/resource/droplet.rb
Constant Summary
Constants included from Base
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
- #actions(droplet_id) ⇒ Object
- #all(options = {}) ⇒ Object
- #backups(droplet_id) ⇒ Object
- #change_kernel(droplet_id, options) ⇒ Object
- #create(options) ⇒ Object
- #destroy(droplet_id) ⇒ Object
- #disable_backups(droplet_id) ⇒ Object
- #enable_ipv6(droplet_id) ⇒ Object
- #enable_private_networking(droplet_id) ⇒ Object
- #kernels(droplet_id) ⇒ Object
- #password_reset(droplet_id) ⇒ Object
- #power_cycle(droplet_id) ⇒ Object
- #power_off(droplet_id) ⇒ Object
- #power_on(droplet_id) ⇒ Object
- #reboot(droplet_id) ⇒ Object
- #rebuild(droplet_id, options) ⇒ Object
- #rename(droplet_id, options) ⇒ Object
- #resize(droplet_id, options) ⇒ Object
- #restore(droplet_id, options) ⇒ Object
- #show(droplet_id) ⇒ Object
- #show_action(droplet_id, action_id) ⇒ Object
- #shutdown(droplet_id) ⇒ Object
- #snapshot(droplet_id, options) ⇒ Object
- #snapshots(droplet_id) ⇒ Object
Methods included from Base
Instance Method Details
#actions(droplet_id) ⇒ Object
94 95 96 |
# File 'lib/barge/resource/droplet.rb', line 94 def actions(droplet_id) get("droplets/#{droplet_id}/actions") end |
#all(options = {}) ⇒ Object
10 11 12 |
# File 'lib/barge/resource/droplet.rb', line 10 def all( = {}) get('droplets', ) end |
#backups(droplet_id) ⇒ Object
18 19 20 |
# File 'lib/barge/resource/droplet.rb', line 18 def backups(droplet_id) get("droplets/#{droplet_id}/backups") end |
#change_kernel(droplet_id, options) ⇒ Object
78 79 80 |
# File 'lib/barge/resource/droplet.rb', line 78 def change_kernel(droplet_id, ) action(droplet_id, __method__, ) end |
#create(options) ⇒ Object
6 7 8 |
# File 'lib/barge/resource/droplet.rb', line 6 def create() post('droplets', .to_json) end |
#destroy(droplet_id) ⇒ Object
30 31 32 |
# File 'lib/barge/resource/droplet.rb', line 30 def destroy(droplet_id) delete("droplets/#{droplet_id}") end |
#disable_backups(droplet_id) ⇒ Object
86 87 88 |
# File 'lib/barge/resource/droplet.rb', line 86 def disable_backups(droplet_id) action(droplet_id, __method__) end |
#enable_ipv6(droplet_id) ⇒ Object
82 83 84 |
# File 'lib/barge/resource/droplet.rb', line 82 def enable_ipv6(droplet_id) action(droplet_id, __method__) end |
#enable_private_networking(droplet_id) ⇒ Object
90 91 92 |
# File 'lib/barge/resource/droplet.rb', line 90 def enable_private_networking(droplet_id) action(droplet_id, __method__) end |
#kernels(droplet_id) ⇒ Object
22 23 24 |
# File 'lib/barge/resource/droplet.rb', line 22 def kernels(droplet_id) get("droplets/#{droplet_id}/kernels") end |
#password_reset(droplet_id) ⇒ Object
74 75 76 |
# File 'lib/barge/resource/droplet.rb', line 74 def password_reset(droplet_id) action(droplet_id, __method__) end |
#power_cycle(droplet_id) ⇒ Object
54 55 56 |
# File 'lib/barge/resource/droplet.rb', line 54 def power_cycle(droplet_id) action(droplet_id, __method__) end |
#power_off(droplet_id) ⇒ Object
50 51 52 |
# File 'lib/barge/resource/droplet.rb', line 50 def power_off(droplet_id) action(droplet_id, __method__) end |
#power_on(droplet_id) ⇒ Object
58 59 60 |
# File 'lib/barge/resource/droplet.rb', line 58 def power_on(droplet_id) action(droplet_id, __method__) end |
#reboot(droplet_id) ⇒ Object
42 43 44 |
# File 'lib/barge/resource/droplet.rb', line 42 def reboot(droplet_id) action(droplet_id, __method__) end |
#rebuild(droplet_id, options) ⇒ Object
66 67 68 |
# File 'lib/barge/resource/droplet.rb', line 66 def rebuild(droplet_id, ) action(droplet_id, __method__, ) end |
#rename(droplet_id, options) ⇒ Object
34 35 36 |
# File 'lib/barge/resource/droplet.rb', line 34 def rename(droplet_id, ) action(droplet_id, __method__, ) end |
#resize(droplet_id, options) ⇒ Object
62 63 64 |
# File 'lib/barge/resource/droplet.rb', line 62 def resize(droplet_id, ) action(droplet_id, __method__, ) end |
#restore(droplet_id, options) ⇒ Object
70 71 72 |
# File 'lib/barge/resource/droplet.rb', line 70 def restore(droplet_id, ) action(droplet_id, __method__, ) end |
#show(droplet_id) ⇒ Object
14 15 16 |
# File 'lib/barge/resource/droplet.rb', line 14 def show(droplet_id) get("droplets/#{droplet_id}") end |
#show_action(droplet_id, action_id) ⇒ Object
98 99 100 |
# File 'lib/barge/resource/droplet.rb', line 98 def show_action(droplet_id, action_id) get("droplets/#{droplet_id}/actions/#{action_id}") end |
#shutdown(droplet_id) ⇒ Object
46 47 48 |
# File 'lib/barge/resource/droplet.rb', line 46 def shutdown(droplet_id) action(droplet_id, __method__) end |
#snapshot(droplet_id, options) ⇒ Object
38 39 40 |
# File 'lib/barge/resource/droplet.rb', line 38 def snapshot(droplet_id, ) action(droplet_id, __method__, ) end |
#snapshots(droplet_id) ⇒ Object
26 27 28 |
# File 'lib/barge/resource/droplet.rb', line 26 def snapshots(droplet_id) get("droplets/#{droplet_id}/snapshots") end |