cloudstack: cs_instance: use mutually_exlusive of AnsibleModule

This commit is contained in:
Rene Moser 2015-08-11 16:10:49 +02:00 committed by Matt Clay
parent f4f20c7c20
commit 88488c26ef

View file

@ -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'],
),