cloudstack: cs_instance: use mutually_exlusive of AnsibleModule

pull/18777/head
Rene Moser 9 years ago committed by Matt Clay
parent f4f20c7c20
commit 88488c26ef

@ -402,9 +402,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')
@ -853,6 +850,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