[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xpath filter



Cridlig Vincent <vincent.cridlig@loria.fr> wrote:
> >>Moreover, the XPath expressions without prefix are still valid.
> >>    
> >>
> >
> >Do you check all namespaces in this case?
> >  
> >
> yes. Actually, we load the entire configuration data and then apply a 
> filter (easy solution but not performant).
> Ideally, it should parse the XML schemas to find some matching nodes (or 
> search in a dictionnary built from the schemas), load the configuration 
> data of each matching schemas and finally filter.
> 
> For now, namespaces are not very well handled in our agent because I was 
> waiting for some clarifications on this context problem. Still some work 
> in the pipe...
> 
> What about you ?

Our agent knows the data model, and thus we can do two things when
filtering: if the filter uses a instance key, we just read the
corresponding instance and continue filtering down there.
(e.g. "interfaces/interface[ifName=eth0]/...")
When no instance identifier is specified
(e.g. "interfaces/interface[ifType=ethernet]/...") we check the match
nodes (in the example ifType of each instance, if a match is found we
read the rest of instance.  This means that if you just want to read
one or a few parameters in a given instance, we'll just do one read to
the db to get the instance.

As for namespaces for xpath, we don't handle that either - we're also
waiting for clarification.  For subtree filtering we handle
namespaces though.


/martin



--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>