mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +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:
@@ -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'"
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user