]> git.proxmox.com Git - pve-common.git/blobdiff - test/etc_network_interfaces/t.create_network.pl
cgroup: cpu quota: fix resetting period length for v1
[pve-common.git] / test / etc_network_interfaces / t.create_network.pl
index b363f167e8833edda04985cbe0d9cda75b308727..b8da5137bba162526fce2ceb66e02a4020851df9 100644 (file)
@@ -3,6 +3,8 @@ eth0:
 eth1:
 eth2:
 eth3:
+eth4:
+eth5:
 /proc/net/dev
 
 r(load('brbase'));
@@ -11,8 +13,7 @@ r(load('brbase'));
 # Variables used for the various interfaces:
 #
 
-my $ip = '192.168.0.2';
-my $nm = '255.255.255.0';
+my $ip = '192.168.0.2/24';
 my $gw = '192.168.0.1';
 my $svcnodeip = '239.192.105.237';
 my $physdev = 'eth0';
@@ -26,9 +27,8 @@ my $remoteip2 = '192.168.0.4';
 my $vmbr0_part = <<"PART";
 auto vmbr0
 iface vmbr0 inet static
-       address  10.0.0.2
-       netmask  255.255.255.0
-       gateway  10.0.0.1
+       address 10.0.0.2/24
+       gateway 10.0.0.1
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0
@@ -44,7 +44,6 @@ $config->{ifaces}->{eth1} = {
     type => 'eth',
     method => 'static',
     address => $ip,
-    netmask => $nm,
     gateway => $gw,
     families => ['inet'],
     autostart => 1
@@ -53,9 +52,8 @@ $config->{ifaces}->{eth1} = {
 my $eth1_part = <<"PART";
 auto eth1
 iface eth1 inet static
-       address  $ip
-       netmask  $nm
-       gateway  $gw
+       address $ip
+       gateway $gw
 PART
 chomp $eth1_part;
 
@@ -70,6 +68,10 @@ iface eth2 inet manual
 
 iface eth3 inet manual
 
+iface eth4 inet manual
+
+iface eth5 inet manual
+
 $vmbr0_part
 
 CHECK
@@ -107,10 +109,16 @@ iface eth0 inet manual
 
 $eth1_part
 
+auto eth2
 iface eth2 inet manual
 
+auto eth3
 iface eth3 inet manual
 
+iface eth4 inet manual
+
+iface eth5 inet manual
+
 $bond0_part
 
 $vmbr0_part
@@ -161,10 +169,16 @@ iface eth0 inet manual
 
 $eth1_part
 
+auto eth2
 iface eth2 inet manual
 
+auto eth3
 iface eth3 inet manual
 
+iface eth4 inet manual
+
+iface eth5 inet manual
+
 $bond0_part
 
 $vmbr0_part
@@ -274,10 +288,16 @@ iface eth0 inet manual
 
 $eth1_part
 
+auto eth2
 iface eth2 inet manual
 
+auto eth3
 iface eth3 inet manual
 
+iface eth4 inet manual
+
+iface eth5 inet manual
+
 $bond0_part
 
 $vmbr0_part
@@ -301,6 +321,15 @@ $config->{ifaces}->{'vmbr1.100'} = {
 };
 
 $config->{ifaces}->{'bond0.100'} = {
+    type => 'vlan',
+    mtu => 1300,
+    method => 'manual',
+    families => ['inet'],
+    'vlan-protocol' => '802.1ad',
+    autostart => 1
+};
+
+$config->{ifaces}->{'bond0.100.10'} = {
     type => 'vlan',
     mtu => 1300,
     method => 'manual',
@@ -316,6 +345,58 @@ $config->{ifaces}->{'eth1.100'} = {
     autostart => 1
 };
 
+$config->{ifaces}->{'vmbr4'} = {
+    mtu => 1200,
+    type => 'bridge',
+    method => 'manual',
+    families => ['inet'],
+    bridge_stp => 'off',
+    bridge_fd => 0,
+    bridge_ports => 'bond0.100',
+    autostart => 1
+};
+
+$config->{ifaces}->{'vmbr5'} = {
+    mtu => 1100,
+    type => 'bridge',
+    method => 'manual',
+    families => ['inet'],
+    bridge_stp => 'off',
+    bridge_fd => 0,
+    bridge_ports => 'vmbr4.99',
+    autostart => 1
+};
+
+$config->{ifaces}->{vmbr6} = {
+    ovs_mtu => 1400,
+    type => 'OVSBridge',
+    ovs_ports => 'bond1 ovsintvlan',
+    method => 'manual',
+    families => ['inet'],
+    autostart => 1
+};
+
+$config->{ifaces}->{bond1} = {
+    ovs_mtu => 1300,
+    type => 'OVSBond',
+    ovs_bridge => 'vmbr6',
+    ovs_bonds => 'eth4 eth5',
+    ovs_options => 'bond_mode=active-backup',
+    method => 'manual',
+    families => ['inet'],
+    autostart => 1
+};
+
+$config->{ifaces}->{ovsintvlan} = {
+    ovs_mtu => 1300,
+    type => 'OVSIntPort',
+    ovs_bridge => 'vmbr6',
+    ovs_options => 'tag=14',
+    method => 'manual',
+    families => ['inet'],
+    autostart => 1
+};
+
 expect load('loopback') . <<"CHECK";
 source-directory interfaces.d
 
@@ -323,24 +404,72 @@ iface eth0 inet manual
 
 $eth1_part
 
+auto eth2
 iface eth2 inet manual
 
+auto eth3
 iface eth3 inet manual
 
+auto eth4
+iface eth4 inet manual
+
+auto eth5
+iface eth5 inet manual
+
 auto eth1.100
 iface eth1.100 inet manual
        mtu 1400
 
+allow-vmbr6 ovsintvlan
+iface ovsintvlan inet manual
+       ovs_type OVSIntPort
+       ovs_bridge vmbr6
+       ovs_mtu 1300
+       ovs_options tag=14
+
 $bond0_part
 
+allow-vmbr6 bond1
+iface bond1 inet manual
+       ovs_bonds eth4 eth5
+       ovs_type OVSBond
+       ovs_bridge vmbr6
+       ovs_mtu 1300
+       ovs_options bond_mode=active-backup
+
 auto bond0.100
 iface bond0.100 inet manual
        mtu 1300
+       vlan-protocol 802.1ad
+
+auto bond0.100.10
+iface bond0.100.10 inet manual
+       mtu 1300
 
 $vmbr0_part
 
 $vmbr123_part
 
+auto vmbr4
+iface vmbr4 inet manual
+       bridge-ports bond0.100
+       bridge-stp off
+       bridge-fd 0
+       mtu 1200
+
+auto vmbr5
+iface vmbr5 inet manual
+       bridge-ports vmbr4.99
+       bridge-stp off
+       bridge-fd 0
+       mtu 1100
+
+allow-ovs vmbr6
+iface vmbr6 inet manual
+       ovs_type OVSBridge
+       ovs_ports bond1 ovsintvlan
+       ovs_mtu 1400
+
 auto vmbr1.100
 iface vmbr1.100 inet manual
        mtu 1300
@@ -384,19 +513,21 @@ iface eth0 inet manual
 
 auto eth1
 iface eth1 inet6 static
-       address  $ip
-       netmask  $nm
-       gateway  $gw
+       address $ip/$nm
+       gateway $gw
 
 iface eth2 inet manual
 
 iface eth3 inet manual
 
+iface eth4 inet manual
+
+iface eth5 inet manual
+
 auto vmbr0
 iface vmbr0 inet static
-       address  10.0.0.2
-       netmask  255.255.255.0
-       gateway  10.0.0.1
+       address 10.0.0.2/24
+       gateway 10.0.0.1
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0