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

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

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #initialize, #start_element_namespace, #value

Constructor Details

This class inherits a constructor from Fog::Parsers::Base

Instance Method Details

#end_element(name) ⇒ Object



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

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)


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

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

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



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

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