summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandre Derumier <aderumier@odiso.com>2024-01-04 17:11:39 +0100
committerThomas Lamprecht <t.lamprecht@proxmox.com>2024-02-20 14:40:00 +0100
commite4e815872245b42a5c1c0f26cfb77a9b2013d752 (patch)
treee975d7616d4b0d5287434f10620b5a4d7b24b6c7 /src
parent9e65d5f59726e05ae4cb13206482ad8f4ffadf82 (diff)
ipam: phpipam: add_range_next_freeip
Currently is not possible in phpipam to search in specific range, fallback to full subnet search Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'src')
-rw-r--r--src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
index ecefd77..c3e545f 100644
--- a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
+++ b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
@@ -184,6 +184,18 @@ sub add_next_freeip {
return $ip;
}
+sub add_range_next_freeip {
+ my ($class, $plugin_config, $subnet, $range, $data, $noerr) = @_;
+
+ #not implemented in phpipam, we search in the full subnet
+
+ my $vmid = $data->{vmid};
+ my $mac = $data->{mac};
+ my $hostname = $data->{hostname};
+
+ return $class->add_next_freeip($plugin_config, undef, $subnet, $hostname, $mac, $vmid);
+}
+
sub del_ip {
my ($class, $plugin_config, $subnetid, $subnet, $ip, $noerr) = @_;