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

Inclusion test for the set of rule-breaking attributes #178

Open
TitouanS31 opened this issue Aug 29, 2024 · 1 comment
Open

Inclusion test for the set of rule-breaking attributes #178

TitouanS31 opened this issue Aug 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@TitouanS31
Copy link

Environment

  • Nautobot version: 2.3.0
  • nautobot-data-validation-engine version: 3.1.1

Proposed Functionality

Allow to update an object if it does not break more validation rules.

More formally:
A: set of rule-breaking attributes before the update
B: set of rule-breaking attributes after the update

if B is a subset of A:
    allow the update
else:
   reject the update

With this feature, we can continue updating problematic objects without having to disable validation rules.

Use Case

  1. I have a device called Foo with no serial number.
  2. I set a regex rule for device names. It must begin with a D.
  3. I set a required rule for device serial.
  4. Foo breaks both rules.
  5. I find the missing serial number.
  6. I want to add the serial number in Nautobot.

Problem: I must fix all the issues caused by Foo. I also have to rename it, right now.

@TitouanS31
Copy link
Author

An easier way to relax the constraint might be to focus on the compliant boolean variable. We can reject an update if and only if it makes a compliant object non-compliant.

Before After Update Remark
0 0 Yes still non-compliant
0 1 Yes makes the object compliant
1 0 No makes the object non-compliant
1 1 Yes still compliant

@DistantVoyager DistantVoyager added the enhancement New feature or request label Nov 4, 2024
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

2 participants