Skip to content

Commit

Permalink
Redshift: describe_clusters() now returns the TotalStorageCapacityInM…
Browse files Browse the repository at this point in the history
…egaBytes (#6868)
  • Loading branch information
bblommers authored Sep 29, 2023
1 parent 0698258 commit 504387d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moto/redshift/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def __init__(
self.restored_from_snapshot = restored_from_snapshot
self.kms_key_id = kms_key_id
self.cluster_snapshot_copy_status: Optional[Dict[str, Any]] = None
self.total_storage_capacity = 0

@staticmethod
def cloudformation_name_type() -> str:
Expand Down Expand Up @@ -313,6 +314,7 @@ def to_json(self) -> Dict[str, Any]:
for iam_role_arn in self.iam_roles_arn
],
"KmsKeyId": self.kms_key_id,
"TotalStorageCapacityInMegaBytes": self.total_storage_capacity,
}
if self.restored_from_snapshot:
json_response["RestoreStatus"] = {
Expand Down
1 change: 1 addition & 0 deletions tests/test_redshift/test_redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def test_create_cluster_all_attributes():
assert cluster["ClusterVersion"] == "1.0"
assert cluster["AllowVersionUpgrade"] is True
assert cluster["NumberOfNodes"] == 3
assert cluster["TotalStorageCapacityInMegaBytes"] == 0


@mock_redshift
Expand Down

0 comments on commit 504387d

Please sign in to comment.