Merge "Add retries for deleting VMs"

This commit is contained in:
Zuul 2019-09-05 12:28:46 +00:00 committed by Gerrit Code Review
commit 822e7c5fe4

View File

@ -230,7 +230,12 @@ class Compute(object):
return False return False
def delete_server(self, server): def delete_server(self, server):
for _ in range(1, 5):
try:
self.novaclient.servers.delete(server) self.novaclient.servers.delete(server)
except novaclient.exceptions.NotFound:
break
time.sleep(2)
def find_flavor(self, flavor_type): def find_flavor(self, flavor_type):
try: try: