Wait for deleted server to disappear from results
When we delete server wait for it to completely disappear from the results (Nova returns it for some time with the 'DELETED' state). Since tests (and actually also users) not able to really cope with this wait for server to be gone completely. Change-Id: Ie2dde98ae47dd7108d554495d5025df175647d5c
This commit is contained in:
parent
4c186a2ae6
commit
69801f268f
@ -1091,6 +1091,15 @@ class ServerModule(OpenStackModule):
|
||||
server.id,
|
||||
**dict((k, self.params[k])
|
||||
for k in ['wait', 'timeout', 'delete_ips']))
|
||||
# Nova returns server for some time with the "DELETED" state. Our tests
|
||||
# are not able to handle this, so wait for server to really disappear.
|
||||
if self.params['wait']:
|
||||
for count in self.sdk.utils.iterate_timeout(
|
||||
timeout=self.params['timeout'],
|
||||
message="Timeout waiting for server to be absent"
|
||||
):
|
||||
if self.conn.compute.find_server(server.id) is None:
|
||||
break
|
||||
|
||||
def _update(self, server, update):
|
||||
server = self._update_ips(server, update)
|
||||
|
Loading…
Reference in New Issue
Block a user