def initialize(name, type, domain, scale=nil, gear_profile='default')
super({})
@name = name
@domain = domain
@cartridges = []
@creation_time = Date.new(2000, 1, 1).strftime('%Y-%m-%dT%H:%M:%S%z')
@uuid = fakeuuid
@git_url = "git:fake.foo/git/#{@name}.git"
@app_url = "https://#{@name}-#{@domain.id}.fake.foo/"
@ssh_url = "ssh://#{@uuid}@127.0.0.1"
@embedded = {}
@aliases = []
@gear_profile = gear_profile
if scale
@scalable = true
@embedded = {"haproxy-1.4" => {:info => ""}}
end
self.attributes = {:links => mock_response_links(mock_app_links('mock_domain_0', 'mock_app_0')), :messages => []}
cart = add_cartridge(type, false) if type
if scale
cart.supported_scales_to = (cart.scales_to = -1)
cart.supported_scales_from = (cart.scales_from = 2)
cart.current_scale = 2
cart.scales_with = "haproxy-1.4"
end
@framework = type
end