Forum Discussion
Chris_82142
Nimbostratus
Jun 20, 2013Can only disable a node, not enable.
Hello Everyone,
I am trying to use Pycontrol V2.0 to enable and disable a node:
!/bin/python
import sys
import pycontrol.pycontrol as pc
import suds
b = p...
mhite_60883
Cirrocumulus
Jun 21, 2013The 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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