Class: Fog::Parsers::Redshift::AWS::DescribeClusterSubnetGroups

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb

Instance Method Summary collapse

Instance Method Details

#end_element(name) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb', line 30

def end_element(name)
  super
  case name
  when 'Marker'
    @response[name] = value
  when 'ClusterSubnetGroup'
    @response['ClusterSubnetGroups'] << {name => @cluster_subnet_group}
    @cluster_subnet_group = {'Subnets' => []}
  when 'ClusterSubnetGroupName', 'Description', 'VpcId', 'SubnetGroupStatus'
    @cluster_subnet_group[name] = value
  when 'Subnet'
    @cluster_subnet_group['Subnets'] << {name => @subnet} if @subnet
    @subnet = {}
  when 'SubnetAvailabilityZone'
    @subnet['SubnetAvailabilityZone'] = {}
  when 'Name'
    @subnet['SubnetAvailabilityZone']['Name'] = value
  when 'SubnetIdentifier', 'SubnetStatus'
    @subnet[name] = value
  end
end

#resetObject

:marker - (String) :cluster_subnet_groups - (Array<Hash>)

:cluster_subnet_group_name - (String)
:description - (String)
:vpc_id - (String)
:subnet_group_status - (String)
:subnets - (Array<Hash>)
  :subnet_identifier - (String)
  :subnet_availability_zone - (Hash)
    :name - (String)
  :subnet_status - (String)


18
19
20
# File 'lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb', line 18

def reset
  @response = { 'ClusterSubnetGroups' => [] }
end

#start_element(name, attrs = []) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/fog/aws/parsers/redshift/describe_cluster_subnet_groups.rb', line 22

def start_element(name, attrs = [])
  super
  case name
  when 'ClusterSubnetGroups'
    @cluster_subnet_group = {'Subnets' => []}
  end
end