libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

Question about carrying data in an <ok> response

Open Makinashout opened this issue 3 years ago • 2 comments

Hi, I'm part of a research group as PhD candidate in which we use libnetconf2 as a NETCONF implementation for SDN virtual environments. We are in the early stages of the architecture design for our new research, and we find very convenient to return data inside an NETCONF RPC response. We have been researching in the RFC and we didn't found any MUST rule that avoid using the response as a carrier for data, however we wanted to be sure that this is a possibility and we are not breaking libnetconf2 by trying to embed data into an response. Thanks in advance.

Makinashout avatar Jun 23 '22 11:06 Makinashout

Reading the standard, its says:

The <ok> element is sent in <rpc-reply> messages if no errors or warnings occurred during the processing of an <rpc> request, and no data was returned from the operation.

The point of standardization is interoperability. What do you hope to achieve by redefining the <ok/> response to encapsulate additional data? Presumably, nobody else but your SW would understand that.

jktjkt avatar Jun 23 '22 14:06 jktjkt

Are you aware there are basically 3 kinds of <rpc-reply> contents? It can succeed, when it returns just <ok/> or directly the output elements of the operation (called data reply) or fail when there is <rpc-error> element with more details. It seems to me you want to use the data reply.

michalvasko avatar Jul 13 '22 14:07 michalvasko