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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/fog/aws/parsers/compute/describe_vpcs.rb', line 30
def end_element(name)
case @context[1 .. -1].join('.')
when 'vpcSet.item.tagSet.item'
@current_vpc['tagSet'][@current_tag_key] = @current_tag_value
@current_tag_key = @current_tag_value = nil
when 'vpcSet.item.tagSet.item.key'
@current_tag_key = value
when 'vpcSet.item.tagSet.item.value'
@current_tag_value = value
when 'vpcSet.item.cidrBlockAssociationSet.item.cidrBlock',
'vpcSet.item.cidrBlockAssociationSet.item.associationId'
@current_cidr_block[name] = value
when 'vpcSet.item.cidrBlockAssociationSet.item.cidrBlockState'
@current_cidr_block['state'] = value.strip
when 'vpcSet.item.cidrBlockAssociationSet.item'
@current_vpc['cidrBlockAssociationSet'] << @current_cidr_block
when 'vpcSet.item.ipv6CidrBlockAssociationSet.item.ipv6CidrBlock',
'vpcSet.item.ipv6CidrBlockAssociationSet.item.associationId'
@current_ipv6_block[name] = value
when 'vpcSet.item.ipv6CidrBlockAssociationSet.item.ipv6CidrBlockState'
@current_ipv6_block['state'] = value.strip
when 'vpcSet.item.ipv6CidrBlockAssociationSet.item'
@current_vpc['ipv6CidrBlockAssociationSet'] << @current_ipv6_block
when 'vpcSet.item.vpcId',
'vpcSet.item.state',
'vpcSet.item.cidrBlock',
'vpcSet.item.dhcpOptionsId',
'vpcSet.item.instanceTenancy'
@current_vpc[name] = value
when 'vpcSet.item.isDefault'
@current_vpc['isDefault'] = value == 'true'
when 'vpcSet.item'
@response['vpcSet'] << @current_vpc
when 'requestId'
@response[name] = value
end
@context.pop
end
|