]>
Commit | Line | Data |
---|---|---|
1 | my $base = load('loopback'); | |
2 | sub wanted($) { | |
3 | my ($ip) = @_; | |
4 | return $base . <<"IFACES"; | |
5 | auto eth0 | |
6 | iface eth0 inet manual | |
7 | ||
8 | auto eth1 | |
9 | iface eth1 inet manual | |
10 | ||
11 | auto eth2 | |
12 | iface eth2 inet manual | |
13 | ||
14 | auto eth3 | |
15 | iface eth3 inet manual | |
16 | ||
17 | auto eth4 | |
18 | iface eth4 inet manual | |
19 | ||
20 | auto eth5 | |
21 | iface eth5 inet manual | |
22 | ||
23 | iface eth6 inet manual | |
24 | ||
25 | iface eth7 inet manual | |
26 | ||
27 | iface bond0 inet manual | |
28 | bond-slaves eth0 eth1 | |
29 | bond-miimon 100 | |
30 | bond-mode balance-alb | |
31 | ||
32 | auto bond1 | |
33 | iface bond1 inet static | |
34 | address 10.10.10.$ip/24 | |
35 | bond-slaves eth2 eth3 | |
36 | bond-miimon 100 | |
37 | bond-mode balance-alb | |
38 | # pre-up ifconfig bond1 mtu 9000 | |
39 | ||
40 | auto bond2 | |
41 | iface bond2 inet manual | |
42 | bond-slaves eth4 eth5 | |
43 | bond-miimon 100 | |
44 | bond-mode balance-alb | |
45 | # Private networking | |
46 | ||
47 | iface unknown3 inet static | |
48 | address 0.0.0.0 | |
49 | ||
50 | iface unknown4 inet static | |
51 | address 0.0.0.0 | |
52 | ||
53 | iface unknown5 inet static | |
54 | address 0.0.0.0 | |
55 | ||
56 | auto vmbr0 | |
57 | iface vmbr0 inet static | |
58 | address 192.168.100.13/24 | |
59 | gateway 192.168.100.1 | |
60 | bridge-ports bond0 | |
61 | bridge-stp off | |
62 | bridge-fd 0 | |
63 | ||
64 | auto unknown6 | |
65 | iface unknown6 inet static | |
66 | address 10.10.11.13/24 | |
67 | pre-up ifconfig bond0 up | |
68 | ||
69 | auto vmbr3 | |
70 | iface vmbr3 inet manual | |
71 | bridge-ports unknown3 | |
72 | bridge-stp off | |
73 | bridge-fd 0 | |
74 | pre-up ifup unknown3 | |
75 | ||
76 | auto vmbr4 | |
77 | iface vmbr4 inet manual | |
78 | bridge-ports unknown4 | |
79 | bridge-stp off | |
80 | bridge-fd 0 | |
81 | pre-up ifup unknown4 | |
82 | ||
83 | auto vmbr5 | |
84 | iface vmbr5 inet manual | |
85 | bridge-ports unknown5 | |
86 | bridge-stp off | |
87 | bridge-fd 0 | |
88 | pre-up ifup unknown5 | |
89 | ||
90 | IFACES | |
91 | } | |
92 | ||
93 | r(wanted(13)); | |
94 | update_iface('bond1', [ { family => 'inet', address => '10.10.10.11/24' } ]); | |
95 | expect wanted(11); | |
96 | ||
97 | 1; |