Forum Discussion
Jae_Hong_Kim_32
Nimbostratus
May 25, 2017how to use REST API using F5 SDK
The following REST API would pass the Request data for arguments.
I am trying to figure out how to the equivalent (pass arguments) the using using the F5 SDK
I tried using the update method but I get...
Jae_Hong_Kim_32
Nimbostratus
May 25, 2017import 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:
print p_object.name
print p_object.id
print p_object.kind
print p_object.selfLink
print p_object.allowedResponseCodes
policy=mgmt.tm.asm.policies_s.policy.load(id=p_object.id)
policy.update(description="bar", learningMode="automatic")
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