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
Kurt_Kite_11866
Jul 27, 2017Nimbostratus
Hi,
I am struggling to figure out a way to retrieve the irules associated with a virtual server using the SDK. I load the virtual:
virtual = bigip.ltm.virtuals.virtual.load(partition='Common',name='my-virtual')
If I interactively do the above in python and print virtual.raw I can see a "rules" attribute and can iterate over it:
for rule in rules: print rule
However, if I try this in the python script then it errors out indicating that there is no "rules" attribute associated with the virtual object. What am I missing?
Thanks, Kurt