Re: [Netconf] about subtree filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Netconf] about subtree filtering
WashamFan wrote:
> Hi,
>
>>From sec6.4.6, rfc4741, there is a request using subtree:
>
> <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>fred</name>
> <type/>
> <full-name/>
> </user>
> </users>
> </top>
> </filter>
> </get-config>
> </rpc>
>
> But what if users contains another element, let's say <role>
> and I also want it returned, so is it legal, and is it returned as
> the intent?
>
> <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>fred</name>
> <type/>
> <full-name/>
> </user>
> <role/> <!-- user's sibling-->
> </users>
> </top>
> </filter>
> </get-config>
> </rpc>
>
This is fine.
This is just another selection node, like if <user/> was empty.
If there is no <role> in the entry, the whole thing will be
left out, because the select nodes form an AND expression.
> Thanks,
> washam
Andy
Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.