Forum Discussion
cathy_123
Aug 30, 2024Cirrostratus
Python script to get the SSL profile of a VIP
Hello guys I am creating an SSL automation and I am trying to get the ssl profile from inputted VIP.. I am using F5 rest api and I am not seeing much differences on the contents when I use this url ...
cathy_123
Dec 02, 2024Cirrostratus
hello Team, thank you for the response, I just added a script on to check all the profiles and see if that if the profile has certs on it.. it does take time though I wasnt able to get any solution aside from this.
- JRahmDec 02, 2024Admin
Hi cathy_123 here’s how I have handled that for comparison (from https://github.com/f5-rahm/pcap_utils/blob/main/capndecrypt.py#L175-L185)
Note that this is using bigrest library, you can extract out the endpoints and logic for your own purposes.def get_cssl_profile(bigip, vip_name): vip_profiles = bigip.load(f'/mgmt/tm/ltm/virtual/{vip_name}/profiles') cssl_profile = '' for profile in vip_profiles: if bigip.exist(f'/mgmt/tm/ltm/profile/client-ssl/{profile.properties.get("name")}'): cssl_profile = profile.properties.get('name') if cssl_profile != '': print(f'\tVirtual {vip_name} has associated client-ssl profile {cssl_profile}...continuing.') return cssl_profile else: sys.exit(f'\tVirtual {vip_name} has no associated client-ssl profile...exiting.')
- cathy_123Dec 02, 2024Cirrostratus
Thank you Jrahm! I will check on it
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