mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-05-28 12:39:10 -07:00
fix: upgrade ansible version, address test and lint errors
This commit is contained in:
parent
c15b47250d
commit
08ada5354d
216 changed files with 4394 additions and 4262 deletions
|
@ -382,9 +382,13 @@ def wait_for_operation(module, response):
|
|||
def wait_for_completion(status, op_result, module):
|
||||
op_id = navigate_hash(op_result, ['name'])
|
||||
op_uri = async_op_url(module, {'op_id': op_id})
|
||||
sleep_time = 1.0
|
||||
while not status:
|
||||
raise_if_errors(op_result, ['error'], module)
|
||||
time.sleep(1.0)
|
||||
time.sleep(sleep_time)
|
||||
sleep_time *= 2
|
||||
if sleep_time > 10.0:
|
||||
sleep_time = 10.0
|
||||
op_result = fetch_resource(module, op_uri, False)
|
||||
status = navigate_hash(op_result, ['done'])
|
||||
return op_result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue