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

Fix for stopping all the servers instead of just specified servers

This commit is contained in:
Avrohom Katz 2012-07-13 11:33:23 -04:00
parent 1a3461d5c6
commit b18deb16c9
2 changed files with 2 additions and 0 deletions

View file

@ -34,6 +34,7 @@ module Fog
instance_set = self.data[:instances].values
instance_set = apply_tag_filters(instance_set, {'instance_id' => instance_ids}, 'instanceId')
instance_set = instance_set.find_all {|x| instance_ids.include?(x["instanceId"]) }
if instance_set.empty?
raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids.first}' does not exist")

View file

@ -35,6 +35,7 @@ module Fog
instance_set = self.data[:instances].values
instance_set = apply_tag_filters(instance_set, {'instance_id' => instance_ids}, 'instanceId')
instance_set = instance_set.find_all {|x| instance_ids.include?(x["instanceId"]) }
if instance_set.empty?
raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_ids.first}' does not exist")