}
sub add_ip {
- my ($class, $plugin_config, $subnetid, $subnet, $ip, $hostname, $description, $is_gateway) = @_;
+ my ($class, $plugin_config, $subnetid, $subnet, $ip, $hostname, $mac, $description, $is_gateway) = @_;
my $cidr = $subnet->{cidr};
my $url = $plugin_config->{url};
hostname => $hostname,
description => $description,
};
+ $params->{mac} = $mac if $mac;
eval {
PVE::Network::SDN::Ipams::Plugin::api_request("POST", "$url/addresses/", $headers, $params);
}
sub add_next_freeip {
- my ($class, $plugin_config, $subnetid, $subnet, $hostname, $description) = @_;
+ my ($class, $plugin_config, $subnetid, $subnet, $hostname, $mac, $description) = @_;
my $cidr = $subnet->{cidr};
my $mask = $subnet->{mask};
description => $description,
};
+ $params->{mac} = $mac if $mac;
+
my $ip = undef;
eval {
my $result = PVE::Network::SDN::Ipams::Plugin::api_request("POST", "$url/addresses/first_free/$internalid/", $headers, $params);