mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-06 02:28:53 +00:00
Move utility functions out of basic.py (#51715)
Move the following methods to lib/anisble/module_utils/common/validation.py: - _count_terms() - _check_mutually_exclusive() - _check_required_one_of() - _check_required_together() - _check_required_by() - _check_required_arguments() - _check_required_if - fail_on_missing_params() --> create check_missing_parameters()
This commit is contained in:
parent
34b928d283
commit
43a44e6f35
12 changed files with 461 additions and 97 deletions
|
|
@ -10,7 +10,7 @@
|
|||
assert:
|
||||
that:
|
||||
- ip_address is failed
|
||||
- 'ip_address.msg == "parameters are mutually exclusive: vpc, network"'
|
||||
- 'ip_address.msg == "parameters are mutually exclusive: vpc|network"'
|
||||
|
||||
- name: run test for network setup
|
||||
import_tasks: network.yml
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@
|
|||
assert:
|
||||
that:
|
||||
- roleperm is failed
|
||||
- 'roleperm.msg == "parameters are mutually exclusive: permission, parent"'
|
||||
- 'roleperm.msg == "parameters are mutually exclusive: permission|parent"'
|
||||
|
||||
- name: test fail if parent does not exist
|
||||
cs_role_permission:
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
that:
|
||||
- ipr is not successful
|
||||
- ipr is not changed
|
||||
- 'ipr.msg == "parameters are mutually exclusive: account, project"'
|
||||
- 'ipr.msg == "parameters are mutually exclusive: account|project"'
|
||||
|
||||
- name: test create a VLAN IP RANGE in check mode
|
||||
cs_vlan_ip_range:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- network is failed
|
||||
- "network.msg == 'parameters are mutually exclusive: ipam_config, ipam_options'"
|
||||
- "network.msg == 'parameters are mutually exclusive: ipam_config|ipam_options'"
|
||||
|
||||
- name: Create network with deprecated custom IPAM config
|
||||
docker_network:
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
- "result.msg == 'parameters are mutually exclusive: list_all, state'"
|
||||
- "result.msg == 'parameters are mutually exclusive: list_all|state'"
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue