Subject: [netmod] What is the output of rpc-reply for <get> operation?

From: Yong Zhu <[email-masked]>
Date: Wed, 27 Jan 2016 23:08:31 +0000

Hi,

We got some question regarding netconf <get> operation's rpc-reply output.
For example, we have draft 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 <get> request is the following:
<rpc>
  <get>
<filter type="subtree">
  <AAA>
    <BBB>
        <CCC>
         <ccc_leaf1/>
           </CCC>
    </BBB>
</AAA>
</filter>
  </get>
</rpc>

What is the expected <rpc-reply>? More specifically, will CCC's key (leaf <ccc_name>) be included in rpc-reply? Will AAA/BBB's key (leaf <aaa_name> / <bbb_name>) 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 name</ccc_ leaf1>
    </CCC>
  </BBB>
<AAA>
  </data>
</rpc-reply>

Thanks
/Yong