mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
d48d376e9c
* take the liberty of correcting Aws naming
35 lines
1.1 KiB
Ruby
35 lines
1.1 KiB
Ruby
module Fog
|
|
module Parsers
|
|
module AWS
|
|
module Elasticache
|
|
class SubnetGroupParser < Fog::Parsers::Base
|
|
def reset
|
|
@cache_subnet_group = fresh_subnet_group
|
|
end
|
|
|
|
def start_element(name, attrs = [])
|
|
super
|
|
end
|
|
|
|
def end_element(name)
|
|
case name
|
|
when 'VpcId' then @cache_subnet_group['VpcId'] = value
|
|
when 'SubnetGroupStatus' then @cache_subnet_group['SubnetGroupStatus'] = value
|
|
when 'CacheSubnetGroupDescription' then @cache_subnet_group['CacheSubnetGroupDescription'] = value
|
|
when 'CacheSubnetGroupName' then @cache_subnet_group['CacheSubnetGroupName'] = value
|
|
when 'SubnetIdentifier' then @cache_subnet_group['Subnets'] << value
|
|
when 'Marker'
|
|
@response['DescribeCacheSubnetGroupsResult']['Marker'] = value
|
|
when 'RequestId'
|
|
@response['ResponseMetadata'][name] = value
|
|
end
|
|
end
|
|
|
|
def fresh_subnet_group
|
|
{'Subnets' => []}
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|