Subject: [Netconf] restconf default handling

From: Kent Watsen <[email-masked]>
Date: Wed, 31 May 2017 19:04:14 +0000

s3.5.4, p.3 says:

 If the target of a GET method is a data node that represents a leaf
 or leaf-list that has a default value and the leaf or leaf-list has
 not been instantiated yet, the server MUST return the default value
 or values that are in use by the server.  In this case, the server
 MUST ignore its "basic-mode", described in Section 4.8.9, and return
 the default value.

Is this really what we want?  What happened to trusting that clients
are YANG-aware?  How can a client otherwise test if a leaf is set 
(e.g., get a 404) without GET-ing the parent container and then 
checking if the leaf is present?

I ask because this doesn't seem right, and there may be a way to not
carry this into the support for revised-datastores...

K.

---

From: Andy Bierman <[email-masked]>
Date: Wed, 31 May 2017 12:09:21 -0700

> carry this into the support for revised-datastores...
I think this is right.
If the target resource is a leaf or leaf-list and the YANG default is
returned.
If the target resource is an ancestor of the same leaf or leaf-list then
the with-defaults mode determines if the default is added to the response.

If the client asks for a specific terminal node, then why not just return
it?
This is simpler for the client.

K.
Andy

>
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>