ltp_55848
Sep 14, 2011Nimbostratus
PoolMember::get_statistics parameters
Hi All,
I'm having some difficulty in correctly invoking LocalLB::PoolMember::get_statistics in a perl script. My understanding of the API reference is that the method accepts two parameters;
- pool_names: A list of strings that are the pool names for which the statistics should be retrieved which in perl I am passing as hash key/value pair with the value being a single pool name in list context. i.e.
pool_names => [ $pool ]
- members: A list of lists of IPPortDefinition values which I am passing as a hash key/value pair with the value being a list of lists of a single member. i.e.
members => [ [ 10.0.0.10:80 ] ]
The specific error message I am receiving is that either the pool_names or members element could not be found.
At first I thought that the problem may have been due to the method expecting an positional parameter list and me using a hash (no guaranteed order) as the error message was indicating that the pool_names parameter could not be found.
However after putting together an invocation not using a hash and ensuring that the parameter order was correct as per the API reference I am now receiving an error indicating that the members parameter can not be found.
My guess is that I am misunderstanding the parameter types in the API rereference so if anyone can point out what I may be doing wrong here it would be greatly appreciated.
Cheers,
EDIT: Also, mods; I received an error on submitting this post about a bad element so clicked back, removed any suspect characters and then resubmitted. This caused two duplicates of this post - if someone could delete the other two that would be great.
The element that generated the warning was a percent character.