mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 06:11:07 -07:00
cloudstack: use poll_job() from utils
This commit is contained in:
parent
03d3baa164
commit
aca98e2f8e
16 changed files with 46 additions and 53 deletions
|
@ -223,7 +223,7 @@ class AnsibleCloudStackStaticNat(AnsibleCloudStack):
|
|||
res = self.cs.disableStaticNat(ipaddressid=ip_address['id'])
|
||||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
self._poll_job(res, 'staticnat')
|
||||
self.poll_job(res, 'staticnat')
|
||||
res = self.cs.enableStaticNat(**args)
|
||||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
|
@ -253,7 +253,7 @@ class AnsibleCloudStackStaticNat(AnsibleCloudStack):
|
|||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
poll_async = self.module.params.get('poll_async')
|
||||
if poll_async:
|
||||
self._poll_job(res, 'staticnat')
|
||||
self.poll_job(res, 'staticnat')
|
||||
return ip_address
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue