30
31
32
33
34
35
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
|
# File 'lib/fog/aws/parsers/elasticache/cache_cluster_parser.rb', line 30
def end_element(name)
case name
when 'AutoMinorVersionUpgrade', 'CacheClusterId',
'CacheClusterStatus', 'CacheNodeType', 'Engine',
'PreferredAvailabilityZone', 'PreferredMaintenanceWindow'
@cache_cluster[name] = value
when 'EngineVersion', 'CacheNodeIdsToRemoves'
if @pending_values
@pending_values[name] = value ? value.strip : name
else
@cache_cluster[name] = value
end
when 'NumCacheNodes'
if @pending_values
@pending_values[name] = value.to_i
else
@cache_cluster[name] = value.to_i
end
when 'CacheClusterCreateTime'
@cache_cluster[name] = DateTime.parse(value)
when 'CacheSecurityGroup'
@cache_cluster["#{name}s"] << @security_group unless @security_group.empty?
when 'CacheSecurityGroupName', 'Status', 'CacheSubnetGroupName'
@cache_cluster[name] = value
when 'CacheNode'
@cache_cluster["#{name}s"] << @cache_node unless @cache_node.empty?
@cache_node = nil
when'PendingModifiedValues'
@cache_cluster[name] = @pending_values
@pending_values = nil
when 'CacheNodeCreateTime', 'CacheNodeStatus', 'Address',
'ParameterGroupStatus', 'Port', 'CacheNodeId'
if @cache_node
@cache_node[name] = value ? value.strip : name
elsif @pending_values
@pending_values[name] = value ? value.strip : name
end
when 'CacheNodeIdsToReboots', 'CacheParameterGroupName', 'ParameterApplyStatus'
@cache_cluster['CacheParameterGroup'][name] = value
else
super
end
end
|