Class: Fog::Parsers::AWS::RDS::DescribeOrderableDBInstanceOptions
- Inherits:
-
Base
- Object
- Nokogiri::XML::SAX::Document
- Base
- Fog::Parsers::AWS::RDS::DescribeOrderableDBInstanceOptions
show all
- Defined in:
- lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.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
Instance Method Details
#end_element(name) ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb', line 22
def end_element(name)
case name
when 'MultiAZCapable', 'ReadReplicaCapable', 'Vpc' then @db_instance_option[name] = to_boolean(value)
when 'Engine', 'LicenseModel', 'EngineVersion', 'DBInstanceClass' then @db_instance_option[name] = value
when 'AvailabilityZones' then @db_instance_option[name] = @availability_zones
when 'AvailabilityZone' then @availability_zones << @availability_zone unless @availability_zone.empty?
when 'Name' then @availability_zone[name] = value
when 'ProvisionedIopsCapable' then @availability_zone[name] = to_boolean(value)
when 'OrderableDBInstanceOption'
@db_instance_options << @db_instance_option
@db_instance_option = {}
when 'OrderableDBInstanceOptions'
@response['DescribeOrderableDBInstanceOptionsResult']['OrderableDBInstanceOptions'] = @db_instance_options
when 'Marker' then @response['DescribeOrderableDBInstanceOptionsResult'][name] = value
when 'RequestId' then @response['ResponseMetadata'][name] = value
end
end
|
#reset ⇒ Object
8
9
10
11
12
|
# File 'lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb', line 8
def reset
@response = { 'DescribeOrderableDBInstanceOptionsResult' => {'OrderableDBInstanceOptions' => []}, 'ResponseMetadata' => {} }
@db_instance_option = {}
@db_instance_options = []
end
|
#start_element(name, attrs = []) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb', line 14
def start_element(name, attrs = [])
case name
when 'AvailabilityZones' then @availability_zones = []
when 'AvailabilityZone' then @availability_zone = {}
end
super
end
|
#to_boolean(v) ⇒ Object
40
41
42
|
# File 'lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb', line 40
def to_boolean(v)
(v =~ /\A\s*(true|yes|1|y)\s*$/i) == 0
end
|