From 6c89c746959374547c91d2091c7755bec22ae02d Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Wed, 4 Aug 2021 10:30:43 +0200 Subject: [PATCH] Follow changed values of droplet status API --- greenhost_cloud/cosmos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/greenhost_cloud/cosmos.py b/greenhost_cloud/cosmos.py index dca9e23..14a573f 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']) -- GitLab