Re: [Netconf] about subtree filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Netconf] about subtree filtering
Hi,
----- Original Message -----
From: Martin Bjorklund <mbj at tail-f.com>
Date: Friday, June 26, 2009 4:35 pm
Subject: Re: [Netconf] about subtree filtering
To: Washam.Fan at huaweisymantec.com
Cc: andy at netconfcentral.com, netconf at ietf.org
> 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 { ... }
> }
> }
>
Well, the data model might like this:
container users {
list user {
container basic {
leaf name { ...}
leaf type {...}
leaf full-name { ... }
}
leaf role { ... }
}
}
So, the filter
<users>
<user>
<basic>
<name>fred</name>
<type/>
<full-name/>
</basic>
<role/>
</user>
</users>
will help return what I want?
Thanks,
washam
Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.