Create Pool script in PERL

I am looking for “Create Pool” or “CreatePoolWithMembers” script in PERL. Has anybody worked on it?

Thx

I’m sure I can come up with something. Do you just want the pool creation or do you want to also specify adding members during the creation or possibly adding/removing members post-creation. Let me know and I’ll whip something up for you.

-Joe

There 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

oops, sorry Joe, started working on this and didn’t refresh before posting.

Here’s a script that will either list all the pools and their respective pool members or it will create a new pool with a a list of supplied members.

http://devcentral.f5.com/Wiki/default.aspx/iControl/PerlCreatePool.html

Click here

Hope this helps…

-Joe

Thanks Joe,

Help appreciated. One quick feedback. Please modify the “Usage” statement as Port is not required to run this program.

Is it possible to keep UserID & Password encrypted (or just password) in a separate file and it can be passed as an argument during run time.