Forum Discussion

Aaron_Murray_22's avatar
Aaron_Murray_22
Icon for Nimbostratus rankNimbostratus
Oct 05, 2017

Help updating GTM pool member status

I have searched this forum and the internet and I can not figure out how to use the F5 SDK for Python to modify the status of a GTM pool member. I need to be able to enable and disable pool members through the SDK. I can check the status fine but can not figure out how to get the proper format to disable the members of a pool.

Here is what I have:

pool_obj = mgmt.tm.gtm.pools.pool.load(partition='Common', name=gtm_pool['Pool_Name'])

for member in pool_obj.members_s.get_collection():
member.update(enabled=True)

2 Replies

  • I found the answer to this question through trial and error. So for those who stumble on this in the future. You have to set the current state to false to get the desired state. In other words if the current state is disabled then you have to set disabled=False to get it to be enabled as shown below:

     

    member.disabled = False member.update(disabled=False)

     

    or

     

    member.enabled = False member.update(enabled=False)

     

    Thanks.