Forum Discussion
jvallejo1_37380
Oct 05, 2018Nimbostratus
Create Address List, Port List, Firewall Policy, Firewall rules with F5 Python SDK
Hello!
I really like the detailed documentation for the Traffic Managment Shell. There would be a section and then all the information for each component (ex: virtual server) would be there. How...
mkyrc
Mar 09, 2021Cirrus
Hello,
I try to ask here, because f5-sdk documentation is not clear for me. I'd like to read rule_lists with rules.
Here is part of my code:
mgmt = ManagementRoot(bigip_host, bigip_username, bigip_password)
afm = mgmt.tm.security.firewall
# list of rule_lists
rule_lists = afm.rule_lists.get_collection()
i = 0
for rule_list in rule_lists:
print(f"{i}:")
print("[ %s | %s | %s ]" % (rule_list.partition, rule_list.name, rule_list.fullPath))
i += 1
I'm using 'https://f5-sdk.readthedocs.io/en/latest/apidoc/f5.bigip.tm.security.html#f5.bigip.tm.security.firewall.Rule_Lists' for reading all rule_lists. But it's not clear for me, how can I read rules for rule_list.
Is it possible to read not all rule_lists, but e.g. only some rule lists with specifiv preffix? How?
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