Forum Discussion
iControl search?
Hello,
I am writing a tool to search things across 50+ load balancers, but we have a very shaky relationship with our network team, so I don't really want to do anything that would piss them off.
Our LTM's are partitioned, so I can easily get only the VIPs belonging to our BU. On the GTM's everything is on one partition, so I would like to only get the things with a particular word in the name. Is that possible?
get_list() does not seem to do it. and get_object_status() does not like my search string. I've tried all kinds of different variariations of the search string, to no avail.
How can i make this work?
Error!
Exception caught in GlobalLB::urn:iControl:GlobalLB/WideIP::get_object_status()
Exception: Common::OperationFailed
primary_error_code : 16908342 (0x01020036)
secondary_error_code : 0
error_string : 01020036:3: The requested GTM wide IP address (*platform*) was not found.%
7 Replies
- Igor_Pruchanski
Nimbostratus
bump. Hi Igor, currently there isn't a search built into the API. In fact, in the 11+ years the API has been around, this is the first time I've heard a request for that. It's a great idea, and one I think would be beneficial to the users, but it's not in there now. I'd suggest you put an enhancement request in with your support channel to work on getting it put in.
With that said, making a get_list() call with 11k objects should still work. You'll likely want to split that list down when calling subsequent functions with that listing thought.
-Joe
- Aaron_Burton_73
Nimbostratus
If you walk the SNMP tree you will notice the iControl calls match it. To me this means that iControl was built on or like the SNMP output. This is why there really isnt single selct items and why its not really OOP in general.
That said, while get_list is always a full list, the attributes can be pulled with a partial list. We tend to pull in all the WIPs once or twice a day and then make status calls with a partial list.
publicstaticvoidGetWIPS(stringserver){// get list of wips every 12 hoursvarconn =newInterfaces(server,Definition.Instance.Username,Definition.Instance.Password);varwips = conn.GlobalLBWideIP.get_list();Save(wips);// save to database}publicstaticvoidGetStatus(stringserver,stringpattern){// get wip status on demandvarwips = Load();wips = wips.Where(x => x.Contains(pattern)).ToArray();varconn =newInterfaces(server,Definition.Instance.Username,Definition.Instance.Password);varstatus = conn.GlobalLBWideIP.get_object_status(wips);} - mhite_60883
Cirrocumulus
Joe, - hoolio
Cirrostratus
Hi Matthew, - mhite_60883
Cirrocumulus
This is from a while back, removing the names to protect the innocent: - hoolio
Cirrostratus
Thanks for that. Can you email me the complete info (aaron at f5 dot com) and I'll take a look at talk with the support person as necessary?
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