]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/API2/Network/SDN/Subnets.pm
subnet: make IPAM required and use PVE IPAM as default
[pve-network.git] / PVE / API2 / Network / SDN / Subnets.pm
index bc2b18f57c53c267948a9b3449eb0ffe91968e35..3c958bdd9f7818d97cf86345a06f76e53059e7f2 100644 (file)
@@ -182,6 +182,8 @@ __PACKAGE__->register_method ({
            my $opts = PVE::Network::SDN::SubnetPlugin->check_config($id, $param, 0, 1);
            $cfg->{ids}->{$id} = $opts;
 
+           raise_param_exc({ ipam => "you can't change ipam"}) if $opts->{ipam} && $scfg->{ipam} && $opts->{ipam} ne $scfg->{ipam};
+
            PVE::Network::SDN::SubnetPlugin->on_update_hook($id, $opts, $scfg);
 
            PVE::Network::SDN::Subnets::write_config($cfg);