Open dima1308 opened 1 year ago
I have recreated the problem. The XPATH function works, but is broken with the NETCONF filter handling.
The two cases above:
- In some cases, an empty response for the request
- Not expected value in the response.
The two cases are quite different, where (1) is in fact a bug, while (2) follows RFC6241
Issue (1) is a larger issue that requires some restructuring of the xmldb code + default values and is not an easy fix.
It is a necessary refactoring that has been planned for some time.
In short, it has to do with how the
Issue (2), RFC 6241 Section 8.9.1 says:
The response message contains the subtrees selected by the filter expression. For each such subtree, the path from the data model root node down to the subtree, including any elements or attributes necessary to uniquely identify the subtree, are included in the response message. Specific data instances are not duplicated in the response.
which clixon interprets as YANG keys must be included "to identify the subtree".
A client could make an xpath call (ie clixon_snmp) after the the
@olofhagsand may I ask you what is the status of the fix for this?
The refactoring necessary for this was initially planned for 6.2, but has now been pushed to 6.3. Refactoring of netconf input code was made before.
@olofhagsand Can I inquire about the status of the fix? It was scheduled for 6.3, but from what I can observe, it was not incorporated into the release.
Hm, it says it is fixed, and there is a patch, changelog entry and testcases. But it is not closed, which it should be (I will close it). Do you see it not fixed in some way? --Olof
On 2023-07-30 17:44, Dmitry Grinberg wrote:
@olofhagsand https://github.com/olofhagsand Can I inquire about the status of the fix? It was scheduled for 6.3, but from what I can observe, it was not incorporated into the release.
— Reply to this email directly, view it on GitHub https://github.com/clicon/clixon/issues/414#issuecomment-1657204822, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGD65IS2CPOUPXU4GDK3HDXSZ6NHANCNFSM6AAAAAAUMZHE7A. You are receiving this because you were mentioned.Message ID: @.***>
This bug prevents us from merging https://github.com/clicon/clixon/pull/415. I guess, we can merge it now since this bug is fixed. Correct?
@dima1308 @olofhagsand Looks like this bug has not been fixed (https://github.com/clicon/clixon/pull/415 fails still, due to this bug)
@dima1308 @shmuelhazan . On closer inspection, this refers to a refactoring that has not been made yet. Thus issue (1) above still remains and is not fixed.
@olofhagsand any plans to fix it?
Need to revisit. This code has been refactored.
When I execute the following query:
I get the following response:
Now, I'm only trying to get a list of interface names using the following query:
I got the expected result:
Next, I am trying to get interfaces with
alias='myeth2'
:I received the following result, as expected (we have one interface matching the condition):
And now, I'm trying to get only the name of the interface matching the same condition as above:
I got an empty response - which is not expected since the previous query returns one record matching the condition:
if I change the query as shown below, I got both values:
name
andalias
in the response: The request:The response:
In this case, I expect to get output that will only include
alias
We use CLIXON from Jan 20, 2023, hash: b3dcee96393a261984e64b5790ea1725b5d1f6ce
To summarize, I saw two issues:
Please see attached yang models we use: yang.zip