Hi,

I am trying to interpret this statement in Section 8.3.1 Payload Parsing of RFC 6020.

o If data for a node tagged with "when" is present, and the "when" condition evaluates to "false", the server MUST reply with an "unknown-element" error-tag in the rpc-error.

With the context node defined Section 7.19.5. The when Statement

o If the context node represents configuration, the tree is the data in the NETCONF datastore where the context node exists. The XPath root node has all top-level configuration data nodes in all modules as children.

I am providing this dummy module to illustrate my question:

module dummy {
  namespace "http://dummy.com";;
  prefix "du";

  container root {
    leaf A {
      type empty:
    }
    leaf B {
      when "A";
      type uint32;
    }
  }
}

And I consider the following <edit-config> request, while A & B do not exist yet in the current datastore.

     <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <edit-config>
         <target>
           <running/>
         </target>
         <config>
           <root xmlns="http://dummy.com";>
             <A/>
             <B>
               3
             </B>
           </dummy>
         </config>
       </edit-config>
     </rpc>

During the parsing of the payload of the <edit-config>, leaf "A" is not yet present in the running datastore. The "when" statement that controls "B" evaluates to false.

Does this mean that the above edit-config request should be rejected with an "unknown-element" error-tag in the rpc-error? Or am I misinterpreting the RFC?

Yves
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to