Forum Discussion

Jason_Nance's avatar
Jason_Nance
Icon for Nimbostratus rankNimbostratus
May 17, 2018

Python SDK :: Get Specific Profile By Type from VS (or Identify Type of Profile)

I can pull all profiles for a virtual server like so:

from f5.bigip import ManagementRoot

mgmt = ManagementRoot(hostname, username, password)
myvirt = mgmt.tm.ltm.virtuals.virtual.load(name='my_virtual_server')
myvirtprofiles = myvirt.profiles_s.get_collection()

That list will have a mix of client SSL, server SSL, TCP, HTTP, etc profiles.

I'd like to be able to either pull all profiles of a specific type (for example, pull all client SSL profiles assigned to the virtual server or pull the http or tcp profiles assigned) or be able to identify the type of profile it is from the returned data.

Ideas?

2 Replies