Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create_cluster(
return response

# TODO: Wrap create_cluster_snapshot
def cluster_status(self, cluster_identifier: str) -> str:
def cluster_status(self, cluster_identifier: str) -> Any | None:
"""
Get status of a cluster.

Expand All @@ -92,7 +92,7 @@ def cluster_status(self, cluster_identifier: str) -> str:
except self.conn.exceptions.ClusterNotFoundFault:
return "cluster_not_found"

async def cluster_status_async(self, cluster_identifier: str) -> str:
async def cluster_status_async(self, cluster_identifier: str) -> Any | None:
async with await self.get_async_conn() as client:
response = await client.describe_clusters(ClusterIdentifier=cluster_identifier)
return response["Clusters"][0]["ClusterStatus"] if response else None
Expand Down Expand Up @@ -139,7 +139,7 @@ def describe_cluster_snapshots(self, cluster_identifier: str) -> list[str] | Non
snapshots.sort(key=lambda x: x["SnapshotCreateTime"], reverse=True)
return snapshots

def restore_from_cluster_snapshot(self, cluster_identifier: str, snapshot_identifier: str) -> str:
def restore_from_cluster_snapshot(self, cluster_identifier: str, snapshot_identifier: str) -> Any | None:
"""
Restore a cluster from its snapshot.

Expand All @@ -160,7 +160,7 @@ def create_cluster_snapshot(
cluster_identifier: str,
retention_period: int = -1,
tags: list[Any] | None = None,
) -> str:
) -> Any | None:
"""
Create a snapshot of a cluster.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class NodegroupInputs:
class PossibleTestResults(Enum):
"""Possible test results."""

SUCCESS: str = "SUCCESS"
FAILURE: str = "FAILURE"
SUCCESS = "SUCCESS"
FAILURE = "FAILURE"


class ClusterAttributes:
Expand Down