Forum Discussion
Enable pool member in Python/Bigsuds
Hi, My request is simple. I just want to enable pool with Python/Bigsuds on a BigIP 6800 V10.2.3.
This is my connection in bigsuds :
b = bigsuds.BIGIP(hostname = 'mybigip.local', username = 'myuser', password = 'mypass')
This code work to disable pool member :
b.LocalLB.PoolMember.set_monitor_state(['mypool'], [[{'member': {'address' : '192.168.X.X', 'port': 443}}]]), [[{'monitor_state': 'STATE_DISABLED'}]]
But if replace [[{'monitor_state': 'STATE_DISABLED'}]] by [[{'monitor_state': 'STATE_ENABLED'}]], i've no action...
Do you have an idea please ?
Thanks
5 Replies
- mimlo_61970
Cumulonimbus
Its been a while since I did this in 10.2. Anyway I am thinking you do not need to define that as a dictionary, it just needs to be a list.
b.LocalLB.PoolMember.set_monitor_state(['mypool'], [[{'member': {'address' : '192.168.X.X', 'port': 443}}]]), ['STATE_DISABLED'])See if that works, if not let me know and I will find an old ltm to test against.
- mimlo_61970
Cumulonimbus
Correction, needs to be a list in a list
b.LocalLB.PoolMember.set_monitor_state(['mypool'], [[{'member': {'address' : '192.168.X.X', 'port': 443}}]]), [['STATE_DISABLED']]) - mimlo_61970
Cumulonimbus
last try. I found a V9 LTM to test against, 10.2 should be the same. It should be a dictionary item as you originally had, it just needs to be part of the same dictionary as the member definition.
b.LocalLB.PoolMember.set_monitor_state(['mypool'], [[{'member': {'address' : '192.168.X.X', 'port': 443}, 'monitor_state' : 'STATE_ENABLED'}]]) - irulemaker_1057
Nimbostratus
Hi Mimlo, Thanks so much for your reply.
Your last answer working fine for me. It's strange 'monitor_state' be on the same dictionary than 'member'...
It's not too explicit on this doc : https://devcentral.f5.com/Wiki/iControl.LocalLB__PoolMember__set_monitor_state.ashx
Thanks again
- mimlo_61970
Cumulonimbus
Agreed, I had to try it like 10 times to figure it out. Its cleaner in v11
Recent Discussions
Related Content
* 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