Forum Discussion
expandsSubcollections and filtering in F5 SDK
Hello,
I need to use the F5 BIGIP SDK to pull all the firewall policies from a partition along with their respective expanded rules. I wrote the following code:
policies = f5_manager.mgmt.tm.security.firewall.policy_s.get_collection(
requests_params={
"params": f"$filter=partition eq {partition_name}&expandSubcollections=true"
},
)
If i only want to use expandSubcollections=true or only the filter it works as expected. However, when I try to combine them it doesn't expand the results anymore. Has anyone encountered this before?
Thanks!
2 Replies
- Melissa_C
Moderator
Hello mcomardici,
I noticed your post has been up for a bit with no responses and wanted to check if you had already found an answer? If you have please update your post with the information. However, if you have not please let me know and I will help find a resource to help you out.
-Melissa
- mcomardici
Nimbostratus
Hi,
No, I didn't find a solution to make this work in a single API call. What I did is pull all the data from all the partitions with the expanded fields and filter by partition afterwards using Python. This is suboptimal but it will work until I find a solution to this. Thanks!
Recent Discussions
Related Content
* 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