Steve_Howard_14
May 12, 2014Nimbostratus
How to disable a GTM pool member
Hi,
We are struggling with the bigsuds syntax to disable a pool member. Example below...
>>> from bigsuds import *
>>> b = BIGIP(hostname = '1.2.3.4', username = 'foo', password = 'bar')
>>> pool = b.GlobalLB.Pool
>>> pool.get_list()
['/Common/test-pool']
>>> members = pool.get_member(pool.get_list())
>>> print members
[[{'member': {'port': 80, 'address': '172.27.128.110'}, 'order': 1}, {'member': {'port': 80, 'address': '172.24.2.20'}, 'order': 0}]]
>>> pool.set_enabled_state(['/Common/columbus-ecomm-pool'], [[{'address': '172.28.2.20', 'port': 80}]])
Traceback (most recent call last):
File "", line 1, in
File "build\bdist.win-amd64\egg\bigsuds.py", line 412, in wrapped_method
File "build\bdist.win-amd64\egg\bigsuds.py", line 472, in process
File "build\bdist.win-amd64\egg\bigsuds.py", line 478, in _process_args
File "build\bdist.win-amd64\egg\bigsuds.py", line 540, in _process_arg
File "build\bdist.win-amd64\egg\bigsuds.py", line 559, in _process_arg
bigsuds.ArgumentError: "[{'port': 80, 'address': '172.28.2.20'}]" is not a valid value for Common.EnabledState, expecting: STATE_DISABLED, STATE_ENABLED
We can't find anything in the API reference for this. It indicates GlobalLB.PoolMember is deprecated, but we can't find any overloaded method to disable a member in a GTM pool.
Are we missing something basic?