]> 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 d6418f42aacb43d3ae14c91f61ce5ade085c4259..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
@@ -205,7 +219,7 @@ $config->{ifaces}->{vmbr3} = {
     families => ['inet'],
     bridge_stp => 'off',
     bridge_fd => 0,
-    bridge_ports => 'vxlan3.50',
+    bridge_ports => 'vxlan3',
     bridge_vlan_aware => 'yes',
     bridge_vids => '2-10',
     autostart => 1
@@ -229,7 +243,7 @@ iface vmbr2 inet manual
 
 auto vmbr3
 iface vmbr3 inet manual
-       bridge-ports vxlan3.50
+       bridge-ports vxlan3
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
@@ -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
@@ -336,6 +356,47 @@ $config->{ifaces}->{'vmbr4'} = {
     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
 
@@ -343,16 +404,39 @@ 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
@@ -373,6 +457,19 @@ iface vmbr4 inet manual
        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
@@ -416,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