PaloAltoNetworks/pan-os-php

Filter rules by tag contains

bethatasitmay opened this issue · 1 comments

Is your feature request related to a problem?

This is more like a "nice to have" as I can work around it. It would be nice with type=rule to be able to filter on "(tag contains something)" rather than a serious of OR'd "(tag has something)."

Describe the solution you'd like

For example, for tagging unused rules I have several tags based on how long the rule has been unused - 90 days, 180 days, 1 year, COVID, Pre-COVID, etc. (the remaining are legacy tag names that don't correspond to a timeframe). They all are prefaced by "UNUSED-" so a filter such as (tag contains UNUSED) or (tag contains UNUSED-) would match all of these.

I use this to look for previously "unused" tagged rules such as when I want to disable the rules for future deletion.

Describe alternatives you've considered

Currently, I filter by a series of OR'd (tag has something) elements - one for each of the UNUSED-* tags.

Additional context

I would like to cutdown on the time it takes to build the filter (not a big deal as I have previous ones, but I would have to update them if any new tags have been introduced). Also, it would avoid errors of omission.

pan-os-php type=rule in=api://MGMT-IP actions=display 'filter=(tag has.regex /UNUSED-/)'