1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
require "integration/factories/collection_factory"
require "integration/factories/target_pools_factory"
class ForwardingRulesFactory < CollectionFactory
def initialize(example)
@target_pools = TargetPoolsFactory.new(example)
super(Fog::Compute[:google].forwarding_rules, example)
end
def cleanup
super
@target_pools.cleanup
end
def all
@subject.all(region: TEST_REGION)
end
def params
{ :name => resource_name,
:port_range => "80-80",
:region => TEST_REGION,
:target => @target_pools.create.self_link }
end
end
|