You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/units/modules/network/nxos
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
5 years ago
..
fixtures nxos_vpc: pkl_vrf fixes for #57069 (#57370) 5 years ago
__init__.py new module nxos_system (#21627) 8 years ago
nxos_module.py Update bare exceptions to specify Exception. 6 years ago
test_nxos_acl.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_acl_interface.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_banner.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_bfd_global.py nxos_bfd_global / NxosCmdRef initial commit (#56317) 5 years ago
test_nxos_bgp.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_bgp_af.py Move utility functions out of basic.py (#51715) 6 years ago
test_nxos_bgp_neighbor.py nxos_bgp_neighbor: Add bfd support (#56932) 5 years ago
test_nxos_bgp_neighbor_af.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_command.py Revert nxos, ios, iosxr return_timestamps (#56206) 5 years ago
test_nxos_config.py Fix 'defaults' option in the nxos_config module (#51076) 6 years ago
test_nxos_evpn_global.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_evpn_vni.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_feature.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_hsrp.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_interface.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_interface_ospf.py nxos_interface_ospf: Add bfd support (#56807) 5 years ago
test_nxos_l3_interface.py Add support for multiple IPv6 addresses in nxos_l3_interface module (#50892) 6 years ago
test_nxos_nxapi.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_ospf.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_ospf_vrf.py nxos_ospf_vrf: Add 'bfd' support (#57425) 5 years ago
test_nxos_overlay_global.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_pim.py nxos_pim: Add bfd support (#56908) 5 years ago
test_nxos_pim_interface.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_pim_interface_bfd.py nxos_pim_interface: Add 'bfd' support (#57133) 5 years ago
test_nxos_pim_rp_address.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_static_route.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_system.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_vlan.py nxos_vlan: fix broken purge behavior (issue #57101) (#57229) 5 years ago
test_nxos_vpc.py nxos_vpc: pkl_vrf fixes for #57069 (#57370) 5 years ago
test_nxos_vpc_interface.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_vrf.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
test_nxos_vrf_af.py Remove deprecated options from modules (#50246) 6 years ago
test_nxos_vxlan_vtep.py Add new configurations for nxos_vxlan_vtep (#47834) 6 years ago
test_nxos_vxlan_vtep_vni.py Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago