From eb3ef5f76e391016a2e23edd5d5cc19c8cbcd2a8 Mon Sep 17 00:00:00 2001 From: Jitendra Yejare Date: Mon, 5 Aug 2024 00:15:33 +0530 Subject: [PATCH] GCE stop and remove operations needs explicit zone The `is_zone_operation_done` of class `system` does not `_zone` attribute set and hence the delete operation has been failing for missing `zone` even though the operation was performed successfully in the background. --- wrapanapi/systems/google.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapanapi/systems/google.py b/wrapanapi/systems/google.py index f6aaf560..18844c00 100644 --- a/wrapanapi/systems/google.py +++ b/wrapanapi/systems/google.py @@ -154,7 +154,7 @@ def delete(self, timeout=360): ).execute() wait_for( - lambda: self.system.is_zone_operation_done(operation["name"]), + lambda: self.system.is_zone_operation_done(operation["name"], zone=self.zone), delay=0.5, num_sec=timeout, message=f"Delete {self.name}", @@ -186,7 +186,7 @@ def stop(self): project=self._project, zone=self.zone, instance=self.name ).execute() wait_for( - lambda: self.system.is_zone_operation_done(operation["name"]), + lambda: self.system.is_zone_operation_done(operation["name"], zone=self.zone), message=f"stop operation done {self.name}", timeout=360, )