Forum Discussion
MicroliseMarcin
Nimbostratus
Aug 01, 2019Python SDK fetch irule
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
Cumulonimbus
#!/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
Cumulonimbus
Edited to print the name and irule content only.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects