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:
parent
023db627f0
commit
562742d39b
1 changed files with 3 additions and 11 deletions
|
@ -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
|
||||
def all
|
||||
data = connection.list_volumes.body['volumes']
|
||||
end
|
||||
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
|
||||
new(volume)
|
||||
rescue Fog::BlockStorage::HP::NotFound
|
||||
nil
|
||||
|
|
Loading…
Reference in a new issue