From 6a0d9d1498f8fdff1872e71b1185c1d2d2b170a8 Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Wed, 2 Aug 2017 02:12:09 +0530 Subject: [PATCH] Fix junos_logging integration test failure (#27605) --- lib/ansible/modules/network/junos/junos_logging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/junos/junos_logging.py b/lib/ansible/modules/network/junos/junos_logging.py index 06c6343e63..1be8e3436c 100644 --- a/lib/ansible/modules/network/junos/junos_logging.py +++ b/lib/ansible/modules/network/junos/junos_logging.py @@ -217,12 +217,14 @@ def main(): param_to_xpath_map.update([ ('name', {'xpath': 'name', 'is_key': True, 'top': dest}), ('facility', {'xpath': 'name', 'is_key': is_facility_key, 'top': field_top}), - ('level', {'xpath': module.params.get('level'), 'tag_only': True, 'top': field_top}), ('size', {'xpath': 'size', 'leaf_only': True, 'is_key': True, 'top': 'archive'}), ('files', {'xpath': 'files', 'leaf_only': True, 'is_key': True, 'top': 'archive'}), ('rotate_frequency', {'xpath': 'log-rotate-frequency', 'leaf_only': True}), ]) + if module.params.get('level'): + param_to_xpath_map['level'] = {'xpath': module.params.get('level'), 'tag_only': True, 'top': field_top} + validate_param_values(module, param_to_xpath_map) want = map_params_to_obj(module, param_to_xpath_map)