2013-05-30 23:19:08 +00:00
|
|
|
module AWS
|
|
|
|
class FakeAutoScaling
|
|
|
|
def initialize
|
|
|
|
end
|
2013-05-31 20:08:23 +00:00
|
|
|
|
|
|
|
def groups
|
|
|
|
@groups ||= GroupCollection.new
|
|
|
|
end
|
|
|
|
|
|
|
|
class GroupCollection
|
|
|
|
def initialize
|
|
|
|
@groups = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](name)
|
|
|
|
@groups[name]
|
|
|
|
end
|
|
|
|
|
|
|
|
def create(name, options = {})
|
|
|
|
@groups[name] = Group.new name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class Group
|
|
|
|
attr_reader :name
|
|
|
|
|
|
|
|
def initialize(name)
|
|
|
|
@name = name
|
2013-05-31 22:05:16 +00:00
|
|
|
@suspended_processes = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
def suspend_processes(*processes)
|
|
|
|
processes.each do |process|
|
|
|
|
@suspended_processes[process] = 'test'
|
|
|
|
end
|
2013-05-31 20:08:23 +00:00
|
|
|
end
|
|
|
|
end
|
2013-05-30 23:19:08 +00:00
|
|
|
end
|
|
|
|
end
|