mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[AWS|ELB] offload Listener defaults to the Listener model
This commit is contained in:
parent
1d205ccc3c
commit
44af711f90
1 changed files with 7 additions and 4 deletions
|
@ -15,10 +15,13 @@ module Fog
|
|||
|
||||
def initialize(attributes={})
|
||||
attributes[:availability_zones] ||= attributes['AvailabilityZones'] || %w(us-east-1a us-east-1b us-east-1c us-east-1d)
|
||||
attributes['ListenerDescriptions'] ||= [{
|
||||
'Listener' => {'LoadBalancerPort' => 80, 'InstancePort' => 80, 'Protocol' => 'HTTP'},
|
||||
'PolicyNames' => []
|
||||
}]
|
||||
unless attributes['ListenerDescriptions']
|
||||
new_listener = Fog::AWS::ELB::Listener.new
|
||||
attributes['ListenerDescriptions'] = [{
|
||||
'Listener' => new_listener.to_params,
|
||||
'PolicyNames' => new_listener.policy_names
|
||||
}]
|
||||
end
|
||||
attributes['Policies'] ||= {'AppCookieStickinessPolicies' => [], 'LBCookieStickinessPolicies' => []}
|
||||
super
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue