]> git.proxmox.com Git - pve-common.git/blobdiff - test/etc_network_interfaces/t.create_network.pl
Inotify : add vxlan interface support
[pve-common.git] / test / etc_network_interfaces / t.create_network.pl
index 22d6c85b54944921d3380cbb8bc780352939f3d7..edc15fddfe31380d0f5793383d43a3dacce4a76a 100644 (file)
@@ -8,6 +8,11 @@ r(load('brbase'));
 my $ip = '192.168.0.2';
 my $nm = '255.255.255.0';
 my $gw = '192.168.0.1';
+my $svcnodeip = '239.192.105.237';
+my $physdev = 'eth0';
+my $remoteip1 = '192.168.0.3';
+my $remoteip2 = '192.168.0.4';
+
 
 $config->{ifaces}->{eth1} = {
     type => 'eth',
@@ -19,6 +24,35 @@ $config->{ifaces}->{eth1} = {
     autostart => 1
 };
 
+$config->{ifaces}->{vxlan1} = {
+    type => 'vxlan',
+    method => 'manual',
+    families => ['inet'],
+    'vxlan-id' => 1,
+    'vxlan-svcnodeip' => $svcnodeip,
+    'vxlan-physdev' => $physdev,
+    autostart => 1
+};
+
+$config->{ifaces}->{vxlan2} = {
+    type => 'vxlan',
+    method => 'manual',
+    families => ['inet'],
+    'vxlan-id' => 2,
+    'vxlan-local-tunnelip' => $ip,
+    autostart => 1
+};
+
+$config->{ifaces}->{vxlan3} = {
+    type => 'vxlan',
+    method => 'manual',
+    families => ['inet'],
+    'vxlan-id' => 3,
+    'vxlan-remoteip' => [$remoteip1, $remoteip2],
+    autostart => 1
+};
+
+
 expect load('loopback') . <<"CHECK";
 source-directory interfaces.d
 
@@ -35,9 +69,26 @@ iface vmbr0 inet static
        address  10.0.0.2
        netmask  255.255.255.0
        gateway  10.0.0.1
-       bridge_ports eth0
-       bridge_stp off
-       bridge_fd 0
+       bridge-ports eth0
+       bridge-stp off
+       bridge-fd 0
+
+auto vxlan1
+iface vxlan1 inet manual
+       vxlan-id 1
+       vxlan-svcnodeip $svcnodeip
+       vxlan-physdev $physdev
+
+auto vxlan2
+iface vxlan2 inet manual
+       vxlan-id 2
+       vxlan-local-tunnelip $ip
+
+auto vxlan3
+iface vxlan3 inet manual
+       vxlan-id 3
+       vxlan-remoteip $remoteip1
+       vxlan-remoteip $remoteip2
 
 CHECK
 
@@ -78,9 +129,9 @@ iface vmbr0 inet static
        address  10.0.0.2
        netmask  255.255.255.0
        gateway  10.0.0.1
-       bridge_ports eth0
-       bridge_stp off
-       bridge_fd 0
+       bridge-ports eth0
+       bridge-stp off
+       bridge-fd 0
 
 CHECK