Thanks Martin. I should have found that myself when I was looking through that section.
What about the case where the operation invocation did not succeed and there are no output parameters defined ? Rgds, Jason > -----Original Message----- > From: Martin Bjorklund [mailto:[email protected]] > Sent: Thursday, June 7, 2018 5:21 PM > To: Sterne, Jason (Nokia - CA/Ottawa) <[email protected]> > Cc: [email protected] > Subject: Re: [netmod] YANG actions - need to define OK/error or can reuse > NETCONF ok/rpc-error ? > > Hi, > > "Sterne, Jason (Nokia - CA/Ottawa)" <[email protected]> wrote: > > Hi all, > > > > When defining an 'action' in a YANG 1.1 model, and we want the server > > to be able to respond with <ok> or some error information, do we need > > to define the ok/error info in the 'output' of the action, or can we > > define an action without any 'output' statement and have the server > > respond using the typical <ok> or <rpc-error> in NETCONF ? > > You don't need to define "ok" - see section 7.15.2, the last paragraph > of RFC 7950: > > If the action operation invocation succeeded and no output parameters > are returned, the <rpc-reply> contains a single <ok/> element defined > in [RFC6241]. If output parameters are returned, they are encoded as > child elements to the <rpc-reply> element defined in [RFC6241], in > the same order as they are defined within the "output" statement. > > > > /martin > > > I'm not sure if it is relevant, but when I look at the definition of > > the commit rpc in the NETCONF spec, there is no 'output' defined but > > clearly a response of <ok> or an rpc-error can be returned by a > > server. > > > > If we don't define the ok/error in the action itself then I suppose > > other types of interfaces (RESTCONF) may or may not have other ways to > > reply ok/error (at least it won't be defined by the YANG model for the > > particular action). > > > > But it does seem like a waste to go and specify ok/error information > > for every action out there if they only need to return ok or error > > information that could be carried in the standard rpc-error message. > > > > Rgds, > > Jason _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
