forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindtomac-team-pre.ks.in
76 lines (58 loc) · 2.97 KB
/
bindtomac-team-pre.ks.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#test name: bindtomac-team-pre
#NOTE: this test is a variant of team test, it is sharing its .sh file (setup of NICs and network boot configuration) so beware of changing it independently of team test
%ksappend repos/default.ks
%include /tmp/ksinclude
%pre
echo "network --device team0 --bootproto dhcp --teamslaves=\"@KSTEST_NETDEV2@'{\\\"prio\\\": -10, \\\"sticky\\\": true}',@KSTEST_NETDEV3@'{\\\"prio\\\": 100}'\" --teamconfig=\"{\\\"runner\\\": {\\\"name\\\": \\\"activebackup\\\"}}\" --activate --onboot=no --bindto=mac" >> /tmp/ksinclude
echo 'network --device team1 --bootproto dhcp --teamslaves=@KSTEST_NETDEV4@,@KSTEST_NETDEV5@ --teamconfig="{\"runner\": {\"name\": \"roundrobin\"}}" --bindto=mac' >> /tmp/ksinclude
%end
bootloader --timeout=1
zerombr
clearpart --all
autopart
keyboard us
lang en
timezone America/New_York
rootpw qweqwe
shutdown
%packages
%end
%post --nochroot
@KSINCLUDE@ post-nochroot-lib-network.sh
check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KSTEST_NETDEV4@ @KSTEST_NETDEV5@ team0 team1
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_device_config_value team0 ONBOOT no connection autoconnect false
check_device_config_value team0_slave_1 ONBOOT no connection autoconnect false
check_device_config_value team0_slave_2 ONBOOT no connection autoconnect false
check_device_config_value team0_slave_1 TEAM_MASTER team0 connection master team0
check_device_config_value team0_slave_1 TEAM_MASTER team0 connection slave-type team
check_device_config_value team0_slave_2 TEAM_MASTER team0 connection master team0
check_device_config_value team0_slave_2 TEAM_MASTER team0 connection slave-type team
check_device_connected team0 yes
check_team_has_slave team0 @KSTEST_NETDEV1@ no
check_team_has_slave team0 @KSTEST_NETDEV2@ yes
check_team_has_slave team0 @KSTEST_NETDEV3@ yes
check_team_has_slave team0 @KSTEST_NETDEV4@ no
check_team_has_slave team0 @KSTEST_NETDEV5@ no
check_team_option team0 "mode activebackup"
check_team_option team0 "priority \(port:@KSTEST_NETDEV2@\) -10"
check_team_option team0 "priority \(port:@KSTEST_NETDEV3@\) 100"
check_device_config_value team1 ONBOOT yes connection autoconnect __NONE
check_device_config_value team1_slave_1 ONBOOT yes connection autoconnect __NONE
check_device_config_value team1_slave_2 ONBOOT yes connection autoconnect __NONE
check_device_config_value team1_slave_1 TEAM_MASTER team1 connection master team1
check_device_config_value team1_slave_1 TEAM_MASTER team1 connection slave-type team
check_device_config_value team1_slave_2 TEAM_MASTER team1 connection master team1
check_device_config_value team1_slave_2 TEAM_MASTER team1 connection slave-type team
check_device_connected team1 no
check_device_config_bound_to_mac team0_slave_1
check_device_config_bound_to_mac team0_slave_2
check_device_config_bound_to_mac team1_slave_1
check_device_config_bound_to_mac team1_slave_2
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end