Re: [Netconf] about subtree filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Netconf] about subtree filtering
WashamFan <Washam.Fan at huaweisymantec.com> wrote:
> > Andy Bierman <andy at netconfcentral.com> wrote:
> > > This is fine.
> >
> > Yes.
> >
> > > 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.
> >
> > No, selection nodes do not form AND expressions - content match nodes
> > do. So even if no users/role exists, the fred user will be returned
> > (if it exists).
>
> Actually, that is what I want. I want all possible info about fred.
Ok.
> If fred has the role, please return the role info, elsewise, just return me
> the basic info.
This is probably just fine, but note that in your example you did:
<users>
<user>
<name>fred</name>
<type/>
<full-name/>
</user>
<role/> <!-- user's sibling-->
</users>
Which would correspond to this:
container users {
list user { ... }
leaf role { ... }
}
so the role - in your example - isn't a property of the user, but a
global property for all users.
The reasoning applies even if we do:
container users {
list user {
...
leaf role { ... }
}
}
/martin
Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.