pyaci
pyaci copied to clipboard
How to Query ACL Permit and Deny Logs
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')))