Forum Discussion
Mark_Stradling_
May 31, 2016Cirrus
F5 Python SDK - How to Get Profiles on a Virtual
I am using the F5 python SDK. It is awesome. Very useful. I am not, however, able to figure out how to access the subcollection of monitors attached to a virtual object. Any one have any idea how to ...
tatmotiv
Jun 02, 2016Cirrostratus
Here is a way to cycle through all of your virtuals and list all the profiles attached to them (should work for other subcollections as well):
session = BigIP('1.2.3.4', 'admin', 'xxxxxxxxxxxx')
for virtual in session.ltm.virtuals.get_collection():
virt = session.ltm.virtuals.virtual.load(partition=virtual.partition, name=virtual.name)
for profile in virt.profiles_s.get_collection():
print "Partition: %s Virtual: %s Profile: %s" % (virtual.partition, virtual.name, profile.name)
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