Subject: [Netconf] [netconf] Question on the output of <get> rpc-reply for operational model?

From: Yong Zhu <[email-masked]>
Date: Thu, 28 Jan 2016 19:27:08 +0000

Hi Workgroup,

Based on js's feedback, I forward my question to netconf workgroup.

We got some question regarding netconf operation’s rpc-reply output.
For example, we have draft operational model as follows (list AAA contains list BBB which contains list CCC):
list AAA {
  key "aaa_name";
  config false;
  leaf aaa_name {
    type string;
  }
  leaf aaa_leaf1 {
    type int32;
   }
   list BBB { 
     key "bbb_name";
     config false;
     leaf bbb_name {
       type string;
     }
     leaf bbb_leaf1 {
       type uint32;
     }
     list CCC {
       key "ccc_name";
       config false;
       leaf ccc_name {
         type string;     
       }
       leaf ccc_leaf1 {
         type uint32
       }
     } //list CCC
  } //list BBB
} //list AAA

The netconf <rpc> request is the following:
<rpc>
  <get>
    <filter type="subtree">
      <AAA>
       <BBB>
        <CCC>
          <ccc_leaf1/>  //query on ccc leaf node
        </CCC>
       </BBB>
      </AAA>
   </filter>
  </get>
</rpc>

What is the expected ? More specifically, will CCC’s key (leaf ) be included in rpc-reply? Will AAA/BBB’s key (leaf / ) be included in rpc-reply?
The following is what I am thinking now. Please comment.
<rpc-reply>
<data>
  <AAA>
    <aaa_name>my aaa name</aaa_name>
    <BBB>
      <bbb_name>my bbb name</bbb_name>
      <CCC>
       <ccc_name>my ccc name</ccc_name>
       <ccc_leaf1>my ccc leaf1</ccc_leaf1>
      </CCC>
    </BBB>
  </AAA>
</data>
</rpc-reply>

Thanks
/

---

From: Mahesh Jethanandani <[email-masked]>
Date: Thu, 28 Jan 2016 15:20:25 -0800

Yong,

In addition to giving feedback, did Juergen not answer the question also? I am including his response. Did you have questions about his response?

> Hi,
> 
> your question is mainly a protocol question and not so much a YANG
> question so it probably belongs to NETCONF more than NETMOD. RFC 6241
> in the section describing subtree filtering says:
> 
>   o  If any sibling nodes of the selection node are instance identifier
>      components for a conceptual data structure (e.g., list key leaf),
>      then they MAY also be included in the filter output.
> 
> I would expect that sensible implementations implement the MAY and
> include sibling key leafs (and that they would do this recursively).
> 
> /js

> On Jan 28, 2016, at 11:27 AM, Yong Zhu <[email-masked]> wrote:
> 
> Hi Workgroup,
> 
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

Mahesh Jethanandani
[email-masked]