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

Merge pull request #163 from engineyard/multi-az-combo-error

raise InvalidParameterCombination error
This commit is contained in:
Josh Lane 2015-08-07 14:38:12 -07:00
commit fdf71a9ed1
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@ module Fog
extend Fog::AWS::CredentialFetcher::ServiceMethods extend Fog::AWS::CredentialFetcher::ServiceMethods
class IdentifierTaken < Fog::Errors::Error; end class IdentifierTaken < Fog::Errors::Error; end
class InvalidParameterCombination < Fog::Errors::Error; end
class AuthorizationAlreadyExists < Fog::Errors::Error; end class AuthorizationAlreadyExists < Fog::Errors::Error; end

View file

@ -78,6 +78,10 @@ module Fog
end end
end end
if !!options["MultiAZ"] && !!options["AvailabilityZone"]
raise Fog::AWS::RDS::InvalidParameterCombination.new('Requesting a specific availability zone is not valid for Multi-AZ instances.')
end
data = { data = {
"AllocatedStorage" => options["AllocatedStorage"], "AllocatedStorage" => options["AllocatedStorage"],
"AutoMinorVersionUpgrade" => options["AutoMinorVersionUpgrade"].nil? ? true : options["AutoMinorVersionUpgrade"], "AutoMinorVersionUpgrade" => options["AutoMinorVersionUpgrade"].nil? ? true : options["AutoMinorVersionUpgrade"],
@ -98,7 +102,7 @@ module Fog
"Iops" => options["Iops"], "Iops" => options["Iops"],
"LicenseModel" => "general-public-license", "LicenseModel" => "general-public-license",
"MasterUsername" => options["MasterUsername"], "MasterUsername" => options["MasterUsername"],
"MultiAZ" => !!options['MultiAZ'], "MultiAZ" => !!options["MultiAZ"],
"PendingModifiedValues" => { "MasterUserPassword" => "****" }, # This clears when is available "PendingModifiedValues" => { "MasterUserPassword" => "****" }, # This clears when is available
"PreferredBackupWindow" => options["PreferredBackupWindow"] || "08:00-08:30", "PreferredBackupWindow" => options["PreferredBackupWindow"] || "08:00-08:30",
"PreferredMaintenanceWindow" => options["PreferredMaintenanceWindow"] || "mon:04:30-mon:05:00", "PreferredMaintenanceWindow" => options["PreferredMaintenanceWindow"] || "mon:04:30-mon:05:00",