mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
cloudstack: use poll_job() from utils
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user