Getting Started with the f5-common-python SDK
If you have dabbled with python and iControl over the years, you might be familiar with some of my other “Getting Stared with …” articles on python libraries. I started my last, on Bigsuds, this way:...
Updated Jun 06, 2023
Version 2.0JRahm
Admin
Joined January 20, 2005
F5_Digger_13600
Oct 02, 2017Cirrus
Hi Jason,
I am playing with F5 Python SDK and encountered an unexpected outcome with the exists() of pool member. Here is the code.
On my lap BIG-IP, there two pool members with the name, "10.10.10.4:80". and "10.10.10.5:80" To check the existence of the pool member, named "10.10.10.4:80", I ran the following code.
pools = mr.tm.ltm.pools.get_collection()
for apool in pools:
for apm in apool.members_s.get_collection():
print(apm.exists(name='10.10.10.4:80'))
if apm.name == '10.10.10.4:80':
print('10.10.10.4:80 found and True')
False
10.10.10.4:80 found and True
False
Is there anything wrong with my code?
Thank you.