Forum Discussion
F5 SDK Python - Assign HTTP Profile to VIP
Hi Vukasin
I think you'd be looking for mgmt.tm.ltm.profile.http.create():
from f5.bigip import ManagementRoot
# Connect to the BIG-IP
mgmt = ManagementRoot("bigip.example.com", "admin", "somepassword")
# Create a new HTTP profile on the BigIP
my_http_profile = mgmt.tm.ltm.profile.http.create(name='myhttpprofile', partition='Common')
I don't have a BIG-IP to test it but I was going through the source code here:
https://f5-sdk.readthedocs.io/en/latest/_modules/f5/bigip/tm/ltm.html?highlight=bigip.tm.ltm.profile
https://f5-sdk.readthedocs.io/en/latest/_modules/f5/bigip/resource.html?highlight=f5.bigip.resource
Try it out using your python REPL and check if it complains about missing arguments (like required HTTP profile fields) but according to doc above, it's similar to the regular REST API call from here: https://support.f5.com/csp/article/K13225405#http
It'd be good if you come back here and post a reply with your attempt using Python REPL for future reference.
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