mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: cs_router: fix router not found and async polling in reboot
This commit is contained in:
parent
5979f2543f
commit
c896aab5e3
1 changed files with 4 additions and 3 deletions
|
@ -205,6 +205,7 @@ class AnsibleCloudStackRouter(AnsibleCloudStack):
|
|||
args['projectid'] = self.get_project(key='id')
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
args['listall'] = True
|
||||
|
||||
routers = self.cs.listRouters(**args)
|
||||
if routers:
|
||||
|
@ -271,9 +272,9 @@ class AnsibleCloudStackRouter(AnsibleCloudStack):
|
|||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
|
||||
poll_async = self.module.params.get('poll_async')
|
||||
if poll_async:
|
||||
router = self.poll_job(res, 'router')
|
||||
poll_async = self.module.params.get('poll_async')
|
||||
if poll_async:
|
||||
router = self.poll_job(res, 'router')
|
||||
return router
|
||||
|
||||
def absent_router(self):
|
||||
|
|
Loading…
Reference in a new issue