mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
First simple draft for the deletion verification
This commit is contained in:
parent
f9b4976c02
commit
32d7d34fe5
1 changed files with 7 additions and 1 deletions
|
@ -40,6 +40,7 @@ import base64
|
|||
import logging
|
||||
import yaml
|
||||
import tempfile
|
||||
from time import sleep
|
||||
|
||||
from salt.exceptions import CommandExecutionError
|
||||
from salt.ext.six import iteritems
|
||||
|
@ -692,7 +693,12 @@ def delete_deployment(name, namespace='default', **kwargs):
|
|||
name=name,
|
||||
namespace=namespace,
|
||||
body=body)
|
||||
return api_response.to_dict()
|
||||
mutable_api_response = api_response.to_dict()
|
||||
while show_deployment(name, namespace) is not None:
|
||||
sleep(0.5)
|
||||
else:
|
||||
mutable_api_response['code'] = 200
|
||||
return mutable_api_response
|
||||
except (ApiException, HTTPError) as exc:
|
||||
if isinstance(exc, ApiException) and exc.status == 404:
|
||||
return None
|
||||
|
|
Loading…
Add table
Reference in a new issue