8e8b469416
* Fix legacy Nexus 3k integration test and module issues. (#40322) * Add setup ignore_errors for nxos_config test * Fix parse_fan_info for n3k * Skip bidir tests for N3k * Omit vni config for n3k * Skip unsupported nxos_vrf_af test on N3K * Add legacy N3K platform tag (cherry picked from commit63e16431b7
) * Skip N35 and N3L platforms for nxos_evpn_global test (#40333) (cherry picked from commitad69ef88e7
) * add normalize_interface in module_utils and fix nxos_l3_interface module (#40598) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commit0b7932db30
) * nxos_interface: Disable switchport for loopback/svi (#40314) * nxos_interface: Disable switchport for loopback/svi * Replace interface_type with get_interface_type(name) (cherry picked from commitd04a989bd2
) * fixes bug with matching nxos prompts (#40655) This change addresses an issue where the prompt matching regular expressions would not match a prompt if the hostname starts with a numeric value. Before this change, the connection would fail with a socket.timeout() error. This change updates the termnal_stdout_re values to now check for a number. See Github issue #38639 (cherry picked from commitd829ff6993
) * fix nxos_vrf and migrate get_interface_type to module_utils (#40825) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> (cherry picked from commitb4baa2d484
) * nxos_vlan fix Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * changelog nxos bugfixes 2.5.4 Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
101 lines
2.2 KiB
YAML
101 lines
2.2 KiB
YAML
---
|
|
- debug: msg="START connection={{ ansible_connection }} nxos_vrf sanity test"
|
|
- debug: msg="Using provider={{ connection.transport }}"
|
|
when: ansible_connection == "local"
|
|
|
|
- set_fact: intname1="{{ nxos_int1 }}"
|
|
- set_fact: intname2="{{ nxos_int2 }}"
|
|
|
|
- set_fact: rdnd="1:2"
|
|
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
|
|
|
- set_fact: rdd="default"
|
|
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
|
|
|
- set_fact: vnind="5000"
|
|
when: platform is not match("N35|N7K|N3L")
|
|
|
|
- set_fact: vnid="default"
|
|
when: platform is not match("N35|N7K|N3L")
|
|
|
|
- name: "Enable feature BGP"
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: enabled
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- block:
|
|
- name: Ensure ntc VRF exists on switch
|
|
nxos_vrf: &configure
|
|
vrf: ntc
|
|
admin_state: down
|
|
description: testing
|
|
vni: "{{vnind|default(omit)}}"
|
|
rd: "{{rdnd|default(omit)}}"
|
|
interfaces:
|
|
- "{{ intname1 }}"
|
|
- "{{ intname2 }}"
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: &true
|
|
that:
|
|
- "result.changed == true"
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf: *configure
|
|
register: result
|
|
|
|
- assert: &false
|
|
that:
|
|
- "result.changed == false"
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: Remove config
|
|
nxos_vrf: &remconf
|
|
vrf: ntc
|
|
admin_state: up
|
|
vni: "{{vnid|default(omit)}}"
|
|
rd: "{{rdd|default(omit)}}"
|
|
interfaces: default
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- name: "Conf Idempotence"
|
|
nxos_vrf: *remconf
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
- name: Ensure ntc VRF does not exist on switch
|
|
nxos_vrf: &remove
|
|
vrf: ntc
|
|
state: absent
|
|
provider: "{{ connection }}"
|
|
register: result
|
|
|
|
- assert: *true
|
|
|
|
- pause:
|
|
seconds: 30
|
|
|
|
- name: "Remove Idempotence"
|
|
nxos_vrf: *remove
|
|
register: result
|
|
|
|
- assert: *false
|
|
|
|
always:
|
|
- name: "Disable feature BGP"
|
|
nxos_feature:
|
|
feature: bgp
|
|
state: disabled
|
|
provider: "{{ connection }}"
|
|
ignore_errors: yes
|
|
|
|
- debug: msg="END connection={{ ansible_connection }} nxos_vrf sanity test"
|