ansible/lib/ansible
Chris Van Heuveln 8c56c116e5 nxos_snmp_user: platform fixes for get_snmp_user (#55832)
* nxos_snmp_user: platform fixes for get_snmp_user

snmp user output behavior varies quite a bit for the different nxos platforms and required several workarounds:

- N5K/N6k
 - These platforms do not support structured output for `show snmp user`.
 - The current code lands in an `except` clause when the output is not structured; so I added a new `get_non_structured_snmp_user` method to scrape the state from the regular cli output if it's present.

- N9K-F
 - The `group` data in the JSON output is different for this platform; it has a different key (just `group` instead of `TABLE_groups` or `group_names`) and it is not indexed
 - For a single group the value is a string, for multiple groups it's a list

- sanity
 - N5K/N6K/N9K-F platforms will reject `no snmp user <name> <role>` when it's the last role defined for the user.
 - workaround is to use `nxos_user` to remove the user

- Changes validated on:
 - `N3K, N3K-F, N35, N6K, N7K, N9K, N9K-F`
 - `6.0(2)A8`
 - `7.0(3)I2, 7.0(3)I4, 7.0(3)I5, 7.0(3)I6, 7.0(3)I7`
 - `7.3(2)D1`
 - `7.3(3)N1, 7.3(4)N1`
 - `8.3(2)`
 - `9.2(2), 9.2(3)`

* fix lint warning
2019-05-10 13:10:49 +05:30
..
cli Make ansible adhoc work with include_role (#56163) 2019-05-08 09:53:24 -04:00
compat Update bundled copy of selectors2 from 1.1.0 to 1.1.1 (#55457) 2019-04-23 11:52:24 -05:00
config Allow config boolean options to default to None (#55951) 2019-05-02 12:09:14 -07:00
errors
executor options not optional for callbacks (#55660) 2019-04-25 22:22:06 -04:00
galaxy Update galaxy cli metadata file templates (#51398) 2019-02-22 00:54:02 -05:00
inventory preserve same order as inventory manager when using host lookup (#55331) 2019-04-18 15:54:03 -04:00
module_utils Hetzner failover IP: refactoring (#56203) 2019-05-10 08:33:51 +02:00
modules nxos_snmp_user: platform fixes for get_snmp_user (#55832) 2019-05-10 13:10:49 +05:30
parsing Migrate command line parsing to argparse (#50610) 2019-04-23 13:54:39 -05:00
playbook unite poll defaults (#55470) 2019-05-01 13:47:50 -05:00
plugins Hetzner failover IP: refactoring (#56203) 2019-05-10 08:33:51 +02:00
template fix combine filter using undefined vars (#55840) 2019-04-30 11:10:19 -04:00
utils Fix loading namespaced doc_fragments from collections (#55249) 2019-05-02 21:15:57 -04:00
vars fixes for stripping (#52930) 2019-03-12 18:18:38 -04:00
__init__.py
constants.py Fine tune sanity (#53544) 2019-03-11 15:12:14 -04:00
context.py Become plugins (#50991) 2019-02-11 11:27:44 -06:00
release.py Cleanup the tree for post-2.8-branch 2019-04-12 12:57:35 -07:00