1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Remove bootable volumes list and get methods and moved them under the bootable_volumes collection.

This commit is contained in:
Rupak Ganguly 2012-12-04 02:21:16 -05:00
parent 023db627f0
commit 562742d39b

View file

@ -9,21 +9,13 @@ module Fog
model Fog::BlockStorage::HP::Volume
def all(options={})
if @bootable = options[:only_bootable]
data = connection.list_bootable_volumes.body['volumes']
else
data = connection.list_volumes.body['volumes']
end
def all
data = connection.list_volumes.body['volumes']
load(data)
end
def get(volume_id)
if @bootable
volume = connection.get_bootable_volume_details(volume_id).body['volume']
else
volume = connection.get_volume_details(volume_id).body['volume']
end
volume = connection.get_volume_details(volume_id).body['volume']
new(volume)
rescue Fog::BlockStorage::HP::NotFound
nil