mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
move imports from functions to the top of the file (#11396)
* move imports from functions to the top of the file * add changelog frag * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
defd15609c
commit
c8356981bb
7 changed files with 21 additions and 27 deletions
|
|
@ -368,6 +368,8 @@ snapshots:
|
|||
"""
|
||||
|
||||
|
||||
import time
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.opennebula import OpenNebulaModule
|
||||
|
||||
|
||||
|
|
@ -489,8 +491,6 @@ class ImageModule(OpenNebulaModule):
|
|||
return result
|
||||
|
||||
def wait_for_ready(self, image_id, wait_timeout=60):
|
||||
import time
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
while (time.time() - start_time) < wait_timeout:
|
||||
|
|
@ -507,8 +507,6 @@ class ImageModule(OpenNebulaModule):
|
|||
self.module.fail_json(msg="Wait timeout has expired!")
|
||||
|
||||
def wait_for_delete(self, image_id, wait_timeout=60):
|
||||
import time
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
while (time.time() - start_time) < wait_timeout:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue