On Wed, Nov 13, 2024 at 1:53 PM Kent Watsen <[email protected]> wrote:

> H Shiya,
>
> Consider a template that defines some interface data nodes using ietf
> interfaces yang model. Leaf node “type” is a mandatory data node according
> to RFC 8343.
>
>      +--rw interfaces
>
>         +--rw interface* [name]
>
>            +--rw name                        string
>
>            +--rw description?                string
>
>            +--rw type                        identityref
>
>
>
> So even if you have defined the “type” of the interface in the templates,
> you will be forced to set this at the reference point as well. Isn’t it?
>
>
> Yes, the “type” leaf would have to be set, in <intended> after all
> templates have been fully expanded/flattened (disclaimer: this is my
> worldview)
>
> Is your worldview that templates need to be validated when defined, even
> if not used?  (see https://github.com/netmod-wg/template-reqs/issues/4).
> If this is your view, then your example makes more sense.
>
>

The issue is what is in <running> I guess.
The client could have configured the templates, so isn't it all client data?

The templates are not the problem.
They have 'anydata' wrappers so no validation applies to them.

The client provides an incomplete entry /interfaces/interface.
It is not just the mandatory fields for the new data.
Any field provided by the template can be referenced in XPath somewhere in
the datastore.
NMDA does not seem to support templates very well.

   However,
   <running> MUST always be a valid configuration data tree, as defined
   in Section 8.1 of [RFC7950]
<https://www.rfc-editor.org/rfc/rfc7950#section-8.1>.



Kent
>
>

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

Reply via email to