cloudstack: cs_instance: use mutually_exlusive of AnsibleModule
This commit is contained in:
parent
aa14dedb8f
commit
713cec4423
1 changed files with 3 additions and 3 deletions
|
@ -385,9 +385,6 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||||
if not template and not iso:
|
if not template and not iso:
|
||||||
self.module.fail_json(msg="Template or ISO is required.")
|
self.module.fail_json(msg="Template or ISO is required.")
|
||||||
|
|
||||||
if template and iso:
|
|
||||||
self.module.fail_json(msg="Template are ISO are mutually exclusive.")
|
|
||||||
|
|
||||||
args = {}
|
args = {}
|
||||||
args['account'] = self.get_account(key='name')
|
args['account'] = self.get_account(key='name')
|
||||||
args['domainid'] = self.get_domain(key='id')
|
args['domainid'] = self.get_domain(key='id')
|
||||||
|
@ -815,6 +812,9 @@ def main():
|
||||||
api_http_method = dict(choices=['get', 'post'], default='get'),
|
api_http_method = dict(choices=['get', 'post'], default='get'),
|
||||||
api_timeout = dict(type='int', default=10),
|
api_timeout = dict(type='int', default=10),
|
||||||
),
|
),
|
||||||
|
mutually_exclusive = (
|
||||||
|
['template', 'iso'],
|
||||||
|
),
|
||||||
required_together = (
|
required_together = (
|
||||||
['api_key', 'api_secret', 'api_url'],
|
['api_key', 'api_secret', 'api_url'],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue