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.
|
|
|
---
|
|
|
|
- debug:
|
|
|
|
msg: "Start nxos_lag_interfaces merged integration tests connection={{ ansible_connection }}"
|
|
|
|
|
|
|
|
- set_fact: test_int1="{{ nxos_int1 }}"
|
|
|
|
- set_fact: test_int2="{{ nxos_int2 }}"
|
|
|
|
|
|
|
|
- name: Enable feature lacp
|
|
|
|
nxos_feature:
|
|
|
|
feature: lacp
|
|
|
|
|
|
|
|
- name: Setup
|
|
|
|
nxos_config:
|
|
|
|
lines:
|
nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:
- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
- fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces
- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
- fixed by removing `port-channel` interfaces with the same ID; e.g.
```
interface port-channel98
switchport
switchport mode trunk
nx-1(config-if)# interface Ethernet1/19
nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```
Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
5 years ago
|
|
|
- no interface port-channel 10
|
|
|
|
ignore_errors: yes
|
nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:
- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
- fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces
- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
- fixed by removing `port-channel` interfaces with the same ID; e.g.
```
interface port-channel98
switchport
switchport mode trunk
nx-1(config-if)# interface Ethernet1/19
nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```
Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
5 years ago
|
|
|
|
|
|
|
- name: setup2
|
|
|
|
nxos_lag_interfaces: &remove_lags
|
|
|
|
state: deleted
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Merged
|
|
|
|
nxos_lag_interfaces: &merged
|
|
|
|
config:
|
|
|
|
- name: port-channel10
|
|
|
|
members:
|
|
|
|
- member: "{{ test_int1 }}"
|
|
|
|
- member: "{{ test_int2 }}"
|
|
|
|
state: merged
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.before|length == 0"
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: Gather LAG interfaces facts
|
|
|
|
nxos_facts:
|
|
|
|
gather_subset:
|
|
|
|
- '!all'
|
|
|
|
- '!min'
|
|
|
|
gather_network_resources: lag_interfaces
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length == 0"
|
|
|
|
|
|
|
|
- name: Idempotence - Merged
|
|
|
|
nxos_lag_interfaces: *merged
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: Teardown
|
nxos_lag_interfaces: fix regression tests (#64119)
This is a change to the regression tests only. These tests were failing because of leftover device settings from previous tests:
- existing `channel-group` configurations on non-test interfaces were included in the before/after counts
- fixed by using the `nxos_lag_interfaces` module with `state: deleted` to remove `channel-group` configur
ations from all interfaces
- existing `L2` `port-channel` interfaces with the same ID as the test `channel-group` ID may prevent configuring `channel-group` on the test ethernet interface
- fixed by removing `port-channel` interfaces with the same ID; e.g.
```
interface port-channel98
switchport
switchport mode trunk
nx-1(config-if)# interface Ethernet1/19
nx-1(config-if)# channel-group 98
command failed: port not compatible [switching port]
```
Fixes passed on `N6K,N7K,N9K,N3K` (internal TBs: `dt-n9k5-1,n6k-77,n7k-99,n7k-j,n3k-173,evergreen-nx-1,greensboro-nx-1,hamilton-nx-1,camden-nx-1`)
5 years ago
|
|
|
nxos_lag_interfaces: *remove_lags
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Disable feature lacp
|
|
|
|
nxos_feature:
|
|
|
|
feature: lacp
|
|
|
|
state: disabled
|