Forum Discussion
spirrello_22970
Nimbostratus
Mar 30, 2016Using Python Bigsuds for Replacing TCP Profile
Hi,
I'm trying to run the following from a Python script but i'm getting the following error message. I've tried both options but I'm getting the same error message. Any idea on why this would...
JRahm
Admin
Apr 01, 2016It's kind of odd that the returned data shows a field (profile_type) that isn't supported when working with the data (as well it doesn't appear to show the tcp profile until you've removed the http profile, which is also odd,) but if you eliminate that in the objects it seems to add/remove just fine:
>>> b.LocalLB.VirtualServer.get_profile(['/Common/phpauction'])
[[{'profile_name': '/Common/http', 'profile_context': 'PROFILE_CONTEXT_TYPE_ALL', 'profile_type': 'PROFILE_TYPE_HTTP'}, {'profile_name': '/]
>>> test_profile = [[{'profile_name': '/Common/http', 'profile_context': 'PROFILE_CONTEXT_TYPE_ALL'}]]
>>> b.LocalLB.VirtualServer.remove_profile(['/Common/phpauction'], test_profile)
>>> b.LocalLB.VirtualServer.get_profile(['/Common/phpauction'])
[[{'profile_name': '/Common/tcp', 'profile_context': 'PROFILE_CONTEXT_TYPE_ALL', 'profile_type': 'PROFILE_TYPE_TCP'}]]
>>> b.LocalLB.VirtualServer.add_profile(['/Common/phpauction'], test_profile)
>>> b.LocalLB.VirtualServer.get_profile(['/Common/phpauction'])
[[{'profile_name': '/Common/http', 'profile_context': 'PROFILE_CONTEXT_TYPE_ALL', 'profile_type': 'PROFILE_TYPE_HTTP'}, {'profile_name': '/]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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