-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Rewrite tests_bond_options.yml in new testing format
Signed-off-by: Wen Liang <[email protected]>
- Loading branch information
1 parent
9b76608
commit fba403d
Showing
11 changed files
with
256 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: "** TEST check IPv4" | ||
command: ip -4 a s {{ interface }} | ||
register: result | ||
until: "'{{ address }}' in result.stdout" | ||
retries: 20 | ||
delay: 2 | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: "** TEST check IPv6" | ||
command: ip -6 a s {{ controller_device }} | ||
register: result | ||
until: "'{{ address }}' in result.stdout" | ||
retries: 20 | ||
delay: 2 | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: "** TEST check bond settings" | ||
command: cat | ||
/sys/class/net/{{ controller_device }}/bonding/'{{ item.key }}' | ||
register: result | ||
until: "'{{ item.value }}' in result.stdout" | ||
loop: | ||
- {key: 'mode', value: '802.3ad'} | ||
- {key: 'ad_actor_sys_prio', value: '65535'} | ||
- {key: 'ad_actor_system', value: '00:00:5e:00:53:5d'} | ||
- {key: 'ad_select', value: 'stable'} | ||
- {key: 'ad_user_port_key', value: '1023'} | ||
# wokeignore:rule=slave | ||
- {key: 'all_slaves_active', value: '1'} | ||
- {key: 'downdelay', value: '0'} | ||
- {key: 'lacp_rate', value: 'slow'} | ||
- {key: 'lp_interval', value: '128'} | ||
- {key: 'miimon', value: '110'} | ||
- {key: 'num_grat_arp', value: '64'} | ||
- {key: 'resend_igmp', value: '225'} | ||
- {key: 'updelay', value: '0'} | ||
- {key: 'use_carrier', value: '1'} | ||
- {key: 'xmit_hash_policy', value: 'encap2+3'} | ||
changed_when: false | ||
- name: Include the task 'assert_IPv4_present.yml' | ||
include_tasks: assert_IPv4_present.yml | ||
vars: | ||
interface: "{{ controller_device }}" | ||
address: '192.0.2' | ||
- name: Include the task 'assert_IPv6_present.yml' | ||
include_tasks: assert_IPv6_present.yml | ||
vars: | ||
interface: "{{ controller_device }}" | ||
address: '2001' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: "** TEST check bond settings" | ||
command: cat | ||
/sys/class/net/{{ controller_device }}/bonding/'{{ item.key }}' | ||
register: result | ||
until: "'{{ item.value }}' in result.stdout" | ||
loop: | ||
- {key: 'mode', value: 'active-backup'} | ||
- {key: 'arp_interval', value: '60'} | ||
- {key: 'arp_ip_target', value: '192.0.2.128'} | ||
- {key: 'arp_validate', value: 'none'} | ||
- {key: 'primary', value: '{{ dhcp_interface1 }}'} | ||
changed_when: false | ||
- name: Include the task 'assert_IPv4_present.yml' | ||
include_tasks: assert_IPv4_present.yml | ||
vars: | ||
interface: "{{ controller_device }}" | ||
address: '192.0.2' | ||
- name: Include the task 'assert_IPv6_present.yml' | ||
include_tasks: assert_IPv6_present.yml | ||
vars: | ||
interface: "{{ controller_device }}" | ||
address: '2001' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: Include the task 'assert_profile_present.yml' | ||
include_tasks: tasks/assert_profile_present.yml | ||
vars: | ||
profile: "{{ item }}" | ||
loop: | ||
- "{{ controller_profile }}" | ||
- "{{ port1_profile }}" | ||
- "{{ port2_profile }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: Import the task 'assert_device_present.yml' | ||
import_tasks: tasks/assert_device_present.yml | ||
vars: | ||
interface: "{{ controller_device }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: Import the task 'assert_device_present.yml' | ||
import_tasks: tasks/assert_device_present.yml | ||
vars: | ||
interface: "{{ dhcp_interface1 }}" | ||
- name: Import the task 'assert_device_present.yml' | ||
import_tasks: tasks/assert_device_present.yml | ||
vars: | ||
interface: "{{ dhcp_interface2 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
--- | ||
- name: Clean up the test devices and the connection profiles | ||
tags: | ||
- "tests::cleanup" | ||
block: | ||
- name: Import network role | ||
import_role: | ||
name: linux-system-roles.network | ||
vars: | ||
network_connections: | ||
- name: "{{ port2_profile }}" | ||
persistent_state: absent | ||
state: down | ||
- name: "{{ port1_profile }}" | ||
persistent_state: absent | ||
state: down | ||
- name: "{{ controller_profile }}" | ||
persistent_state: absent | ||
state: down | ||
failed_when: false | ||
- name: Delete the device '{{ controller_device }}' | ||
command: ip link del {{ controller_device }} | ||
failed_when: false | ||
changed_when: false | ||
... |
Oops, something went wrong.