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/test/units/module_utils/common/arg_spec
Sam Doran 91fb18bf31
[stable-2.13] arg_spec - Return aliases in validation result and update aliases (#77576) (#77601)
When looking up the `no_log` setting for a parameter that is an alias in
`AnsibleModule._log_invocation()`, the alias value will always be an
empty dictionary since `self.aliases` on the `AnsibleModule` instance is
never updated after initialization. Since the `no_log` setting is on the
canonical parameter not the alias, an incorrect warning is issued if the
parameter matches `PASSWORD_MATCH`.

This PR returns the aliases dictionary as an attribute of the
`ValidationResult` and updates the `aliases` attribute on the
`AnsibleModule` instance.
(cherry picked from commit 1b947eaf92)

Co-authored-by: Sam Doran <github@samdoran.com>
4 years ago
..
__init__.py Add argument spec validator (#73335) 5 years ago
test_aliases.py [stable-2.13] arg_spec - Return aliases in validation result and update aliases (#77576) (#77601) 4 years ago
test_module_validate.py Clean up unit tests to prepare for pylint update. (#75473) 4 years ago
test_sub_spec.py Use ArgumentSpecValidator in AnsibleModule (#73703) 5 years ago
test_validate_invalid.py parameters: handle blank values when argument is a list (#77119) 4 years ago
test_validate_valid.py Clean up unit tests to prepare for pylint update. (#75473) 4 years ago