Hi Deepak,

Probably, my example was a simplistic one where i wanted to highlight the default node , but i agree that a template consumer should be able to inherit data from a list of templates and at the same time, a single template could also contain data from different models. eg: one template could contain data nodes from interface as well as hardware models.

Issues #1 and #2 speak to this:

https://github.com/netmod-wg/template-reqs/issues/1 let’s a template-consumer consume a *list* of templates. 

https://github.com/netmod-wg/template-reqs/issues/2 let’s a template be a template-consumer too. 

Combined, these provide robust  support.   Is it accurate to say that you support these two requirements?

 If a template contains configuration data/data nodes of specific data models(instead of under anydata), the validation becomes relevant at definition.

This is true statement (modulo s/relevant /possible).  The question is if the tradeoff is worth it?

Some thoughts:

1) the need to validate a template that is *not* consumed is low.  

2) the need to validate a template that *is* consumed is high.  

Thankfully, with templates being expanded in <intended>, there should be a way for the expanded config to report which template (if any) values came from.  Thus validation errors could helpfully point to issues in consumed templates.  

In this way, templates are still validated  Albeit they are validated *implicitly*, after expansion (not explicitly before expansion). 

I suppose that a theory could be defined: a template is valid if its expansion is valid  Thoughts?

Assume, in the interfaces model, i want the value of the data-node "enabled" as false, and the template which contains this data node is configured accordingly(false).Now, I have multiple interfaces having the leaf "enabled"(which has a default value as true as per the yang model). If i make these interfaces to derive from the tempalate(henceforth becomes a template-consumer), then since we need to provide a priority to the data-node values in the template-consumer(overriding the template values: https://github.com/netmod-wg/template-reqs/issues/6) then the default value(True) takes precedence right?

I continue to struggle with this example not being clear.  Please provide xml/json snippets. 

It’s potentially important to note that the “default” statement’s value is used only when a ‘leaf’ node is not configured.

When the leaf node is configured, even if the same value as the “default”, an *explicit” mode server (RFC 6243) would no longer report that it is using the “default” value, whereas a “report-all” and “trim” mode servers don’t know.

This is why I asked before which “defaults” mode you were assuming…

Kent // contributor


_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to