Subject: [netmod] Question on Subtree Filtering Usage Example

From: "maqiufang (A)" <[email-masked]>
Date: Fri, 6 Aug 2021 09:29:50 +0000

Hi, all:

In RFC6241 section 6.4(https://datatracker.ietf.org/doc/html/rfc6241#section-6.4), several single subtree filtering examples are given.
I am wondering whether we can select multiple elements within the <users> Subtree.
Note that we also assume "users" parent element is the container with presence substatement.
Here is the RPC request message with specific subtree filtering :
     <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <get-config>
         <source>
           <running/>
         </source>
         <filter type="subtree">
           <top xmlns="http://example.com/schema/1.2/config">
             <users>
               <user>
                    <name/>
                     <type/>
               </user>
             </users>
           </top>
         </filter>
       </get-config>
     </rpc>

I am wondering what RPC response will look like? It will respond with null or it will respond as follows:
     <rpc-reply message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
       <data>
         <top xmlns="http://example.com/schema/1.2/config">
           <users>
             <user>
               <name>root</name>
               <type>superuser</type>
             </user>
             <user>
               <name>fred</name>
               <type>admin</type>
             </user>
          </users>
       </top>
   </data>
</rpc-reply>

Best Regards,
Qiufang Ma

---

From: Jürgen Schönwälder <[email-masked]>
Date: Fri, 6 Aug 2021 12:35:13 +0200

Hi,

you may want to send your question to the netconf list since this is a
protocol question and not a YANG question. (Concerning your question,
please read section 6.2.4 "Selection Nodes". There is no restriction
to only one selection node as far as I can tell.)

/js

> _______________________________________________
> 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         <https://www.jacobs-university.de/>