]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/Network/SDN/Zones/Plugin.pm
vnets: allow duplicate tags in differents zones
[pve-network.git] / PVE / Network / SDN / Zones / Plugin.pm
index 190a15365bd12532e307812376757b4bc071a4e2..6fc13eb4228626f77e531a096e2244460bff36f6 100644 (file)
@@ -44,6 +44,10 @@ my $defaultData = {
         nodes => get_standard_option('pve-node-list', { optional => 1 }),
         zone => get_standard_option('pve-sdn-zone-id',
             { completion => \&PVE::Network::SDN::Zones::complete_sdn_zone }),
+        ipam => {
+            type => 'string',
+            description => "use a specific ipam",
+        },
     },
 };
 
@@ -64,7 +68,7 @@ sub decode_value {
         }
 
         return $res;
-    } 
+    }
 
    return $value;
 }
@@ -94,7 +98,7 @@ sub parse_section_header {
 }
 
 sub generate_sdn_config {
-    my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $controller, $interfaces_config, $config) = @_;
+    my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $controller, $subnet_cfg, $interfaces_config, $config) = @_;
 
     die "please implement inside plugin";
 }
@@ -139,6 +143,12 @@ sub on_update_hook {
     # do nothing by default
 }
 
+sub vnet_update_hook {
+    my ($class, $vnet_cfg, $vnetid, $zone_cfg) = @_;
+
+    # do nothing by default
+}
+
 #helpers
 sub parse_tag_number_or_range {
     my ($str, $max, $tag) = @_;