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

Support of External Validation Services

Open jvanderaa opened this issue 2 years ago • 5 comments

Environment

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

Proposed Functionality

Support External Validation Services

Use Case

As an organization that operates a micro service to validate names of devices, I wish to be able to have the validation plugin reach out to these services to complete validations.

jvanderaa avatar Oct 21 '22 15:10 jvanderaa

What is the expected flow? Would you want to call such an external service directly at save time in nautobot?

What would be the expectation upon failure in the call to the external service? Would you want to raise a validation error and prevent the save?

lampwins avatar Nov 03 '22 11:11 lampwins

  1. At the point in the regex check, replace with a function that makes an external call, resulting in a pass fail, allowing for custom default. Allow for the function itself to determine what to do on a fail, with a possibility of a validation error.

jvanderaa avatar Nov 15 '22 14:11 jvanderaa

@jvanderaa should Nautobot define the contract for the REST call or does it need to be extensible like webhooks? Can we iterate on that?

lampwins avatar Nov 15 '22 18:11 lampwins

I'm not exactly sure what is being asked here on this part. I don't know that Nautobot should define the contact for anything, allowing for flexibility. What would be needed from the Data Validation plugin? Would we need it to define that?

jvanderaa avatar Nov 17 '22 17:11 jvanderaa

Giving a little bit more of a thought, could we do something similar to ChatOps, where we can register a sub-plugin that has the validation logic (maybe a call to 3rd party system). Then there is a service requirement that the system return certain data, likely a boolean true/false for the validation succeeding. That this needs to respond in a N amount of time.

The two use cases:

  • Name validation service, has a REST endpoint
  • IPAM validation, a check of a routing table of a host before allocating an IP prefix

jvanderaa avatar Mar 21 '23 00:03 jvanderaa