smp_86112
Dec 16, 2010Cirrostratus
GlobalLB set_limit() Fail
I'm developing some Perl automation to "rename" GTM Pools. Obviously part of that process has to get of the properties of the old pool and apply them to the new pool. And I seem to be having some trouble with the set_limit() function.
Here's the code for get_limit():
$soapResponse = $Pool->get_limit(SOAP:: Data->name(pool_names => [$old_pool]));
&checkResponse($soapResponse);
my $limit = $soapResponse->result->[0];
It seems to get the limit properties OK:
DB<2> x $limit
0 GlobalLB:: Pool:: PoolMetricLimit=HASH(0xa4774f8)
'metric_limits' => ARRAY(0xa4784fc)
0 GlobalLB::MetricLimit=HASH(0xa475490)
'type' => 'METRIC_LIMIT_BITS_PER_SECOND'
'value' => 14600
'pool_name' => 'smptest'
However when I try apply that same $limit to the new pool with iControl, the limits are not saved.
$soapResponse = $Pool->set_limit(SOAP:: Data->name(limits => [$limit]));
&checkResponse($soapResponse);
Looking closer at the iControl doc, the set_limit() function doesn't appear to take pool name as input, which makes me wonder how it could possibly know which pool to apply the limits to? However I also tried adding the pool_list parameter, and that didn't seem to have any effect. Am I not using these limit properties correctly?