kennemt_50219
Sep 20, 2011Nimbostratus
set_priority (perl)
Hey all,
I'm fairly new to iControl, and I'm trying to write a perl script to dynamically alter member priorities in . I'm working with LTM version 10.2.1 so I have to use the PoolMember interface rather than Pool. Using scripts from codeshare as a model, this is the meat of what I've come up with. Unfortunately, although it doesn't throw any errors, it also doesn't appear to do anything. Can anybody tell me what I'm missing?
$Pool = SOAP::Lite
-> uri('urn:iControl:LocalLB/PoolMember')
-> proxy("$sProtocol://$ichost/iControl/iControlPortal.cgi");
$Pool->transport->http_request->header (
'Authorization' => 'Basic ' . MIME::Base64::encode("$UID:$PWD", '')
);
my $member = {
address => "10.100.125.18",
port => "443"
};
my $member_priority = (
member => $member,
priority => "2"
);
push @memberPriorityList, $member_priority;
push @memberPriorityLists, @memberPriorityList;
$soapResponse = $Pool->set_priority (
SOAP::Data->name(pool_names => ["testpool-443"]),
SOAP::Data->name(priorities => [@memberPriorityLists])
);