Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable auto neg on test interfaces on IOS-XE #32241

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 21 additions & 12 deletions test/integration/targets/ios_interface/tests/cli/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,29 @@
authorize: yes
register: show_version_result

- name: Set test interface to GigabitEthernet0/1 if we are on Cisco IOS
set_fact: test_interface=GigabitEthernet0/1
- block:
- name: Set test interface to GigabitEthernet0/1 as we are on Cisco IOS
set_fact: test_interface=GigabitEthernet0/1
- name: Set test interface 2 to GigabitEthernet0/2 as we are on Cisco IOS
set_fact: test_interface2=GigabitEthernet0/2
when: "'Cisco IOS' in show_version_result.stdout[0]"

- name: Set test interface 2 to GigabitEthernet0/2 if we are on Cisco IOS
set_fact: test_interface2=GigabitEthernet0/2
when: "'Cisco IOS' in show_version_result.stdout[0]"

- name: Set test interface to GigabitEthernet2 if we are on Cisco IOS-XE
set_fact: test_interface=GigabitEthernet2
when: "'Cisco IOS-XE' in show_version_result.stdout[0]"

- name: Set test interface 2 to GigabitEthernet3 if we are on Cisco IOS-XE
set_fact: test_interface2=GigabitEthernet3
- block:
- name: Set test interface to GigabitEthernet2 as we are on Cisco IOS-XE
set_fact: test_interface=GigabitEthernet2
- name: Disable autonegotiation on GigabitEthernet2
ios_config:
lines:
- no negotiation auto
parents: int GigabitEthernet2

- name: Set test interface 2 to GigabitEthernet3 as we are on Cisco IOS-XE
set_fact: test_interface2=GigabitEthernet3
- name: Disable autonegotiation on GigabitEthernet3
ios_config:
lines:
- no negotiation auto
parents: int GigabitEthernet3
when: "'Cisco IOS-XE' in show_version_result.stdout[0]"

- name: Configure interface (setup)
Expand Down