Browse Source

Add wait for resource cleanup if there is no parent

When using cleanup_resource in base_client it now waits
for actual cleanup of the resource if there is no parent
resource. This is to prevent cleanup of resources that
are still in use by the resource that is being deleted.

Change-Id: Idcad34a085d6f346ef225386bb3cdcd450cd4db7
Story: 2004835
Task: 29029
Tom Stappaerts 3 months ago
parent
commit
e05ba7e4f0
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      octavia_tempest_plugin/services/load_balancer/v2/base_client.py

+ 7
- 0
octavia_tempest_plugin/services/load_balancer/v2/base_client.py View File

@@ -414,6 +414,13 @@ class BaseLBaaSClient(rest_client.RestClient):
414 414
                                     const.ACTIVE,
415 415
                                     self.build_interval,
416 416
                                     self.timeout)
417
+        else:
418
+            LOG.info("Waiting for %s %s to be DELETED...",
419
+                     wait_client.root_tag, wait_id)
420
+            waiters.wait_for_deleted_status_or_not_found(
421
+                wait_func, wait_id, const.PROVISIONING_STATUS,
422
+                CONF.load_balancer.check_interval,
423
+                CONF.load_balancer.check_timeout)
417 424
 
418 425
         LOG.info("Cleanup complete for %s %s...", self.root_tag, obj_id)
419 426
         return return_status

Loading…
Cancel
Save