Forum Discussion
Dec 07, 2010
Smart way to convert a PoolMemberDefinitionSequenceSequence to a IPPortDefinitionSequenceSequence
Hi,
I want to dump out (and eventually read in and set) the enabled state of each of my GTM pools pool members. Its easy to get a list of the pools and pool members, but the PoolMember.get_en...
Dec 07, 2010
Hi Matt,
I'm not trying to create, I'm trying to convert.
but I could be approaching it incorrectly. The end goal is to be able to print|set the enabled state of a GTM pool member. here are the params and response type for the GlobalLB.PoolMember.get_enabled_state method:
poolmemobj = b.GlobalLB.PoolMember
In [69]: poolmemobj.get_enabled_state.params
Out[69]:
[(pool_names, u'Common.StringSequence'),
(members, u'Common.IPPortDefinitionSequenceSequence')]
In [70]: poolmemobj.get_enabled_state.response_type
Out[70]: u'GlobalLB.PoolMember.MemberEnabledStateSequenceSequence'
so the immediate problem i'm trying to solve is the best way to create/convert a GTM object into a Common.IPPortDefinitionSequenceSequence. where i'm having trouble is that if I use the GlobalLB.Pool.get_member method to create a list of pool members, the resulting object is of type PoolMemberDefinitionSequenceSequence, which is NOT the same as an IPPortDefinitionSequenceSequence. Each object(?) in the PoolMemberDefinitionSequence has one or more address/port values, but also an order value which seems to be the main differentiator from an IPPortDefinition.
so i'm asking if looping through a PoolMemberDefinitionSequenceSequence to strip off the 'order' value and create/fill a new IPPortDefinitionSequenceSequence that I can then pass into the GlobalLB.PoolMember.get_enabled_state method is the best way to do things.
make sense?
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