Forum Discussion
pycontrol pool.add_member problem
>>> b =
pc.BIGIP(
...
hostname = LTM,
...
username = USER,
...
password = PASS,
...
wsdls = [WSDLS],
...
fromurl=True
... )
>>> p =
b.LocalLB.Pool
>>>
p.add_member(
... pool_names
= ["new_pool"],
...
members = [[ {'address': '9.9.9.9', 'port': 80 } ]]
... )
Traceback (most
recent call last):
File
"", line 3, in
File
"/usr/lib/python2.7/site-packages/suds/client.py", line 539, in
__call__
return
client.invoke(args, kwargs)
File
"/usr/lib/python2.7/site-packages/suds/client.py", line 598, in
invoke
result
= self.send(msg)
File
"/usr/lib/python2.7/site-packages/suds/client.py", line 633, in send
result
= self.failed(binding, e)
File
"/usr/lib/python2.7/site-packages/suds/client.py", line 684, in
failed
r, p =
binding.get_fault(reply)
File
"/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line
238, in get_fault
raise
WebFault(p, faultroot)
suds.WebFault: Server
raised fault: 'Could not find element by name: address'
>>>
I cannot figure out for the life of me why address is not showing up as an element in members. Has anyone seen this before? Is it an indication that pycontrol was not set up properly? If so, what part? Thanks.
- Patrick_Chang_7Historic F5 AccountAfter further experimentation, it would appear that somehow the 'address' is not being parsed in my call and the error message is referring to the fact that it can't find the element named address in my list. I also realized that I was using a 64bit version of Python 2.7.2 and that all the examples were done with Python 2.6.4. Is there are a syntax difference between the 2 versions?
- Patrick_Chang_7Historic F5 AccountTurns out that the pool member had to be created with the correct structure. The devcentral examples are not quite right.
- JRahmAdminhey Pat, which examples are not correct? There are changes from v1 to v2 in pycontrol that make them incompatible. v2 is a little more strict with formats but Mr L4L7 swears this is a good thing!
- xargsgrep_99323Nimbostratusthank you! you don't know how much time i wasted on this until i saw your post.
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