Class: RightAws::RdsInterface::DescribeDBSubnetGroupsParser

Inherits:
RightAws::RightAWSParser show all
Defined in:
lib/rds/right_rds_interface.rb

Overview


DB Subnet Groups

Constant Summary

Constants inherited from RightAws::RightAWSParser

RightAws::RightAWSParser::DEFAULT_XML_LIBRARY

Instance Attribute Summary

Attributes inherited from RightAws::RightAWSParser

#full_tag_name, #result, #tag, #xml_lib, #xmlpath

Instance Method Summary collapse

Methods inherited from RightAws::RightAWSParser

#initialize, #method_missing, #parse, #tag_end, #tag_start, #tagtext, #text, xml_lib, xml_lib=

Constructor Details

This class inherits a constructor from RightAws::RightAWSParser

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RightAws::RightAWSParser

Instance Method Details

#resetObject

:nodoc:



1626
1627
1628
# File 'lib/rds/right_rds_interface.rb', line 1626

def reset
  @result = { :subnet_groups => [] }
end

#tagend(name) ⇒ Object



1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
# File 'lib/rds/right_rds_interface.rb', line 1635

def tagend(name)
  case name
  when 'Marker'                   then @result[:marker]        = @text
  when 'MaxRecords'               then @result[:max_records]   = @text.to_i
  when 'DBSubnetGroupName'        then @item[:name]            = @text
  when 'DBSubnetGroupDescription' then @item[:description]     = @text
  when 'SubnetGroupStatus'        then @item[:status]          = @text
  when 'Subnet'                   then @item[:subnets]         << @subnet
  when 'VpcId'                    then @item[:vpc_id]          = @text
  when 'DBSubnetGroup'            then @result[:subnet_groups] << @item
  else
    case full_tag_name
    when %r{Subnet/SubnetIdentifier$}                 then @subnet[:subnet_id]                = @text
    when %r{Subnet/SubnetStatus$}                     then @subnet[:status]                   = @text
    when %r{AvailabilityZone/Name$}                   then @subnet[:availability_zone][:name] = @text
    when %r{AvailabilityZone/ProvisionedIopsCapable$} then @subnet[:availability_zone][:provisioned_iops_capable] = @text == 'true'
    end
  end
end

#tagstart(name, attributes) ⇒ Object



1629
1630
1631
1632
1633
1634
# File 'lib/rds/right_rds_interface.rb', line 1629

def tagstart(name, attributes)
  case name
  when 'DBSubnetGroup' then @item   = { :subnets           => [] }
  when 'Subnet'        then @subnet = { :availability_zone => {}}
  end
end