You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible
Sam Doooran 5ecfb19cad
arg_spec - move validator lookup method to a function (#72667)
* arg_spec - move type checking lookup method to a function

* Change get_wanted_type name and behavior

Change the name to get_validator to bette describe what it is doing.

Change the interface to always return a value. This lines up with the behavior of get_*
functions always returning something or None and check_* functions raising an
Exception if something went wrong during the check.

* Add param to check_type_str()

Not meant to be a long term fix, but gets tests passing. More work is needed to figure
out how to solve this cleanly.

* Remove private attribute mapping types to validator

Since the function that needs it has moved to parameters.py, there is no need to have it as
a attribute of AnsibleModule.

Update tests that were referencing the private attribute.

* Use private method for 'str' type

To avoid having to put the string conversion warning behavior in the check_type_str() method,
use the private _check_type_str() method for 'str' type.

Import CHECK_ARGUMENT_TYPES_DISPATCHER for backwards compalitibility and store it as
a private attribute.

Revert changes to support plugins that are referencing serf._CHECK_ARGUMENT_TYPES_DISPATCHER.

* Add changelog

* Change function name to better reflect its... function

* Change dict name to better reflect its contents

CHECK_ARGUMENT_TYPES_DISPATCHER --> DEFAULT_TYPE_VALIDATORS

* Fix changelog
4 years ago
..
_vendor Rename to ansible-core (#72594) 4 years ago
cli Change role argspec file used by ansible-doc (#72927) 4 years ago
collections saner path dir management (#72648) 4 years ago
compat Updated bundled libraries (#70418) 4 years ago
config Improve deprecations (#72697) 4 years ago
errors Add orig_exc context to error messages (#72677) 4 years ago
executor Add implicit role_complete block instead of role._eor (#72208) 4 years ago
galaxy Slight tweak to galaxy source selection (#72685) 4 years ago
inventory Pass the top level dictionaries to combine_vars (#72979) 4 years ago
module_utils arg_spec - move validator lookup method to a function (#72667) 4 years ago
modules systemd - do not overwrite unit name when searching (#72985) 4 years ago
parsing vault: Read stdin data as binary on python3 (#52229) 4 years ago
playbook import_playbook - change additional params to deprecation (#72987) 4 years ago
plugins Fix reset_connection paramiko, winrm, psrp (#72688) 4 years ago
template Use _wrap_native_text only for builtin STRING_TYPE_FILTERS (#71801) 4 years ago
utils saner path dir management (#72648) 4 years ago
vars Fix missing ansible.builtin FQCNs in hardcoded action names (#71824) 4 years ago
__init__.py transparent downstream vendoring (#69850) 4 years ago
constants.py Replace some more FQCNs. 4 years ago
context.py Become plugins (#50991) 5 years ago
keyword_desc.yml Document and warn when max_fail and free are used (#72616) 4 years ago
release.py Bump devel to 2.11.0 (#70121) 4 years ago