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 #238 from engineyard/aurora

Aurora
This commit is contained in:
Josh Lane 2016-03-23 09:17:03 -07:00
commit 9137c4d1f1
3 changed files with 5 additions and 3 deletions

View file

@ -294,7 +294,7 @@ module Fog
end end
else else
raise case match[:code] raise case match[:code]
when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound', 'SubscriptionNotFound' when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound', 'SubscriptionNotFound', 'DBClusterNotFoundFault'
Fog::AWS::RDS::NotFound.slurp(error, match[:message]) Fog::AWS::RDS::NotFound.slurp(error, match[:message])
when 'DBParameterGroupAlreadyExists' when 'DBParameterGroupAlreadyExists'
Fog::AWS::RDS::IdentifierTaken.slurp(error, match[:message]) Fog::AWS::RDS::IdentifierTaken.slurp(error, match[:message])

View file

@ -26,7 +26,7 @@ module Fog
def create_db_snapshot(identifier, name) def create_db_snapshot(identifier, name)
response = Excon::Response.new response = Excon::Response.new
if data[:snapshots][name] if data[:snapshots][name]
raise Fog::AWS::RDS::IndentifierTaken.new raise Fog::AWS::RDS::IdentifierTaken.new
end end
server_data = data[:servers][identifier] server_data = data[:servers][identifier]

View file

@ -37,8 +37,10 @@ module Fog
unless skip_snapshot unless skip_snapshot
if server_set["ReadReplicaSourceDBInstanceIdentifier"] if server_set["ReadReplicaSourceDBInstanceIdentifier"]
raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a replica instance") raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a replica instance")
elsif server_set["DBClusterIdentifier"] elsif server_set["DBClusterIdentifier"] && snapshot_identifier # for cluster instances, you must pass in skip_snapshot = false, but not specify a snapshot identifier
raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a cluster instance") raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a cluster instance")
elsif server_set["DBClusterIdentifier"] && !snapshot_identifier && !skip_snapshot
#no-op
else else
create_db_snapshot(identifier, snapshot_identifier) create_db_snapshot(identifier, snapshot_identifier)
end end