Forum Discussion
bigsuds and icontrol
I am trying to create monitor using bigsuds. Everything is fine. I am trying to setup string receive value using below code.
SEND is configured correctly but RECEIVE never gets configured. I see recv as none when list ltm monitor http all properties.
Codetry: b.LocalLB.Monitor.set_template_string_property([template_name],[{'type':'STYPE_SEND', 'value':send_string},{'type':'STYPE_RECEIVE', 'value':recv_string}]) except Exception, e: print e
Any thoughts.
3 Replies
In looking at that API method, it seems to deviate from the standard format for our "bulk" operations. In seeing that the two parameters are 1-d arrays, most likely what is happening is that the server is looking at the 1st parameter and for each item in that array it's accessing that index in the second parameter. So for your case, you are passing a single value for the 1st parameter, so it's only looking at the 1st index of the second parameter.
You can try making the call twice, once for each StringValue, or you could pass the same template twice as the first parameter.
b.LocalLB.Monitor.set_template_string_property( [template_name, template_name], [ {'type':'STYPE_SEND', 'value':send_string}, {'type':'STYPE_RECEIVE', 'value':recv_string} ] )Give that a shot and see if it works...
-Joe
That worked. Thanks Joe.
- Glad to hear it! Most of the API's that allow values like this take a second parameter with a 2-D array to allow for an array of items per item in the first parameter. This method, from it's name (set_template_string_property) implies it only sets one "property". Otherwise the API would have been called set_template_string_preoperties()...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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