cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
231
Views
0
Helpful
1
Replies
Highlighted
Beginner

About find method in acitoolkit..

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.. ^^

 

 

 

 

1 REPLY 1
Highlighted
Beginner

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)

Content for Community-Ad

This widget could not be displayed.