diff --git a/greenhost_cloud/cosmos.py b/greenhost_cloud/cosmos.py index dca9e230e16c315b8c0d121f276d702c077580e7..14a573f5ef4c9339340f915d164baac04416e4df 100755 --- a/greenhost_cloud/cosmos.py +++ b/greenhost_cloud/cosmos.py @@ -275,7 +275,7 @@ def status_droplet(droplet_id: int): def terminate_droplet(droplet_id: int): """Terminate a droplet by powering it down and deleting it.""" shutdown_droplet(droplet_id) - wait_for_state(droplet_id, 'stopped') + wait_for_state(droplet_id, 'off') delete_droplet(droplet_id) @@ -321,7 +321,7 @@ def terminate_droplets_by_name(name_regex: str, ndays: int = 0, # Lastly delete all droplets: for droplet in terminate_droplets: - wait_for_state(droplet['id'], 'stopped') + wait_for_state(droplet['id'], 'off') delete_droplet(droplet['id'])