Fixes nxos_pim_rp_address module idempotence (#29620)

* Fixes nxos_pim_rp_address module idempotence

*  * Adds a note in header comment to indicate no support for absent state
This commit is contained in:
Kedar K 2017-09-15 23:51:34 +05:30 committed by Nathaniel Case
parent 81fd67c10f
commit ff84fc969c

View file

@ -33,7 +33,7 @@ description:
author: Gabriele Gerbino (@GGabriele) author: Gabriele Gerbino (@GGabriele)
notes: notes:
- Tested against NXOSv 7.3.(0)D1(1) on VIRL - Tested against NXOSv 7.3.(0)D1(1) on VIRL
- C(state=absent) remove the whole rp-address configuration, if existing. - C(state=absent) is currently not supported on all platforms.
options: options:
rp_address: rp_address:
description: description:
@ -102,12 +102,12 @@ def get_existing(module, args):
existing['bidir'] = existing.get('bidir') or 'bidir' in line existing['bidir'] = existing.get('bidir') or 'bidir' in line
if len(values) > 2: if len(values) > 2:
value = values[1] value = values[2]
if values[2] == 'route-map': if values[1] == 'route-map':
existing['route_map'] = value existing['route_map'] = value
elif values[2] == 'prefix-list': elif values[1] == 'prefix-list':
existing['prefix_list'] = value existing['prefix_list'] = value
elif values[2] == 'group-list': elif values[1] == 'group-list':
existing['group_list'] = value existing['group_list'] = value
return existing return existing