pyaci icon indicating copy to clipboard operation
pyaci copied to clipboard

How to Query ACL Permit and Deny Logs

Open the-modern-leo opened this issue 5 years ago • 3 comments

Looking to get information about how to perform these queries with Pyaci. There are some information in the article below at the end of the page titled "Viewing ACL Permit and Deny Logs Using the REST API" Here

When running something like this:

result = apic.mit.polUni().fvTenant('Enterprise').GET(**options.subtreeClass('acllogPermitL3Pkt')) I get an empty list. To perform the same thing in Cobra ACI would be: result = self.cobramd.lookupByClass('acllogPermitL3Pkt')

How would i perform this action in Pyaci?

Also how would i pass in an and filters?

Something like this: result = apic.mit.GET(**options.subtreeClass('acllogPermitL3Pkt') & options.filter(filters.Wcard('acllogDropL3Pkt.dn', f"ndbgs/acllog/tn-{tenant}" filters.Wcard('acllogDropL3Pkt.destination') & filters.Wcard('acllogDropL3Pkt.srcIp','10.71.0.164')))

the-modern-leo avatar Feb 05 '20 21:02 the-modern-leo