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

[aws|compute] fix mock az filtering

closes #3089
This commit is contained in:
geemus 2014-08-06 11:43:05 -05:00
parent b72471f9ff
commit 563314b90f

View file

@ -146,6 +146,9 @@ module Fog
elsif state_reason_key = filter_key.split('state-reason-')[1]
aliased_key = state_reason_aliases[state_reason_key]
instance_set = instance_set.reject{|instance| ![*filter_value].include?(instance['stateReason'][aliased_key])}
elsif filter_key == "availability-zone"
aliased_key = aliases[filter_key]
instance_set = instance_set.reject{|instance| ![*filter_value].include?(instance['placement'][aliased_key])}
elsif filter_key == "group-name"
instance_set = instance_set.reject {|instance| !instance['groupSet'].include?(filter_value)}
elsif filter_key == "group-id"