LoxiLB: delete lb by name

since loxilb is upgraded to 0.9.4 which allows
loxicmd delete lb by name.

fix: https://github.com/vincentmli/BPFire/issues/26

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2024-06-14 22:14:16 +00:00
parent 94f9604493
commit e928445c91

View File

@@ -642,13 +642,11 @@ sub CreateLB {
} }
sub DeleteLB { sub DeleteLB {
my (%settings) = @_; my (%settings) = @_;
my @loxicmd_options; my @loxicmd_options;
my $command = 'loxicmd'; my $command = 'loxicmd';
my $proto = "--" . "$settings{'PROTO'}" . "=" . "$settings{'PORT'}"; my $name = "--name=" . "$settings{'NAME'}";
push(@loxicmd_options, "delete", "lb"); push(@loxicmd_options, "delete", "lb");
push(@loxicmd_options, "$settings{'EXTIP'}"); push(@loxicmd_options, "$name");
push(@loxicmd_options, "$proto");
&General::system($command, @loxicmd_options); &General::system($command, @loxicmd_options);
} }