Forum Discussion
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)
- JRahm
Admin
Functional code for GTM members is here in the sdk.
- Aaron_Murray_22
Nimbostratus
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.
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