36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/fog/aws/parsers/elbv2/describe_listeners.rb', line 36
def end_element(name)
if @in_default_actions
case name
when 'member'
if @in_target_groups
@target_groups << @target_group
@target_group = {}
else
@listener['DefaultActions'] << @default_action
@default_action = {}
end
when 'TargetGroupArn'
if @in_target_groups
@target_group[name] = value
else
@default_action[name] = value
end
when 'Weight'
@target_group[name] = value
when 'Type', 'Order'
@default_action[name] = value
when 'Path', 'Protocol', 'Port', 'Query', 'Host', 'StatusCode', 'ContentType',
'MessageBody', 'StatusCode'
@config[name] = value
when 'RedirectConfig', 'ForwardConfig', 'FixedResponseConfig'
@default_action[name] = @config
@config = {}
when 'DurationSeconds', 'Enabled'
@target_group_stickiness_config[name] = value
when 'DefaultActions'
@in_default_actions = false
when 'TargetGroupStickinessConfig'
if @in_target_group_stickiness_config
@config['TargetGroupStickinessConfig'] = @target_group_stickiness_config
@in_target_group_stickiness_config = false
@target_group_stickiness_config = {}
end
when 'TargetGroups'
@config['TargetGroups'] = @target_groups
@in_target_groups = false
@target_groups = []
end
else
case name
when 'member'
if @in_certificates
@listener['Certificates'] << @certificate
@certificate = {}
else
@results['Listeners'] << @listener
reset_listener
end
when 'LoadBalancerArn', 'Protocol', 'Port', 'ListenerArn', 'SslPolicy'
@listener[name] = value
when 'CertificateArn'
@certificate[name] = value
when 'Certificates'
@in_certificates = false
when 'RequestId'
@response['ResponseMetadata'][name] = value
when 'NextMarker'
@results['NextMarker'] = value
when 'DescribeListenersResponse'
@response['DescribeListenersResult'] = @results
end
end
end
|