Updating redshift.describe_cluster_snapshots to return multiple snapshots for cluster_identifier (#2216)
This commit is contained in:
parent
a6d9cadac3
commit
2a5f7e15a7
2 changed files with 29 additions and 11 deletions
|
|
@ -640,9 +640,12 @@ class RedshiftBackend(BaseBackend):
|
|||
|
||||
def describe_cluster_snapshots(self, cluster_identifier=None, snapshot_identifier=None):
|
||||
if cluster_identifier:
|
||||
cluster_snapshots = []
|
||||
for snapshot in self.snapshots.values():
|
||||
if snapshot.cluster.cluster_identifier == cluster_identifier:
|
||||
return [snapshot]
|
||||
cluster_snapshots.append(snapshot)
|
||||
if cluster_snapshots:
|
||||
return cluster_snapshots
|
||||
raise ClusterNotFoundError(cluster_identifier)
|
||||
|
||||
if snapshot_identifier:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue