1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

[aws | rds] update instance_option model to match data provided by aws

Not all the data given by aws was being exposed on the model.
This makes it match the current used version of the API (2014-10-31).
This commit is contained in:
Carlos Lima 2017-10-22 13:35:17 +08:00
parent e36bccc208
commit 650a5884c7
2 changed files with 10 additions and 3 deletions

View file

@ -10,6 +10,12 @@ module Fog
attribute :availability_zones, :aliases => 'AvailabilityZones', :type => :array
attribute :db_instance_class, :aliases => 'DBInstanceClass'
attribute :vpc, :aliases => 'Vpc', :type => :boolean
attribute :supports_iops, :aliases => 'SupportsIops', :type => :boolean
attribute :supports_enhanced_monitoring, :aliases => 'SupportsEnhancedMonitoring', :type => :boolean
attribute :supports_iam_database_authentication, :aliases => 'SupportsIAMDatabaseAuthentication', :type => :boolean
attribute :supports_performance_insights, :aliases => 'SupportsPerformanceInsights', :type => :boolean
attribute :supports_storage_encryption, :aliases => 'SupportsStorageEncryption', :type => :boolean
attribute :storage_type, :aliases => 'StorageType'
end
end
end

View file

@ -19,12 +19,13 @@ module Fog
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 'MultiAZCapable', 'ReadReplicaCapable', 'Vpc', 'SupportsIops',
'SupportsEnhancedMonitoring', 'SupportsIAMDatabaseAuthentication',
'SupportsPerformanceInsights', 'SupportsStorageEncryption' then @db_instance_option[name] = to_boolean(value)
when 'Engine', 'LicenseModel', 'EngineVersion', 'DBInstanceClass', 'StorageType' 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 = {}