mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Should actually use the attachment_aliases hash.
This commit is contained in:
parent
2edb89c512
commit
957ab67024
2 changed files with 5 additions and 1 deletions
|
@ -74,7 +74,7 @@ module Fog
|
||||||
}
|
}
|
||||||
for filter_key, filter_value in filters
|
for filter_key, filter_value in filters
|
||||||
if attachment_key = filter_key.split('attachment.')[1]
|
if attachment_key = filter_key.split('attachment.')[1]
|
||||||
aliased_key = permission_aliases[filter_key]
|
aliased_key = attachment_aliases[filter_key]
|
||||||
volume_set = volume_set.reject{|volume| !volume['attachmentSet'].detect {|attachment| [*filter_value].include?(attachment[aliased_key])}}
|
volume_set = volume_set.reject{|volume| !volume['attachmentSet'].detect {|attachment| [*filter_value].include?(attachment[aliased_key])}}
|
||||||
else
|
else
|
||||||
aliased_key = aliases[filter_key]
|
aliased_key = aliases[filter_key]
|
||||||
|
|
|
@ -78,6 +78,10 @@ Shindo.tests('Fog::Compute[:aws] | volume requests', ['aws']) do
|
||||||
|
|
||||||
Fog::Compute[:aws].volumes.get(@volume_id).wait_for { state == 'in-use' }
|
Fog::Compute[:aws].volumes.get(@volume_id).wait_for { state == 'in-use' }
|
||||||
|
|
||||||
|
tests("#describe_volume('attachment.device' => '/dev/sdh')").formats(@volumes_format) do
|
||||||
|
Fog::Compute[:aws].describe_volumes('attachment.device' => '/dev/sdh').body
|
||||||
|
end
|
||||||
|
|
||||||
tests("#detach_volume('#{@volume_id}')").formats(@volume_attachment_format) do
|
tests("#detach_volume('#{@volume_id}')").formats(@volume_attachment_format) do
|
||||||
Fog::Compute[:aws].detach_volume(@volume_id).body
|
Fog::Compute[:aws].detach_volume(@volume_id).body
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue