summaryrefslogtreecommitdiff
path: root/PVE/API2/Network/SDN/Subnets.pm
diff options
context:
space:
mode:
authorAlexandre Derumier <aderumier@odiso.com>2020-10-05 17:09:01 +0200
committerThomas Lamprecht <t.lamprecht@proxmox.com>2020-10-06 18:17:19 +0200
commit9dfa92025e8d9b949a835357ae11f167a62bb3f4 (patch)
tree7b72478a36e95aa1a97972d2f7dc7e255c837cf8 /PVE/API2/Network/SDN/Subnets.pm
parent7fdeb441413f2032fea9bfce0c8a668cd7790ffb (diff)
subnet: make IPAM required and use PVE IPAM as default
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'PVE/API2/Network/SDN/Subnets.pm')
-rw-r--r--PVE/API2/Network/SDN/Subnets.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/PVE/API2/Network/SDN/Subnets.pm b/PVE/API2/Network/SDN/Subnets.pm
index bc2b18f..3c958bd 100644
--- a/PVE/API2/Network/SDN/Subnets.pm
+++ b/PVE/API2/Network/SDN/Subnets.pm
@@ -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);