Forum Discussion
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?
- Abdessamad1
Cirrostratus
Hi,
You also have profile collections per type (Client_Ssls, Https, Tcps ...).
Reference documentation can be found here:
http://f5-sdk.readthedocs.io/en/latest/_modules/f5/bigip/tm/ltm/profile.html
http://f5-sdk.readthedocs.io/en/latest/apidoc/f5.bigip.tm.ltm.htmlmodule-f5.bigip.tm.ltm.profile
Regards.
- Peter_Baumann
Cirrostratus
Example for clientssl Profile:
mgmt = ManagementRoot(hostname, username, password) result = mgmt.tm.ltm.profile.client_ssls.client_ssl.load( name='clientssl_profile', ) print(result)
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