]> git.proxmox.com Git - pve-network.git/commitdiff
move mtu properties to zone
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 10 Feb 2020 16:26:09 +0000 (17:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Feb 2020 18:03:38 +0000 (19:03 +0100)
PVE/Network/SDN/VnetPlugin.pm
PVE/Network/SDN/Zones/EvpnPlugin.pm
PVE/Network/SDN/Zones/QinQPlugin.pm
PVE/Network/SDN/Zones/VxlanPlugin.pm

index d24a539f41aff4623cb7ef3f1640512d7231048e..bd612092eb410545556307dfc66fa6a269e1b81e 100644 (file)
@@ -66,11 +66,6 @@ sub properties {
             description => "alias name of the vnet",
            optional => 1,
         },
-        mtu => {
-            type => 'integer',
-            description => "mtu",
-           optional => 1,
-        },
         ipv4 => {
             description => "Anycast router ipv4 address.",
             type => 'string', format => 'CIDRv4',
@@ -96,7 +91,6 @@ sub options {
         alias => { optional => 1 },
         ipv4 => { optional => 1 },
         ipv6 => { optional => 1 },
-        mtu => { optional => 1 },
         mac => { optional => 1 },
     };
 }
index b9a941fb5043cfeb3f7639f3d76bf981f4a78a82..056a7b1254227418eb953504190c2e0b72f5d7b2 100644 (file)
@@ -32,6 +32,7 @@ sub options {
         nodes => { optional => 1},
         'vrf-vxlan' => { optional => 0 },
         'controller' => { optional => 0 },
+       mtu => { optional => 1 },
     };
 }
 
@@ -55,7 +56,7 @@ sub generate_sdn_config {
 
     my $mtu = 1450;
     $mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
-    $mtu = $vnet->{mtu} if $vnet->{mtu};
+    $mtu = $vnet->{mtu} if $plugin_config->{mtu};
 
     #vxlan interface
     my @iface_config = ();
index 2023c026e7988825c30f2fd8658793d4325bb4df..28527b61c7b473dbd181b9a26b53c595d4c00443 100644 (file)
@@ -16,6 +16,11 @@ sub properties {
             type => 'integer',
             description => "vlan tag",
         },
+       mtu => {
+           type => 'integer',
+           description => "mtu",
+           optional => 1,
+       },
     };
 }
 
@@ -25,6 +30,7 @@ sub options {
         nodes => { optional => 1},
        'tag' => { optional => 0 },
        'bridge' => { optional => 0 },
+       'mtu' => { optional => 1 },
     };
 }
 
index e29e5404c78e7172e3bb4a2239631d96452ac808..82760f173b6bff2ca87b4acfe1da6d41a4eb65fa 100644 (file)
@@ -36,6 +36,7 @@ sub options {
     return {
         nodes => { optional => 1},
         peers => { optional => 0 },
+       mtu => { optional => 1 },
     };
 }
 
@@ -57,7 +58,7 @@ sub generate_sdn_config {
 
     my $mtu = 1450;
     $mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
-    $mtu = $vnet->{mtu} if $vnet->{mtu};
+    $mtu = $vnet->{mtu} if $plugin_config->{mtu};
 
     #vxlan interface
     my @iface_config = ();