Forum Discussion
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?
- The GlobalLB.Pool.set_limit() method is defined as follows
enum GlobalLB.MetricLimitType { METRIC_LIMIT_CPU_USAGE, METRIC_LIMIT_MEMORY_AVAILABLE, METRIC_LIMIT_BITS_PER_SECOND, METRIC_LIMIT_PACKETS_PER_SECOND, METRIC_LIMIT_CONNECTIONS, METRIC_LIMIT_CONNECTIONS_PER_SECOND }; struct GlobalLB.MetricLimit { MetricLimitType type; long value; }; struct GlobalLB.Pool.PoolMetricLimit { string pool_name; MetricLimit [] metric_limits; }; GlobalLB.Pool.set_limit( in GlobalLB.Pool.PoolMetricLimit [] limits );
- smp_86112Cirrostratus
"Were you changing the metric value in the metric_limits array?"
Recent Discussions
Related Content
* 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