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

Wherever a template-reference can occur, it must be possible delete nodes from the template. #5

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

Comments

@kwatsen
Copy link

kwatsen commented Nov 13, 2024

Requirement

This requirement enables the consumer of a template to remove nodes from a template. For instance, a template may be perfect in many ways, but it sets a value for a leaf when the template-consumer actually wants to let the leaf use its default value.

Non-Requirements

None

@RobertPeschi
Copy link

Just for my clarification, is that different form the capability to overrule a template value as per issue #6 ? The case that you raise could be reached by the template consumer explicitly configuring its default value. Or do I miss your point ?

@kwatsen
Copy link
Author

kwatsen commented Nov 14, 2024

Yes, different.

Overriding (per #6) is when, e.g., a template sets a value (e.g., mtu 1500) and the template-consumer overrides it with a more specific value (e.g., mtu 1492). This is the "last one wins" strategy.

This issue/requirement is different where, e.g., the template sets a value (e.g., enabled=true) and the template-consumer deletes it, so now there is no "enabled" node configured causing, e.g., the expanded/flattened configuration to use the YANG-defined 'default' value.

@RobertPeschi
Copy link

OK 'get it. Tx.

@derajara
Copy link

in case, the node is not deleted by the template-consumer, we will still have 1> value from the template 2> default value from the template-consumer when we try to merge/expand is it not?

@kwatsen
Copy link
Author

kwatsen commented Nov 15, 2024

in case, the node is not deleted by the template-consumer, we will still have 1> value from the template 2> default value from the template-consumer when we try to merge/expand is it not?

I don't understand this question.

@derajara
Copy link

I'm looking at a scenario, where the template consumer(s) already are being managed by the same data models, (maybe in a mounted fashion) and if we now want to make these consumers derive from a common template, then we have a situation, where we have a value coming from a template and the existing value from the same data model of each template consumer.

@kwatsen
Copy link
Author

kwatsen commented Nov 18, 2024

I'm looking at a scenario, where the template consumer(s) already are being managed by the same data models, (maybe in a mounted fashion) and if we now want to make these consumers derive from a common template, then we have a situation, where we have a value coming from a template and the existing value from the same data model of each template consumer.

For this scenario, it seems that what’s missing is a step to delete the local configuration redundantly defined by a template consumer. Albeit related, this is a different issue (i.e., delete local vs remote node)

Should we add an issue/requirement for, e.g., action statements to:

  • report where (which template) a node’s value comes from
  • identify local values having the same value as from a template
  • etc.

@derajara
Copy link

I think, reporting the source of value will be known with the template-reference, ie , for each template-consumer, we need to provide the reference to a template, that can report where the value comes from. for identifying same values: as per [https://github.com//issues/6] , anyways, we need to provide higher priority to the value coming from individual template-consumer, so even though if it is the same value, it needs to be overwritten

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

3 participants