Trying to convert tmsh, “create ltm virtual SERVER_80 { destination 172.17.111.71:80 ip-protocol tcp mask 255.255.255.255 http-class { HTTPS_REDIRECT } profiles add { tcp {} http {} }}” to the equivalent in python/big-suds icontrol.
It looks like a couple steps in icontrol:
1.) locallb_virtualserver_create(auth, vs_def, wildmasks, vs_resources, vs_profiles) with:
vs_def = [{‘port’: ‘80’, ‘protocol’: ‘PROTOCOL_TCP’, ‘name’: ‘SERVER_80’, ‘address’: ‘172.17.111.71’}] wildmasks = [‘255.255.255.255’] vs_resources = [{‘type’: ‘RESOURCE_TYPE_POOL’, ‘default_pool_name’: ‘’}] vs_profiles = [[{‘profile_name’: ‘/Common/fastL4’, ‘profile_context’: ‘PROFILE_CONTEXT_TYPE_ALL’}]]
In “vs_profiles” I’d like to use the, “Standard” profile instead of, “fastL4” but can’t figure out how to make the replacement.
2.) Add, “http” and “tcp” profiles with: obj_auth.LocalLB.VirtualServer.add_profile([‘SERVER_80’], profile_names)
profile_names = [[{‘profile_name’: ‘/Common/http’, ‘profile_context’: ‘PROFILE_CONTEXT_TYPE_ALL’},{‘profile_name’: ‘/Common/tcp’, ‘profile_context’: ‘PROFILE_CONTEXT_TYPE_ALL’}]]
3.) Add http_class with: \auth.LocalLB.VirtualServer.add_httpclass_profile([‘SERVER_80’], vs_http_class)
vs_http_class = [[{‘priority’: 0, ‘profile_name’: ‘/Common/HTTPS_REDIRECT’}]]
Can this be made to work or is there a shorter path. Not being able to use, “/Common/Standard” in step 1 for the profile name seems to be blocking further progress. Am I on track or is there an easier way to do this?