Forum Discussion
Getting subcollection under policy
I am trying write up an equivalent of the REST API below using the F5 SDK
https://{{big_ip_a_mgmt}}/mgmt/tm/asm/policies/RkBxoJgqcNy6Nub2tIGnqg/blocking-settings/violations/qbKXRjHFpE888EG_KIf-Gw?ver=12.1.0
I was able to load up the resource but I can't figure out how to load the sub collection below the resource import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from import ManagementRoot
mgmt = ManagementRoot("70.60.207.94", "admin", "admin")
collection = mgmt.tm.asm.get_collection()
for anobject in collection:
print anobject
p_collections = mgmt.tm.asm.policies_s.get_collection()
for p_object in p_collections:
policy=mgmt.tm.asm.policies_s.policy.load(id=p_object.id)
- Jhaunu_Gupta
Nimbostratus
do in tjis wat it will show you all the subcollection also
- Jhaunu_Gupta
Nimbostratus
- Jhaunu_Gupta
Nimbostratus
it will show all the properties of the ASM policies
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