Fix rds.describe_db_snapshots bugs
* Correctly return all snapshots for a given DBInstanceIdentifier. * If an invalid DBInstanceIdentifier is passed in, return an empty array instead of raising a ClientError (which is what AWS actually does). Fixes #1569
This commit is contained in:
parent
ba3c9db8a7
commit
37d6388640
2 changed files with 8 additions and 4 deletions
|
|
@ -722,10 +722,11 @@ class RDS2Backend(BaseBackend):
|
|||
|
||||
def describe_snapshots(self, db_instance_identifier, db_snapshot_identifier):
|
||||
if db_instance_identifier:
|
||||
db_instance_snapshots = []
|
||||
for snapshot in self.snapshots.values():
|
||||
if snapshot.database.db_instance_identifier == db_instance_identifier:
|
||||
return [snapshot]
|
||||
raise DBSnapshotNotFoundError()
|
||||
db_instance_snapshots.append(snapshot)
|
||||
return db_instance_snapshots
|
||||
|
||||
if db_snapshot_identifier:
|
||||
if db_snapshot_identifier in self.snapshots:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue