mirror of https://github.com/ansible/ansible.git
* 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 commentspull/56527/head
parent
760dc19284
commit
0868fec8bd
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"kickstart_ver_str": "7.0(3)I5(3)"
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"TABLE_inv": {
|
||||||
|
"ROW_inv": [
|
||||||
|
{
|
||||||
|
"name": "Chassis",
|
||||||
|
"desc": "Nexus9000 C9504 (4 Slot) Chassis",
|
||||||
|
"productid": "N9K-C9504",
|
||||||
|
"vendorid": "V01",
|
||||||
|
"serialnum": "BR-549"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"vpc-domain-id": "100"
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"TABLE_vrf": {
|
||||||
|
"ROW_vrf": [
|
||||||
|
{
|
||||||
|
"vrf_name": "my_vrf",
|
||||||
|
"vrf_id": 4,
|
||||||
|
"vrf_state": "Up",
|
||||||
|
"vrf_reason": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vrf_name": "default",
|
||||||
|
"vrf_id": 1,
|
||||||
|
"vrf_state": "Up",
|
||||||
|
"vrf_reason": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vrf_name": "management",
|
||||||
|
"vrf_id": 2,
|
||||||
|
"vrf_state": "Up",
|
||||||
|
"vrf_reason": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vrf_name": "test-vrf",
|
||||||
|
"vrf_id": 3,
|
||||||
|
"vrf_state": "Up",
|
||||||
|
"vrf_reason": "--"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vrf_name": "obviously-different-vrf",
|
||||||
|
"vrf_id": 4,
|
||||||
|
"vrf_state": "Up",
|
||||||
|
"vrf_reason": "--"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
vpc domain 100
|
||||||
|
peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf my_vrf
|
Loading…
Reference in New Issue