mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-03 07:41:30 -07:00
Use module level validation for params
This commit is contained in:
parent
c581d1de8e
commit
7f847cf21f
1 changed files with 1 additions and 2 deletions
|
@ -573,8 +573,6 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||||
'cpuSpeed': cpu_speed,
|
'cpuSpeed': cpu_speed,
|
||||||
'memory': memory,
|
'memory': memory,
|
||||||
}]
|
}]
|
||||||
elif any([cpu, cpu_speed, memory]):
|
|
||||||
self.module.fail_json(msg='cpu, cpu_speed and memory must be used together')
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def deploy_instance(self, start_vm=True):
|
def deploy_instance(self, start_vm=True):
|
||||||
|
@ -865,6 +863,7 @@ def main():
|
||||||
),
|
),
|
||||||
required_together = (
|
required_together = (
|
||||||
['api_key', 'api_secret', 'api_url'],
|
['api_key', 'api_secret', 'api_url'],
|
||||||
|
['cpu', 'cpu_speed', 'memory'],
|
||||||
),
|
),
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue