Forum Discussion
mhite_60883
Jun 21, 2013Cirrocumulus
The good news about bigsuds is that you don't have to deal with the typefactory stuff or WSDLs. With pycontrol, you do.
Here's information on bigsuds:
https://devcentral.f5.com/tech-tips/articles/getting-started-with-bigsuds-ndasha-new-python-library-for-icontrol
More about the typefactory stuff:
https://devcentral.f5.com/tech-tips/articles/getting-started-with-pycontrol-v2-understanding-the-typefactory
If you really want to do this with pycontrol, try adding this:
enabledstate = b.LocalLB.NodeAddressV2.typefactory.create('Common.EnabledState')
enabledstateseq = b.LocalLB.NodeAddressV2.typefactory.create('Common.EnabledStateSequence')
enabledstateseq.item = enabledstate.STATE_ENABLED
b.LocalLB.NodeAddressV2.set_session_enabled_state(nodes, enabledstateseq)
... or something like that.
However, I highly suggest using bigsuds as it is far more approachable.
I'm sure I'll also be telling you to start using the new 11.4 REST API sooner or later, too. 😉
Good luck,
-M