Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-568

NetconfMessageTransformer action/rpc empty reply

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Magnesium, Aluminium, Sodium SR3
    • Fluorine
    • None
    • None

       If the action has output which has not mandatory fields and none of them is present, the NetconfMessageTransformer reports error.

      I found this problem to be present also for both the RPCs and actions.

      Example:

      Let's say we have two RPCs. One with output defined, but with non mandatory field and the second without output:

      rpc rpc-with-output {
         output {
            leaf not-mandatory-message {
               type string;
            }
         }
      }
      
      rpc rpc-without-output {
      }
      

       

      Regarding the Yang 1.1 RFC https://tools.ietf.org/html/rfc7950#section-7.14.4 there should be a possibility to return only "ok" message, when no output parameters are returned:
      If the RPC 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.

       

      So for both should be fine to get response:

      <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <ok/>
      </rpc-reply>
      

      But for the RPC with output defined "rpc-with-output" the NetconfMessageTransformer fails with error.

            Sanjana_Babu Sanjana Babu
            apuchyova Anna Bencúrová
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: