module Ufo::Network::Helper

Private Instance Methods

configure_network_settings() click to toggle source

for balancer default profile

# File lib/ufo/network/helper.rb, line 5
def configure_network_settings
  @options = @options.dup
  return test_network_settings if ENV['TEST']

  fetch = Fetch.new(@options[:vpc_id])
  @options[:vpc_id] ||= fetch.vpc_id
  @options[:ecs_subnets] ||= fetch.subnet_ids
  @options[:elb_subnets] ||= @options[:ecs_subnets] || fetch.subnet_ids
end
test_network_settings() click to toggle source

hack for specs

# File lib/ufo/network/helper.rb, line 16
def test_network_settings
  @options[:vpc_id] = "vpc-111"
  @options[:ecs_subnets] = ["subnet-111", "subnet-222"]
  @options[:elb_subnets] = ["subnet-111", "subnet-222"]
  @options
end