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

From: Yong Zhu <[email-masked]>
Date: Thu, 28 Jan 2016 15:51:43 +0000

Hi Work group,

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 request is the following:

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.

  my AAA name //???

    my BBB name //???

      my CCC name //???

      my ccc leaf1 name

Thanks

/Yong

---

From: Kent Watsen <[email-masked]>
Date: Thu, 28 Jan 2016 16:24:49 +0000

Hi Yong,

The formatting on your message makes it difficult to read - please consider sending to the list using plain text.

Otherwise, see below for comments - look for [KENT]...

Thanks,
Kent

From: netmod <[email-masked]<mailto:[email-masked]>> on behalf of Yong Zhu <[email-masked]<mailto:[email-masked]>>
Date: Thursday, January 28, 2016 at 10:51 AM
To: "[email-masked]<mailto:[email-masked]>" <[email-masked]<mailto:[email-masked]>>, Yong Zhu <[email-masked]<mailto:[email-masked]>>
Subject: [netmod] Question on the output of <get> rpc-reply for operational model?

Hi Work group,

                        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

[KENT] the request seems to be missing here

What is the expected ?

[KENT] this depends on what data is configured on the server

More specifically, will CCC’s key (leaf ) be included in rpc-reply? Will AAA/BBB’s key (leaf / ) be included in rpc-reply?

[KENT] generally, list keys are returned (e.g., "aaa_name”).  The usage example here shows how a list is encoded in XML: https://tools.ietf.org/html/draft-ietf-netmod-rfc6020bis-09#section-7.8.3.1

  my AAA name //???

    my BBB name //???

      my CCC name //???

      my ccc leaf1 name

[KENT] I don’t understand this at all.

Thanks

/Yong

---

From: Yong Zhu <[email-masked]>
Date: Thu, 28 Jan 2016 17:39:04 +0000

Hi Kent and Workgroup,

Thank for your reminder. I convert to plain-txt (my old format is terrible. J) Please share your thought.
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
/Yong

From: Kent Watsen [mailto:[email-masked]] 
Sent: Thursday, January 28, 2016 8:25 AM
To: Yong Zhu; [email-masked]
Subject: Re: [netmod] Question on the output of <get> rpc-reply for operational model?

Hi Yong,

Thanks,
Kent

From: netmod <[email-masked]> on behalf of Yong Zhu <[email-masked]>
Date: Thursday, January 28, 2016 at 10:51 AM
To: "[email-masked]" <[email-masked]>, Yong Zhu <[email-masked]>
Subject: [netmod] Question on the output of <get> rpc-reply for operational model?

Hi Work group,

                        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

  

           

 

What is the expected ? 

  

  my AAA name //???

    my BBB name //???

      my CCC name //???

      my ccc leaf1 name

  

Thanks

/Yong

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 28 Jan 2016 19:03:23 +0100

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 Thu, Jan 28, 2016 at 05:39:04PM +0000, Yong Zhu wrote:
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>