Forum Discussion
Disable all pool member Pycontrol
Hello, to quickly introduce my problem,i just want to enable and disable member in pool.
This is what i try :
r = bigipt_obj.set_member_monitor_state(['/Common/mypool'], [[{'member': '192.168.239.237', 'port': 80}]], [['STATE_DISABLED']])
I see this on this post
But this is my problem :
WebFault Traceback (most recent call last)
/root/ in ()
----> 1 r = bigipt_obj.set_member_monitor_state(['pool-test-pertimm'], [[{'member': '192.168.239.237', 'port': 80}]], [['STATE_DISABLED']])
/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in __call__(self, *args, **kwargs)
540 return (500, e)
541 else:
--> 542 return client.invoke(args, kwargs)
543
544 def faults(self):
/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in invoke(self, args, kwargs)
600 timer)
601 timer.start()
--> 602 result = self.send(soapenv)
603 timer.stop()
604 metrics.log.debug(
/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in send(self, soapenv)
647 else:
648 log.error(self.last_sent())
--> 649 result = self.failed(binding, e)
650 return result
651
/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in failed(self, binding, error)
700 if status == 500:
701 if len(reply) > 0:
--> 702 r, p = binding.get_fault(reply)
703 self.last_received(r)
704 return (status, p)
/usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/bindings/binding.pyc in get_fault(self, reply)
263 p = unmarshaller.process(fault)
264 if self.options().faults:
--> 265 raise WebFault(p, faultroot)
266 return (faultroot, p.detail)
267
WebFault: Server raised fault: 'Could not find element by name: address'
I don't know what is bad in my call.
Thanks for reply
10 Replies
- mimlo_61970
Cumulonimbus
I think [[{'member': '192.168.239.237', 'port': 80}]]
should be [[{'address': '192.168.239.237', 'port': 80}]]
- irulemaker_1057
Nimbostratus
Hi, Thanks to your reply. I've already test this but i've always the same error message :(
- mimlo_61970
Cumulonimbus
the exception you posted specifically says 'Could not find element by name: address'. Can you post the error you get when you change member to address?
- irulemaker_1057
Nimbostratus
Thanks for your help.
But always this same error message :
In [12]: bigipt_obj.set_member_monitor_state(['mypool'], [[{'address': '192.168.239.237', 'port': 80}]], [['STATE_DISABLED']]) --------------------------------------------------------------------------- WebFault Traceback (most recent call last) /root/ in () ----> 1 bigipt_obj.set_member_monitor_state(['mypool'], [[{'address': '192.168.239.237', 'port': 80}]], [['STATE_DISABLED']]) /usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in __call__(self, *args, **kwargs) 540 return (500, e) 541 else: --> 542 return client.invoke(args, kwargs) 543 544 def faults(self): /usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in invoke(self, args, kwargs) 600 timer) 601 timer.start() --> 602 result = self.send(soapenv) 603 timer.stop() 604 metrics.log.debug( /usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in send(self, soapenv) 647 else: 648 log.error(self.last_sent()) --> 649 result = self.failed(binding, e) 650 return result 651 /usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/client.pyc in failed(self, binding, error) 700 if status == 500: 701 if len(reply) > 0: --> 702 r, p = binding.get_fault(reply) 703 self.last_received(r) 704 return (status, p) /usr/local/lib/python2.7/dist-packages/suds-0.4-py2.7.egg/suds/bindings/binding.pyc in get_fault(self, reply) 263 p = unmarshaller.process(fault) 264 if self.options().faults: --> 265 raise WebFault(p, faultroot) 266 return (faultroot, p.detail) 267 WebFault: Server raised fault: 'Could not find element by name: address'However I note that if i change the name of 'mypool' with an other pool who don't exist, i've the same error message.
- irulemaker_1057
Nimbostratus
Up please
Thks
- mimlo_61970
Cumulonimbus
I'm not 100% certain what the problem is, it has been a long time since I used pycontrol(I use bigsuds now) The error you are getting seems to be more related to a missing paramter(or dictionary not constructed properly) as opposed to an invalid pool name.
Also, the post you referenced in the beginning is using bigsuds as well. If you want to switch, I can probably be more helpful.
- irulemaker_1057
Nimbostratus
Thanks to your help. Since your message, i've try bigsuds en read this information :
The only problem, it's than i've 'MethodNotFound' message when i do this command :
lbmeth = b.LocalLB.Pool.typefactory.create('LocalLB.LBMethod')Do you know how i can do that in bigsuds.
Thanks
- mimlo_61970
Cumulonimbus
You don't have to do that in bugsuds, that is one of the benefits. Just call the method you want to use.
b = bigsuds.BIGIP( hostname = hostname, username = username, password = password) b.LocalLB.Pool.set_member_monitor_state(['/Common/mypool'], [[{'address': '192.168.239.237', 'port': 80}]], [['STATE_DISABLED']]) - irulemaker_1057
Nimbostratus
Thank you for your reply. it works fine ;) I've a last question (but i think than it's not possible). Is is possible to desactivate all member of a pool in one command ?
Thanks again for your help
- mimlo_61970
Cumulonimbus
Yes, you just list them all in the second list parameter.
b.LocalLB.Pool.set_member_monitor_state(['/Common/mypool'], [[{'address': '192.168.239.237', 'port': 80}, {'address' : 'secondaddress', 'port' : 80 }, {'address' : 'thirdaddress', 'port' : 80} ]], [['STATE_DISABLED']])
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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