ansible/test/units/modules
Chris Van Heuveln 0868fec8bd nxos_vpc: pkl_vrf fixes for #57069 (#57370)
* nxos_vpc: pkl_vrf fixes for #57069

Fixes #57069

- Symptom: When playbooks specify `pkl_vrf: default`, the result is that the cli does not set the `vrf` state.

- Analysis:
 - First issue: 'default' is a reserved word when used with the `peer-keepalive` `vrf` keyword. It refers to the default rib.
   - This is confusing in several ways because `peer-keepalive`'s *default* vrf is the `management` vrf.

 - Second issue: When changing only one optional value (`pkl_vrf`) while other optional values are idempotent (`pkl_src`), the result is that the idempotent values are ignored; unfortunately the device cli *replaces* the entire command, in which case the idempotent values are removed.
   - e.g. playbook specifies this:
     ```
     { pkl_dest: 10.1.1.1, pkl_src: 10.2.2.2, pkl_vrf: my_vrf }
     ```

     ```
     peer-keepalive dest 10.1.1.1 src 10.2.2.2             # original

     peer-keepalive dest 10.1.1.1 src 10.2.2.2 vrf my_vrf  # intended result

     peer-keepalive dest 10.1.1.1 vrf my_vrf               # actual result
     ```

 - Third issue: the `pkl` getter was relying on positional data. This broke when the `udp` keyword nvgen'd where `vrf` used to appear (shifting all keywords to the right).

- Tested on regression platforms: `N3K,N6k,N7K,N9K,N3K-F,N9K-F`

* PEP fixes

* PEP fix 2

* pkl should merge by default, not override

* rmv debugs

* add mike's tests

* fix comments
2019-06-28 16:18:46 +05:30
..
cloud kubevirt: more unit tests (#57739) 2019-06-25 20:06:13 +10:00
crypto New LUKS devices management module (#48991) 2019-02-15 09:25:14 +00:00
files Fixes #34893 (#40166) 2018-05-16 11:09:32 -05:00
messaging Rabbitmq user permission fixes (#49404) 2018-12-07 13:19:08 +00:00
monitoring Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00
net_tools Hetzner failover IP: refactoring (#56203) 2019-05-10 08:33:51 +02:00
network nxos_vpc: pkl_vrf fixes for #57069 (#57370) 2019-06-28 16:18:46 +05:30
notification Add support for hex color in slack module (#49804) 2018-12-12 08:41:49 +00:00
packaging rename rhsm_repository_release to rhsm_release (#53430) 2019-03-21 10:21:45 -05:00
remote_management Adding dell ome device_info module (#53438) 2019-06-10 06:41:48 -04:00
source_control gitlab_runner: Fix idempotency when creating runner (#57833) 2019-06-18 13:12:12 +02:00
storage na_ontap_snapshot_policy: Add ability to multiple schedules (#57366) 2019-06-10 09:24:25 +02:00
system pamd: fix idempotence issue when removing rules (#54105) 2019-04-01 10:18:33 -04:00
web_infrastructure Python 3.8 collections compatibility fixes. 2018-10-08 11:26:37 -07:00
__init__.py
conftest.py fix missing attribs with dirct module execution (#53875) 2019-04-04 09:59:52 -04:00
utils.py Move unit test compat code out of lib/ansible/. (#46996) 2018-10-12 20:01:14 -07:00