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

Templates must be validated when defined (not only when used) #4

Open
kwatsen opened this issue Nov 13, 2024 · 4 comments
Open

Templates must be validated when defined (not only when used) #4

kwatsen opened this issue Nov 13, 2024 · 4 comments

Comments

@kwatsen
Copy link

kwatsen commented Nov 13, 2024

Requirements

This requirement validates templates at the time they are defined, as opposed to only when they are used. Since templates must be defined prior to being referenced, this means that unreferenced templates are validated.

Non-Requirements

Implicit in this requirement is that templates would have to be model-specific (i.e., their YANG known) in order to be validated. Requirements for how the data-model for a template would be known are NOT specified here, leaving those requirements to be specified elsewhere.

@kwatsen kwatsen changed the title templates must be validated when defined (not only when used) Templates must be validated when defined (not only when used) Nov 13, 2024
@jsterne
Copy link

jsterne commented Nov 14, 2024

Should we differentiate here between basic syntax validation (e.g. right type & range) vs semantic validation (e.g. mandatory and min-element statements, must statements, when statements, etc)?

@RobertPeschi
Copy link

The datastore does not contain the template themselves #15

As commented in #15, I am still struggling on why the intended data store should not contain the templates themselves

@kwatsen
Copy link
Author

kwatsen commented Dec 4, 2024

As commented in #15, I am still struggling on why the intended data store should not contain the templates themselves

Please keep comments with each issue/requirement. Just because an issue/requirement is linked, doesn't mean that all its comments need to be carried over.

@robertjwills
Copy link

Expanding on Jason's point, perhaps we should distinguish between two different cases of validation failure:

  • Any possible instantiation of the template would result in an expanded config that doesn't validate. In this case, the template is not allowed. This would cover basic type and range checks.
  • Some instantiations of the template would be valid, others invalid. In this case, the template is allowed.

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

No branches or pull requests

4 participants