cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
652
Views
0
Helpful
2
Replies

ACI Cobra - "Contains" filter in ClassQuery propFilter

Hello people,
 
I was wondering if I can filter queries with the propFilter option using other comparator than eq (equal), I would like to use something similar to "contains"
 
For example, I want to get all ports with certain "word" in description; in moquery I used '*' to make a 'contains or include' filter instedad of '==':
 
moquery -c l1PhysIf -f 'l1.PhysIf.descr*"YZXO780"'
 
But, I down know how to implement it in Cobra, I've just found the 'eq' option, but it's not suitable in my use case:
 
query = ClassQuery('l1PhysIf ')
query.propFilter = 'eq(l1.PhysIf.descr, "YZXO780")'

I know I can get the information in other ways, but I would like to know what others operators can be used with propFilter. I haven;t fount it any documentation. Thanks.

1 Accepted Solution

Accepted Solutions

Karol Farago
Level 1
Level 1

here are the other REST API Operators

KarolFarago_0-1685450548443.png

 

View solution in original post

2 Replies 2

Karol Farago
Level 1
Level 1

here are the other REST API Operators

KarolFarago_0-1685450548443.png

 

Karol Farago
Level 1
Level 1

here is an example of using wcard with propFilter

Link 

KarolFarago_1-1685734834188.png

 

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License