Module: Smartdc::Api::Machines::Snapshots
- Included in:
- Client
- Defined in:
- lib/smartdc/api/machines/snapshots.rb
Instance Method Summary collapse
- #create_machine_snapshot(machine_id, body = {}) ⇒ Object
- #destroy_machine_snapshot(machine_id, name) ⇒ Object
- #machine_snapshot(machine_id, name) ⇒ Object
- #machine_snapshots(machine_id, params = {}) ⇒ Object
- #start_machine_snapshot(machine_id, name) ⇒ Object
Instance Method Details
#create_machine_snapshot(machine_id, body = {}) ⇒ Object
7 8 9 |
# File 'lib/smartdc/api/machines/snapshots.rb', line 7 def create_machine_snapshot(machine_id, body={}) post 'my/machines/' + machine_id.to_s + '/snapshots', body end |
#destroy_machine_snapshot(machine_id, name) ⇒ Object
15 16 17 |
# File 'lib/smartdc/api/machines/snapshots.rb', line 15 def destroy_machine_snapshot(machine_id, name) delete 'my/machines/' + machine_id.to_s + '/snapshots/' + name.to_s end |
#machine_snapshot(machine_id, name) ⇒ Object
11 12 13 |
# File 'lib/smartdc/api/machines/snapshots.rb', line 11 def machine_snapshot(machine_id, name) get 'my/machines/' + machine_id.to_s + '/snapshots/' + name.to_s end |
#machine_snapshots(machine_id, params = {}) ⇒ Object
3 4 5 |
# File 'lib/smartdc/api/machines/snapshots.rb', line 3 def machine_snapshots(machine_id, params={}) get 'my/machines/' + machine_id.to_s + '/snapshots', params end |
#start_machine_snapshot(machine_id, name) ⇒ Object
19 20 21 |
# File 'lib/smartdc/api/machines/snapshots.rb', line 19 def start_machine_snapshot(machine_id, name) post 'my/machines/' + machine_id.to_s + '/snapshots/' + name.to_s, {} end |