Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to provide filtering to validation rules #56

Open
whitej6 opened this issue Apr 27, 2023 · 1 comment
Open

Ability to provide filtering to validation rules #56

whitej6 opened this issue Apr 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@whitej6
Copy link
Contributor

whitej6 commented Apr 27, 2023

Environment

  • Nautobot version: 2.X.X
  • nautobot-data-validation-engine version: 3.X.X

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.

  • Ability to provide a filter to a validation rule

    • Either on queryset
    • OR skip conditions

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).

  • Device Type A has regex rule 1 whereas Device Type B has regex rule 2
@DistantVoyager DistantVoyager added enhancement New feature or request help wanted Extra attention is needed labels May 18, 2023
@DistantVoyager DistantVoyager removed the help wanted Extra attention is needed label Jul 29, 2024
@alhogan
Copy link

alhogan commented Nov 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants