mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Fix netconf port validation and minor doc change (#24210)
* Fix netconf port validation and minor doc change Add check to confirm if `validate_*` funcion is callable. Add `config_format` in `junos_facts` documentation * Fix review comments
This commit is contained in:
parent
7195c31753
commit
73c24001d9
2 changed files with 10 additions and 1 deletions
|
@ -139,7 +139,7 @@ def map_params_to_obj(module):
|
|||
for key, value in iteritems(obj):
|
||||
# validate the param value (if validator func exists)
|
||||
validator = globals().get('validate_%s' % key)
|
||||
if all((value, validator)):
|
||||
if callable(validator):
|
||||
validator(value, module)
|
||||
|
||||
return obj
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue