Class: Fog::Compute::Packet::Snapshots

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/compute/packet/models/snapshots.rb

Overview

Volumes

Instance Method Summary collapse

Instance Method Details

#all(volume_id, params = {}) ⇒ Object



10
11
12
13
# File 'lib/fog/compute/packet/models/snapshots.rb', line 10

def all(volume_id, params = {})
  response = service.list_snapshots(volume_id, params)
  load(response.body["snapshots"])
end

#get(id) ⇒ Object



15
16
17
18
# File 'lib/fog/compute/packet/models/snapshots.rb', line 15

def get(id)
  response = service.get_volume(id)
  load(response.body)
end