]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/Network/SDN/Zones/VlanPlugin.pm
rename frrevpn controller plugin to evpn plugin
[pve-network.git] / PVE / Network / SDN / Zones / VlanPlugin.pm
index dd03838d0d9be8fd1d18ebe6e60c91ea3281e461..2dd65e922f7f72c37fe69e83fff0f13a6ef21020 100644 (file)
@@ -26,18 +26,14 @@ sub properties {
            minimum => 1, maximum => 4096,
            description => 'Uplink interface',
        },
-       'vlan-allowed' => {
-           type => 'string', format => 'pve-sdn-vlanrange',
-           description => "Allowed vlan range",
-       },
     };
 }
 
 sub options {
 
     return {
+        nodes => { optional => 1},
        'uplink-id' => { optional => 0 },
-        'vlan-allowed' => { optional => 1 },
     };
 }
 
@@ -84,33 +80,6 @@ sub on_delete_hook {
     }
 }
 
-sub on_update_hook {
-    my ($class, $transportid, $sdn_cfg) = @_;
-
-    my $transport = $sdn_cfg->{ids}->{$transportid};
-
-    # verify that vlan-allowed don't conflict with another vlan-allowed transport
-
-    # verify that vlan-allowed is matching currently vnet tag in this transport
-    my $vlanallowed = $transport->{'vlan-allowed'};
-    if ($vlanallowed) {
-       foreach my $id (keys %{$sdn_cfg->{ids}}) {
-           my $sdn = $sdn_cfg->{ids}->{$id};
-           if ($sdn->{type} eq 'vnet' && defined($sdn->{tag})) {
-               if(defined($sdn->{zone}) && $sdn->{zone} eq $transportid) {
-                   my $tag = $sdn->{tag};
-                   eval {
-                       PVE::Network::SDN::Zones::Plugin::parse_tag_number_or_range($vlanallowed, '4096', $tag);
-                   };
-                   if($@) {
-                       die "vlan $tag is not allowed in transport $transportid";
-                   }
-               }
-           }
-       }
-    }
-}
-
 1;