Class: Fog::Compute::ProfitBricks::Volumes

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

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/profitbricks/models/compute/volumes.rb', line 10

def all
    load(service.get_all_storages.body['getAllStoragesResponse'])
end

#get(id) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/fog/profitbricks/models/compute/volumes.rb', line 14

def get(id)
    volume = service.get_storage(id).body['getStorageResponse']
    Excon::Errors
    new(volume)
rescue Excon::Errors::NotFound
    nil
end