1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Updated association to always contain optional fields.

This commit is contained in:
Robert Clark 2013-08-14 15:14:35 -04:00
parent e5fb267729
commit 13cc6255f1

View file

@ -6,7 +6,7 @@ module Fog
class DescribeRouteTables < Fog::Parsers::Base
def reset
@association = {}
@association = { 'routeTableAssociationId' => nil, 'routeTableId' => nil, 'subnetId' => nil, 'main' => false }
@in_association_set = false
@in_route_set = false
@route = { 'destinationCidrBlock' => nil, 'gatewayId' => nil, 'instanceId' => nil, 'instanceOwnerId' => nil, 'networkInterfaceId' => nil, 'state' => nil, 'origin' => nil }
@ -32,11 +32,17 @@ module Fog
case name
when 'associationSet'
@in_association_set = false
when 'routeTableAssociationId', 'routeTableId', 'subnetId', 'main'
when 'routeTableAssociationId', 'routeTableId', 'subnetId'
@association[name] = value
when 'main'
if value == 'true'
@association[name] = true
else
@association[name] = false
end
when 'item'
@route_table['associationSet'] << @association
@association = {}
@association = { 'routeTableAssociationId' => nil, 'routeTableId' => nil, 'subnetId' => nil, 'main' => false }
end
elsif @in_tag_set
case name