lib/fog/aws/requests/auto_scaling/suspend_processes.rb in fog-1.22.0 vs lib/fog/aws/requests/auto_scaling/suspend_processes.rb in fog-1.22.1
- old
+ new
@@ -1,11 +1,9 @@
module Fog
module AWS
class AutoScaling
-
class Real
-
require 'fog/aws/parsers/auto_scaling/basic'
# Suspends Auto Scaling processes for an Auto Scaling group. To suspend
# specific process types, specify them by name with the
# ScalingProcesses parameter. To suspend all process types, omit the
@@ -35,28 +33,24 @@
'Action' => 'SuspendProcesses',
'AutoScalingGroupName' => auto_scaling_group_name,
:parser => Fog::Parsers::AWS::AutoScaling::Basic.new
}.merge!(options))
end
-
end
class Mock
-
def suspend_processes(auto_scaling_group_name, options = {})
- unless self.data[:auto_scaling_groups].has_key?(auto_scaling_group_name)
+ unless self.data[:auto_scaling_groups].key?(auto_scaling_group_name)
raise Fog::AWS::AutoScaling::ValidationError.new("AutoScalingGroup name not found - no such group: #{auto_scaling_group_name}")
end
response = Excon::Response.new
response.status = 200
response.body = {
'ResponseMetadata' => { 'RequestId' => Fog::AWS::Mock.request_id }
}
response
end
-
end
-
end
end
end