Fix junos_user purge option failures (#28867)

* Fix junos_user pruge option failures

Fixes #25989

Add seperate handling for purge option which
fetches configured users on remote device
and delete the one not present in aggregate
list.

* Minor changes
This commit is contained in:
Ganesh Nalawade 2017-08-31 17:46:13 +05:30 committed by GitHub
parent effa5085ca
commit a6af204cee
3 changed files with 66 additions and 16 deletions

View file

@ -211,7 +211,13 @@ def load_config(module, candidate, warnings, action='merge', format='xml'):
def get_param(module, key):
return module.params[key] or module.params['provider'].get(key)
if module.params.get(key):
value = module.params[key]
elif module.params.get('provider'):
value = module.params['provider'].get(key)
else:
value = None
return value
def map_params_to_obj(module, param_to_xpath_map, param=None):