mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
This commit is contained in:
parent
e493891d08
commit
63e16431b7
6 changed files with 39 additions and 8 deletions
|
@ -499,7 +499,13 @@ class Legacy(FactsBase):
|
||||||
return objects
|
return objects
|
||||||
|
|
||||||
def parse_fan_info(self, data):
|
def parse_fan_info(self, data):
|
||||||
data = data['fandetails']['TABLE_faninfo']['ROW_faninfo']
|
objects = list()
|
||||||
|
if data.get('fandetails'):
|
||||||
|
data = data['fandetails']['TABLE_faninfo']['ROW_faninfo']
|
||||||
|
elif data.get('fandetails_3k'):
|
||||||
|
data = data['fandetails_3k']['TABLE_faninfo']['ROW_faninfo']
|
||||||
|
else:
|
||||||
|
return objects
|
||||||
objects = list(self.transform_iterable(data, self.FAN_MAP))
|
objects = list(self.transform_iterable(data, self.FAN_MAP))
|
||||||
return objects
|
return objects
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
lines: no ip access-list test
|
lines: no ip access-list test
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
match: none
|
match: none
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: configure sub level command using block replace
|
- name: configure sub level command using block replace
|
||||||
nxos_config:
|
nxos_config:
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
- debug: msg="Using provider={{ connection.transport }}"
|
- debug: msg="Using provider={{ connection.transport }}"
|
||||||
when: ansible_connection == "local"
|
when: ansible_connection == "local"
|
||||||
|
|
||||||
|
- set_fact: bidir="true"
|
||||||
|
- set_fact: bidir="false"
|
||||||
|
when: platform is match("N3L")
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: "Disable feature PIM"
|
- name: "Disable feature PIM"
|
||||||
nxos_feature: &disable_feature
|
nxos_feature: &disable_feature
|
||||||
|
@ -20,7 +24,7 @@
|
||||||
nxos_pim_rp_address: &configgl
|
nxos_pim_rp_address: &configgl
|
||||||
rp_address: "10.1.1.20"
|
rp_address: "10.1.1.20"
|
||||||
group_list: "224.0.0.0/8"
|
group_list: "224.0.0.0/8"
|
||||||
bidir: True
|
bidir: "{{ bidir }}"
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
@ -45,19 +49,23 @@
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Check idempotence rp_address + group_list remove bidir
|
- name: Check idempotence rp_address + group_list remove bidir
|
||||||
nxos_pim_rp_address: *configglnb
|
nxos_pim_rp_address: *configglnb
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Configure rp_address + bidir
|
- name: Configure rp_address + bidir
|
||||||
nxos_pim_rp_address: &configbi
|
nxos_pim_rp_address: &configbi
|
||||||
rp_address: "10.1.1.20"
|
rp_address: "10.1.1.20"
|
||||||
bidir: True
|
bidir: "{{ bidir }}"
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
@ -77,14 +85,18 @@
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Check idempotence rp_address remove bidir
|
- name: Check idempotence rp_address remove bidir
|
||||||
nxos_pim_rp_address: *confignbi
|
nxos_pim_rp_address: *confignbi
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Remove rp_address + group_list
|
- name: Remove rp_address + group_list
|
||||||
nxos_pim_rp_address: &configglr
|
nxos_pim_rp_address: &configglr
|
||||||
|
@ -121,7 +133,7 @@
|
||||||
nxos_pim_rp_address: &configpl
|
nxos_pim_rp_address: &configpl
|
||||||
rp_address: "10.1.1.20"
|
rp_address: "10.1.1.20"
|
||||||
prefix_list: "pim_prefix_list"
|
prefix_list: "pim_prefix_list"
|
||||||
bidir: True
|
bidir: "{{ bidir }}"
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
@ -142,14 +154,18 @@
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Check idempotence rp_address + prefix_list
|
- name: Check idempotence rp_address + prefix_list
|
||||||
nxos_pim_rp_address: *configplnbi
|
nxos_pim_rp_address: *configplnbi
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Remove rp_address + prefix_list
|
- name: Remove rp_address + prefix_list
|
||||||
nxos_pim_rp_address: &configplr
|
nxos_pim_rp_address: &configplr
|
||||||
|
@ -172,7 +188,7 @@
|
||||||
nxos_pim_rp_address: &configrm
|
nxos_pim_rp_address: &configrm
|
||||||
rp_address: "10.1.1.20"
|
rp_address: "10.1.1.20"
|
||||||
route_map: "pim_routemap"
|
route_map: "pim_routemap"
|
||||||
bidir: True
|
bidir: "{{ bidir }}"
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
@ -193,14 +209,18 @@
|
||||||
state: present
|
state: present
|
||||||
provider: "{{ connection }}"
|
provider: "{{ connection }}"
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Check idempotence rp_address + route_map
|
- name: Check idempotence rp_address + route_map
|
||||||
nxos_pim_rp_address: *configrmnbi
|
nxos_pim_rp_address: *configrmnbi
|
||||||
register: result
|
register: result
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
when: platform is not match("N3L")
|
||||||
|
|
||||||
- name: Remove rp_address + route_map
|
- name: Remove rp_address + route_map
|
||||||
nxos_pim_rp_address: &configrmr
|
nxos_pim_rp_address: &configrmr
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
|
||||||
|
|
||||||
- set_fact: vnind="5000"
|
- set_fact: vnind="5000"
|
||||||
when: platform is not match("N35|N7K")
|
when: platform is not match("N35|N7K|N3L")
|
||||||
|
|
||||||
- set_fact: vnid="default"
|
- set_fact: vnid="default"
|
||||||
when: platform is not match("N35|N7K")
|
when: platform is not match("N35|N7K|N3L")
|
||||||
|
|
||||||
- name: "Enable feature BGP"
|
- name: "Enable feature BGP"
|
||||||
nxos_feature:
|
nxos_feature:
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
- assert: *false
|
- assert: *false
|
||||||
|
|
||||||
when: not platform is search("N35")
|
when: not platform is search("N35|N3L")
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Remove vrf
|
- name: Remove vrf
|
||||||
|
|
|
@ -80,6 +80,10 @@
|
||||||
- set_fact: platform="N35NG"
|
- set_fact: platform="N35NG"
|
||||||
when: ( chassis_type is search("C35")) and image_version is search("7.0\(3\)I7")
|
when: ( chassis_type is search("C35")) and image_version is search("7.0\(3\)I7")
|
||||||
|
|
||||||
|
# Set platform to N3L(N3K Legacy) for C3048 platform.
|
||||||
|
- set_fact: platform="N3L"
|
||||||
|
when: ( chassis_type is search("C3048"))
|
||||||
|
|
||||||
# Create matrix of simple keys based on platform
|
# Create matrix of simple keys based on platform
|
||||||
# and image version for use within test playbooks.
|
# and image version for use within test playbooks.
|
||||||
- set_fact: imagetag=""
|
- set_fact: imagetag=""
|
||||||
|
|
Loading…
Reference in a new issue