Subject: [netconf] Error to make a NETCONF action call without including an action node?

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Thu, 30 Apr 2020 15:05:06 +0000

Hi all,

If we have this YANG model (omitting some details):

   module test {
       container foo {
         leaf bar { type uint8; }
         action reset {
           input {
             leaf reset-at {
               type yang:date-and-time;
               mandatory true;
              }
            }
            output {
              leaf reset-finished-at {
                type yang:date-and-time;
                mandatory true;
              }
            }
         } // action reset
       } // container foo
   } // module

Should NETCONF return an error (which one?) for this request or would the server simply do nothing an return "OK" (like doing a get-data on a non-existent list entry) ?

     <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <action xmlns="urn:ietf:params:xml:ns:yang:1">
         <foo xmlns="urn:example:test">
         </foo>
       </action>
     </rpc>

Jason

---

From: Martin Björklund <[email-masked]>
Date: Thu, 30 Apr 2020 18:00:05 +0200 (CEST)

"Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]> wrote:
> Should NETCONF return an error (which one?) for this request or
> would the server simply do nothing an return "OK" (like doing a
> get-data on a non-existent list entry) ?
> 
>      <rpc message-id="101"

Yes, it should return an error, since the contents of <action> doesn't
contain any "action" node (no "reset").  It would probably send
"operation-failed".

/martin