Forum Discussion
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?