Hi,
I was looking for way how I can fetch irule content using Python SDK.
I wasn’t able to find anything within documentation.
For example I’m getting irule assigned to virtual server but cannot find way how to display content of this irule.
Best regards
JG
2
#!/usr/bin/python
from f5.bigip import ManagementRoot
# Define unique variables
user = 'admin'
password = 'admin'
f5_ip = '10.10.10.10'
partition = 'Common'
mgmt = ManagementRoot(f5_ip, user, password)
ltm = mgmt.tm.ltm
rules = ltm.rules.get_collection()
for rule in rules:
print("---")
print(rule.name)
print("---")
print(rule.apiAnonymous)
JG
3
Edited to print the name and irule content only.