Class: Fog::HP::BlockStorage::Snapshots
- Inherits:
-
Collection
- Object
- Collection
- Fog::HP::BlockStorage::Snapshots
- Defined in:
- lib/fog/hp/models/block_storage/snapshots.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
10 11 12 13 |
# File 'lib/fog/hp/models/block_storage/snapshots.rb', line 10 def all data = service.list_snapshots.body['snapshots'] load(data) end |
#get(snapshot_id) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/fog/hp/models/block_storage/snapshots.rb', line 15 def get(snapshot_id) if snapshot = service.get_snapshot_details(snapshot_id).body['snapshot'] new(snapshot) end rescue Fog::HP::BlockStorage::NotFound nil end |