Forum Discussion
tatmotiv
Jun 01, 2016Cirrostratus
You need to take care about the following:
1.) In order to access a subcollection, you must first load the resource containing the subcollection.
2.) When the subcollection is named as plural (like in profiles), the according object for the request will need a suffix of "_s" appended to it.
Taking this into account, you could achieve what you want by doing the following:
session = BigIP('1.2.3.4', 'admin', 'password')
virtual = session.ltm.virtuals.virtual.load(partition='my_partition', name='my_virtual')
for profile in virtual.profiles_s.get_collection():
print(profile.name)
That would for example output a list of names of the profiles which are attached to that virtual.
HTH
Martin