nautobot-app-data-validation-engine icon indicating copy to clipboard operation
nautobot-app-data-validation-engine copied to clipboard

Inclusion test for the set of rule-breaking attributes

Open TitouanS31 opened this issue 6 months ago • 1 comments

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 avatar Aug 29 '24 13:08 TitouanS31