mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Take care of SslPolicy and Default actions' Order in listeners parser
This commit is contained in:
parent
eea4e0fa45
commit
7f32c06c35
3 changed files with 8 additions and 2 deletions
|
@ -52,7 +52,7 @@ module Fog
|
|||
end
|
||||
when 'Weight'
|
||||
@target_group[name] = value
|
||||
when 'Type'
|
||||
when 'Type', 'Order'
|
||||
@default_action[name] = value
|
||||
when 'Path', 'Protocol', 'Port', 'Query', 'Host', 'StatusCode'
|
||||
@config[name] = value
|
||||
|
@ -84,7 +84,7 @@ module Fog
|
|||
@results['Listeners'] << @listener
|
||||
reset_listener
|
||||
end
|
||||
when 'LoadBalancerArn', 'Protocol', 'Port', 'ListenerArn'
|
||||
when 'LoadBalancerArn', 'Protocol', 'Port', 'ListenerArn', 'SslPolicy'
|
||||
@listener[name] = value
|
||||
when 'CertificateArn'
|
||||
@certificate[name] = value
|
||||
|
|
|
@ -10,9 +10,11 @@ DESCRIBE_LISTENERS_RESULT = <<-EOF
|
|||
<Protocol>HTTPS</Protocol>
|
||||
<Port>80</Port>
|
||||
<ListenerArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2</ListenerArn>
|
||||
<SslPolicy>polucy</SslPolicy>
|
||||
<DefaultActions>
|
||||
<member>
|
||||
<Type>forward</Type>
|
||||
<Order>1</Order>
|
||||
<TargetGroupArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067</TargetGroupArn>
|
||||
<RedirectConfig>
|
||||
<Protocol>HTTPS</Protocol>
|
||||
|
@ -36,9 +38,11 @@ DESCRIBE_LISTENERS_RESULT = <<-EOF
|
|||
<Protocol>HTTPS</Protocol>
|
||||
<Port>80</Port>
|
||||
<ListenerArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2</ListenerArn>
|
||||
<SslPolicy>polucy</SslPolicy>
|
||||
<DefaultActions>
|
||||
<member>
|
||||
<Type>forward</Type>
|
||||
<Order>2</Order>
|
||||
<TargetGroupArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067</TargetGroupArn>
|
||||
<ForwardConfig>
|
||||
<TargetGroupStickinessConfig><Enable>true</Enable></TargetGroupStickinessConfig>
|
||||
|
|
|
@ -32,6 +32,7 @@ class AWS
|
|||
|
||||
LISTENER_DEFAULT_ACTIONS = [{
|
||||
"Type" => String,
|
||||
"Order" => String,
|
||||
"TargetGroupArn" => String,
|
||||
"RedirectConfig" => Fog::Nullable::Hash,
|
||||
"ForwardConfig" => Fog::Nullable::Hash
|
||||
|
@ -42,6 +43,7 @@ class AWS
|
|||
"Protocol" => String,
|
||||
"Port" => String,
|
||||
"ListenerArn" => String,
|
||||
"SslPolicy" => String,
|
||||
"DefaultActions" => LISTENER_DEFAULT_ACTIONS,
|
||||
"Certificates" => [{"CertificateArn" => String}]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue