cloudstack: cs_instance: use mutually_exlusive of AnsibleModule

reviewable/pr18780/r1
Rene Moser 9 years ago
parent aa14dedb8f
commit 713cec4423

@ -385,9 +385,6 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
if not template and not iso:
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['account'] = self.get_account(key='name')
args['domainid'] = self.get_domain(key='id')
@ -815,6 +812,9 @@ def main():
api_http_method = dict(choices=['get', 'post'], default='get'),
api_timeout = dict(type='int', default=10),
),
mutually_exclusive = (
['template', 'iso'],
),
required_together = (
['api_key', 'api_secret', 'api_url'],
),

Loading…
Cancel
Save