mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|compute] use old style, more consistent call to get single instance
This commit is contained in:
parent
2be572ff23
commit
76444cb484
1 changed files with 6 additions and 1 deletions
|
@ -55,7 +55,12 @@ module Fog
|
|||
Formatador.display_line("[yellow][WARN] describe_instances with #{filters.class} param is deprecated, use describe_instances('instance-id' => []) instead[/] [light_black](#{caller.first})[/]")
|
||||
filters = {'instance-id' => [*filters]}
|
||||
end
|
||||
params = AWS.indexed_filters(filters)
|
||||
params = {}
|
||||
# when seeking single instance id, old param style is most up to date
|
||||
if filters['instance-id'] && !filters['instance-id'].is_a?(Array)
|
||||
params.merge('InstanceId' => filters.delete('instance-id'))
|
||||
end
|
||||
params.merge!(AWS.indexed_filters(filters))
|
||||
|
||||
request({
|
||||
'Action' => 'DescribeInstances',
|
||||
|
|
Loading…
Reference in a new issue