> On Jun 19, 2019, at 2:37 AM, Ramon Casellas <[email protected]> wrote: > > Dear all, > > Apologies if this is a FAQ, or a basic question but we have been recently > involved in using RESTCONF / YANG as a controller NBI to request optical > connections in the photonic media layer within the TAPI framework and we have > a doubt. > > TL&DR: is it possible to create a list entry without specifying its key, > assuming that the server can allocate such key while processing the request ?
The expected answer is "no", because, as RFC 7950 Section 7.8.2 says: '''the "key" statement ... MUST be present if the list represents configuration''', and hence most tooling will expect the keys to be present in POST operations. That said, note that the requirement is on data-at-rest and not specifically data-on-wire, so there might be wiggle-room for a server-allocated value to be inserted between receiving the POST request and updating <running>. However, RFC 8040 Section 4.4.1 says "the message-body MUST contain exactly one instance of the expected data resource. The data model for the child tree is the subtree, as defined by YANG for the child resource.". This puts a constraint on the data-on-wire, though the "is" isn't RFC 2119 language and therefore the true meaning could be debated. Kent // contributor
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
