nautobot / nautobot-app-data-validation-engine

Data validation rules engine app to easily codify corporate data standards
https://docs.nautobot.com/projects/data-validation/en/latest/
Other
18 stars 6 forks source link

Ability to provide filtering to validation rules #56

Open whitej6 opened 1 year ago

whitej6 commented 1 year ago

Environment

Proposed Functionality

Currently, DVE's various validation rules are applied for all instances of a chosen content type. However, there are many times where validation rules might exist that are only relevant to a specific filtered subset of that grouping.

As a network automation engineer, I want the ability to apply validation rules to either all object instances of a certain content type or only a filtered subset, so that I can achieve differing validation rules that are not necessarily global.

Use Case

Within Company X, we have two primary departments within our network org: Core and Access. I want to enforce naming standards for our network devices. However, the naming standards are not the same for Core and Access. Each department has their own set of rules defined for the devices that they manage.

When creating Regex Rules for the dcim | device content type's name field using DVE, rather than only being able to create rules that will apply to all device objects, I want to be able to create one rule with the naming standards for Core (i.e. devices whose role is Core) and another rule with the naming standards for Access (i.e. devices whose role is Access), where each rule only applies to the relevant department's devices (e.g. filtered by device role).

alhogan commented 4 days ago

Adding an optional relationship to Tenant or Role might be a good first step.