Forum Discussion
c_harish_12981
Nimbostratus
Jun 17, 2009Create Pool script in PERL
I am looking for "Create Pool" or "CreatePoolWithMembers" script in PERL. Has anybody worked on it?
Thx
JRahm
Admin
Jun 17, 2009There is a perl add pool member script in the codeshare:
http://devcentral.f5.com/Wiki/default.aspx/iControl/PerlAddPoolMember.html Click here
I stripped out variables and added this into the main loop to demonstrate adding the pool and the members:
added by jrahm
$member =
{
address => "10.10.10.10",
port => "80"
};
push @memberA, $member;
push @memberAofA, [@memberA];
$soapResponse = $Pool->create(
SOAP::Data->name(pool_names => [new_pool]),
SOAP::Data->name(lb_methods => [LB_METHOD_ROUND_ROBIN]),
SOAP::Data->name(members => [@memberAofA])
);
&checkResponse($soapResponse);
This returns:
C:\dev\perl_scripts>perl ltmpool.pl 10.10.20.5 admin admin
POOL : new_pool
MEMBER : 10.10.10.10:80
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects