2015-10-07 11:42:17 +03:00
my $ base = load ( 'loopback' ) ;
sub wanted ($) {
my ( $ ip ) = @ _ ;
return $ base . << "IFACES" ;
2020-06-07 14:39:47 +03:00
auto eth0
2015-10-07 11:42:17 +03:00
iface eth0 inet manual
2020-06-07 14:39:47 +03:00
auto eth1
2015-10-07 11:42:17 +03:00
iface eth1 inet manual
2020-06-07 14:39:47 +03:00
auto eth2
2015-10-07 11:42:17 +03:00
iface eth2 inet manual
2020-06-07 14:39:47 +03:00
auto eth3
2015-10-07 11:42:17 +03:00
iface eth3 inet manual
2020-06-07 14:39:47 +03:00
auto eth4
2015-10-07 11:42:17 +03:00
iface eth4 inet manual
2020-06-07 14:39:47 +03:00
auto eth5
2015-10-07 11:42:17 +03:00
iface eth5 inet manual
iface eth6 inet manual
iface eth7 inet manual
iface bond0 inet manual
2018-06-20 08:36:55 +03:00
bond - slaves eth0 eth1
bond - miimon 100
bond - mode balance - alb
2015-10-07 11:42:17 +03:00
auto bond1
iface bond1 inet static
2020-02-20 14:55:19 +03:00
address 10.10 .10 . $ ip / 24
2018-06-20 08:36:55 +03:00
bond - slaves eth2 eth3
bond - miimon 100
bond - mode balance - alb
2015-10-07 11:42:17 +03:00
# pre-up ifconfig bond1 mtu 9000
auto bond2
iface bond2 inet manual
2018-06-20 08:36:55 +03:00
bond - slaves eth4 eth5
bond - miimon 100
bond - mode balance - alb
2015-10-07 11:42:17 +03:00
# Private networking
2020-01-25 12:27:04 +03:00
iface unknown3 inet static
2020-02-20 14:55:19 +03:00
address 0.0 .0 .0
2015-10-07 11:42:17 +03:00
2020-01-25 12:27:04 +03:00
iface unknown4 inet static
2020-02-20 14:55:19 +03:00
address 0.0 .0 .0
2015-10-07 11:42:17 +03:00
2020-01-25 12:27:04 +03:00
iface unknown5 inet static
2020-02-20 14:55:19 +03:00
address 0.0 .0 .0
2015-10-07 11:42:17 +03:00
auto vmbr0
iface vmbr0 inet static
2020-02-20 14:55:19 +03:00
address 192.168 .100 .13 / 24
gateway 192.168 .100 .1
2018-06-20 08:36:55 +03:00
bridge - ports bond0
bridge - stp off
bridge - fd 0
2015-10-07 11:42:17 +03:00
2020-01-25 12:27:04 +03:00
auto unknown6
iface unknown6 inet static
2020-02-20 14:55:19 +03:00
address 10.10 .11 .13 / 24
2015-10-07 11:42:17 +03:00
pre - up ifconfig bond0 up
auto vmbr3
iface vmbr3 inet manual
2020-01-25 12:27:04 +03:00
bridge - ports unknown3
2018-06-20 08:36:55 +03:00
bridge - stp off
bridge - fd 0
2020-01-25 12:27:04 +03:00
pre - up ifup unknown3
2015-10-07 11:42:17 +03:00
auto vmbr4
iface vmbr4 inet manual
2020-01-25 12:27:04 +03:00
bridge - ports unknown4
2018-06-20 08:36:55 +03:00
bridge - stp off
bridge - fd 0
2020-01-25 12:27:04 +03:00
pre - up ifup unknown4
2015-10-07 11:42:17 +03:00
auto vmbr5
iface vmbr5 inet manual
2020-01-25 12:27:04 +03:00
bridge - ports unknown5
2018-06-20 08:36:55 +03:00
bridge - stp off
bridge - fd 0
2020-01-25 12:27:04 +03:00
pre - up ifup unknown5
2015-10-07 11:42:17 +03:00
IFACES
}
r ( wanted ( 13 ) ) ;
2020-02-20 14:55:18 +03:00
update_iface ( 'bond1' , [ { family = > 'inet' , address = > '10.10.10.11/24' } ] ) ;
2015-10-07 11:42:17 +03:00
expect wanted ( 11 ) ;
1 ;