07-29-2020 02:43 AM - edited 07-29-2020 02:52 AM
I want to know how to find specific object with name. (i.e search EPG object with name)
I already know through the tutorial how to read the list of objects using the get method and for-loop statement.
I am looking for another way not to use a for loop.
I found the find method through the acitoolkit reference documentation, and I am wondering if this can do what I want to do.
If I can use the find class function to find an object with an attribute value, I also need sample code on how to use it.
Thank you for your help.. ^^
07-29-2020 05:40 PM
I found soulution...
I use get_deep method instead of find.
This is code snippet.
read_tenants_list = Tenant.get_deep(session, names=['common', 'Test_Tenant'], limit_to=['fvTenant', 'fvBD']
for tenant in read_tenants_list:
print(json.dumps(tenant.get_json(), indent=4)
02-01-2024 07:38 AM
Just following up on this and see if you still need help?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide