mirror of
git://git.proxmox.com/git/pve-network.git
synced 2025-04-30 11:27:11 +02:00
sdn: fix tests
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
parent
7bd6b643d5
commit
f836981f43
|
@ -109,6 +109,12 @@ foreach my $path (@plugins) {
|
|||
my $ipam_config = read_sdn_config ("$path/ipam_config");
|
||||
return $ipam_config;
|
||||
},
|
||||
add_cache_mac_ip => sub {
|
||||
return;
|
||||
},
|
||||
del_cache_mac_ip => sub {
|
||||
return;
|
||||
}
|
||||
);
|
||||
|
||||
## add_subnet
|
||||
|
@ -192,7 +198,7 @@ foreach my $path (@plugins) {
|
|||
$expected = '{"zones":{"myzone":{"subnets":{"'.$subnet_cidr.'":{"ips":{"'.$ip.'":{"gateway":1},"'.$ipnextfree.'":{},"'.$ip2.'":{}}}}}}}';
|
||||
|
||||
eval {
|
||||
$ip3 = PVE::Network::SDN::Subnets::next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description);
|
||||
$ip3 = PVE::Network::SDN::Subnets::add_next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $description);
|
||||
};
|
||||
|
||||
if ($@) {
|
||||
|
|
|
@ -231,7 +231,7 @@ foreach my $path (@plugins) {
|
|||
$expected = $ipam ? $cidr3 : undef;
|
||||
|
||||
eval {
|
||||
$result = PVE::Network::SDN::Vnets::get_next_free_cidr($vnetid, $hostname, $mac, $description, $ipversion);
|
||||
$result = PVE::Network::SDN::Vnets::add_next_free_cidr($vnetid, $hostname, $mac, $description);
|
||||
};
|
||||
|
||||
if ($@) {
|
||||
|
@ -309,7 +309,7 @@ foreach my $path (@plugins) {
|
|||
$expected = $ipam ? $cidr1 : undef;
|
||||
|
||||
eval {
|
||||
$result = PVE::Network::SDN::Vnets::get_next_free_cidr($vnetid, $hostname, $mac, $description, $ipversion);
|
||||
$result = PVE::Network::SDN::Vnets::add_next_free_cidr($vnetid, $hostname, $mac, $description);
|
||||
};
|
||||
|
||||
if ($@) {
|
||||
|
|
Loading…
Reference in a new issue