cloudstack: cs_router: add zone param
This commit is contained in:
parent
c896aab5e3
commit
d88e9ab869
1 changed files with 10 additions and 0 deletions
|
@ -57,6 +57,13 @@ options:
|
|||
- Name of the project the router is related to.
|
||||
required: false
|
||||
default: null
|
||||
zone:
|
||||
description:
|
||||
- Name of the zone the router is deployed in.
|
||||
- If not set, all zones are used.
|
||||
required: false
|
||||
default: null
|
||||
version_added: "2.4"
|
||||
state:
|
||||
description:
|
||||
- State of the router.
|
||||
|
@ -205,6 +212,8 @@ class AnsibleCloudStackRouter(AnsibleCloudStack):
|
|||
args['projectid'] = self.get_project(key='id')
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
if self.module.params.get('zone'):
|
||||
args['zoneid'] = self.get_zone(key='id')
|
||||
args['listall'] = True
|
||||
|
||||
routers = self.cs.listRouters(**args)
|
||||
|
@ -349,6 +358,7 @@ def main():
|
|||
domain = dict(default=None),
|
||||
account = dict(default=None),
|
||||
project = dict(default=None),
|
||||
zone=dict(),
|
||||
poll_async = dict(type='bool', default=True),
|
||||
))
|
||||
|
||||
|
|
Loading…
Reference in a new issue