Class: RightAws::RdsInterface::DescribeDbSnapshotsParser

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

Overview


DB Snapshots

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:



942
943
944
945
# File 'lib/rds/right_rds_interface.rb', line 942

def reset
  @m = ['DBSnapshot', 'CreateDBSnapshotResult', 'DeleteDBSnapshotResult']
  @result = { :db_snapshots => [] }
end

#tagend(name) ⇒ Object



952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
# File 'lib/rds/right_rds_interface.rb', line 952

def tagend(name)
  case name
  when 'Marker'               then @result[:marker]            = @text
  when 'MaxRecords'           then @result[:max_records]       = @text.to_i  # ?
  when 'Engine'               then @db_snapshot[:engine]               = @text
  when 'InstanceCreateTime'   then @db_snapshot[:instance_create_time] = @text
  when 'EndpointPort'         then @db_snapshot[:endpoint_port]        = @text.to_i
  when 'Status'               then @db_snapshot[:status]               = @text
  when 'AvailabilityZone'     then @db_snapshot[:availability_zone]    = @text
  when 'MasterUsername'       then @db_snapshot[:master_username]      = @text
  when 'AllocatedStorage'     then @db_snapshot[:allocated_storage]    = @text.to_i
  when 'SnapshotCreateTime'   then @db_snapshot[:create_time]          = @text
  when 'DBInstanceIdentifier' then @db_snapshot[:instance_aws_id]      = @text
  when 'DBSnapshotIdentifier' then @db_snapshot[:aws_id]               = @text
  when *@m                    then @result[:db_snapshots]               << @db_snapshot
  end
end

#tagstart(name, attributes) ⇒ Object



946
947
948
949
950
951
# File 'lib/rds/right_rds_interface.rb', line 946

def tagstart(name, attributes)
  case name
    when *@m
      @db_snapshot = {}
  end
end