Forum Discussion
andy_12_5042
Mar 01, 2011Nimbostratus
iterate over return of get_session_status
I have no issues with creating something like this and then get at the value assigned to port or whatever:
>>> test =m.typefactory.create('Common.IPPortDefinition')
>>> test
(Commo...
L4L7_53191
Mar 22, 2011Nimbostratus
That's the way to do it. One of the tricks with calls like this is that iControl allows you to query for an entire list of objects. So your get_session_status() call could actually contain a list like:
['temp', 'pool1','pool2','pool3'], in which case your stats list would have 4 nested lists of LocalLB.PoolMember.MemberSessionStatus objects. To get at that information, you'd have to iterate over that list, as you've discovered :)
-Matt
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects