mfreeman451_606
Apr 22, 2009Nimbostratus
problem using LocalLB.Pool.add_member
I'm having trouble trying to add a member to an existing pool. The code I have seems to run fine with no errors, but when I login to the F5 through the GUI I don't see my new member showing up in the pool.
I read the previous topic regarding this and tried the same stuff you guys had suggested and I get the same result, code runs but it doesn't appear to be added.
Here is the code:
test.pl:
my $members = {
member =>
{ address => '10.0.0.1',
port => '80'
},
};
my $member = { address => "10.0.0.1", port => 80 };
my $pool_name = 'pool_mfreeman';
my $res = $local_pool->add_pool_member(
names => $pool_name,
member => $members,
) or die "Couldn't add pool member $pool_name\n";
Module.pm:
sub add_pool_member {
my $self = shift;
my %args = @_;
my $pool_names = $args{'names'};
my $member = $args{'member'};
my $pool = $self->{'object'};
my $soap_response = $pool->add_member(
SOAP::Data->name( pool_names => $pool_names ),
SOAP::Data->name( members => [$member] ),
);
die "Bad SOAP response!" unless ($self->check_response($soap_response));
print "Added pool member\n";
print Dumper($member) . "\n";
print "==\n";
}
Result:
Added pool member
$VAR1 = {
'member' => {
'address' => '172.16.144.198',
'port' => '80'
}
};
==
Called with URN: urn:iControl:LocalLB/Pool
--
Thoughts?