a716fe97e3
* Fix nxos_switchport (#37328) (cherry picked from commitff57fd0bb4
) * Fix nxos_l2_interface and test typo (#37336) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitba5e562c76
) * fix ios_l2_interface (#37389) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitdd37857884
) * fix required args for nxos_snapshot and docs improvement (#37232) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commita10df8b0b5
) * add nxos_snapshot test for missing required param (#37248) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit2501834c42
) * Ensure network_cli nxos test is run only once - remove unnecessary files (#37462) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit957ab02e52
) * Integration Tests only: nxos_user (#37852) * add new integration file to nxos_user * fix shippable error * change nxapi to connection * review comments (cherry picked from commit63da50e1d8
) * fix UnboundLocalError nxos_bgp_af module (#37610) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit00abe6dbe7
) * Fix nxos_vrf issues (#37092) * fix nxos_vrf issues * fix doc (cherry picked from commitdc61f4c6b1
) * fix nxos_vrf_af issues (#37211) (cherry picked from commit74e79d9f5e
) * fix nxos_udld issues (#37418) (cherry picked from commit05b266cc66
) * fix nxos_vlan issues (#38008) (cherry picked from commit6f2cb28bb9
) * add changelog Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
160 lines
3.2 KiB
YAML
160 lines
3.2 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vrf_af sanity test"
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
when: ansible_connection == "local"
|
|
|
|
- name: Configure feature bgp
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: enabled
|
|
provider: "{{ connection }}"
|
|
|
|
- name: Configure feature nv overlay
|
|
nxos_config:
|
|
commands: "feature nv overlay"
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- name: Configure nv overlay evpn
|
|
nxos_config:
|
|
commands: "nv overlay evpn"
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- block:
|
|
- name: Configure vrf af ipv4
|
|
nxos_vrf_af: &configure4
|
|
vrf: ansible
|
|
afi: ipv4
|
|
route_target_both_auto_evpn: True
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf_af: *configure4
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- name: Configure vrf af ipv6
|
|
nxos_vrf_af: &configure6
|
|
vrf: ansible
|
|
afi: ipv6
|
|
route_target_both_auto_evpn: True
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf_af: *configure6
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Remove router target4
|
|
nxos_vrf_af: &rrt4
|
|
vrf: ansible
|
|
afi: ipv4
|
|
route_target_both_auto_evpn: False
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf_af: *rrt4
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Remove router target6
|
|
nxos_vrf_af: &rrt6
|
|
vrf: ansible
|
|
afi: ipv6
|
|
route_target_both_auto_evpn: False
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf_af: *rrt6
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Remove vrf af v6
|
|
nxos_vrf_af: &remove6
|
|
vrf: ansible
|
|
afi: ipv6
|
|
route_target_both_auto_evpn: True
|
|
state: absent
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vrf_af: *remove6
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Remove vrf af v4
|
|
nxos_vrf_af: &remove4
|
|
vrf: ansible
|
|
afi: ipv4
|
|
route_target_both_auto_evpn: True
|
|
state: absent
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vrf_af: *remove4
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
when: not platform is search("N35")
|
|
|
|
always:
|
|
- name: Remove vrf
|
|
nxos_config:
|
|
commands: "no vrf context ansible"
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- name: Remove nv overlay evpn
|
|
nxos_config:
|
|
commands: "no nv overlay evpn"
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- name: Remove feature nv overlay
|
|
nxos_config:
|
|
commands: "no feature nv overlay"
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- name: Remove feature bgp
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: disabled
|
|
provider: "{{ connection }}"
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vrf_af sanity test"
|