Class: RightAws::RdsInterface::DescribeDbSecurityGroupsParser
- Inherits:
-
RightAws::RightAWSParser
- Object
- RightAws::RightAWSParser
- RightAws::RdsInterface::DescribeDbSecurityGroupsParser
- Defined in:
- lib/rds/right_rds_interface.rb
Overview
DB Security 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
#reset ⇒ Object
:nodoc:
847 848 849 850 851 852 853 |
# File 'lib/rds/right_rds_interface.rb', line 847 def reset @m = [ 'DBSecurityGroup', 'CreateDBSecurityGroupResult', 'AuthorizeDBSecurityGroupIngressResult', 'RevokeDBSecurityGroupIngressResult' ] @result = { :db_security_groups => [] } end |
#tagend(name) ⇒ Object
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/rds/right_rds_interface.rb', line 861 def tagend(name) case name when 'Marker' then @result[:marker] = @text when 'MaxRecords' then @result[:max_records] = @text.to_i when 'DBSecurityGroupDescription' then @item[:description] = @text when 'OwnerId' then @item[:owner_id] = @text when 'DBSecurityGroupName' then @item[:name] = @text when 'Status' case @xmlpath when /IPRange$/ then @ip_range[:status] = @text when /EC2SecurityGroup$/ then @ec2_security_group[:status] = @text end when 'EC2SecurityGroupName' then @ec2_security_group[:name] = @text when 'EC2SecurityGroupOwnerId' then @ec2_security_group[:owner_id] = @text when 'CIDRIP' then @ip_range[:cidrip] = @text when 'IPRange' then @item[:ip_ranges] << @ip_range when 'EC2SecurityGroup' then @item[:ec2_security_groups] << @ec2_security_group when *@m # Sort the ip_ranges and ec2_security_groups @item[:ip_ranges].sort!{ |i1,i2| "#{i1[:cidrip]}" <=> "#{i2[:cidrip]}" } @item[:ec2_security_groups].sort!{ |i1,i2| "#{i1[:owner_id]}#{i1[:name]}" <=> "#{i2[:owner_id]}#{i2[:name]}" } @result[:db_security_groups] << @item end end |
#tagstart(name, attributes) ⇒ Object
854 855 856 857 858 859 860 |
# File 'lib/rds/right_rds_interface.rb', line 854 def (name, attributes) case name when *@m then @item = { :ec2_security_groups => [], :ip_ranges => [] } when 'IPRange' then @ip_range = {} when 'EC2SecurityGroup' then @ec2_security_group = {} end end |