leaf-list diff
#2235
Replies: 2 comments 1 reply
-
Well, the term |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for responding. But, can you please elaborate on how the below diff can be applied to dtree1 to get dtree2 ? {
"testleaf": [
"B"
],
"@testleaf": [
{
"yang:operation": "replace",
"yang:orig-default": false,
"yang:orig-value": "A",
"yang:value": ""
}
]
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The diff API does not seem to give full diffs/annotations while changing order of elements in leaf-list. For ex, if we have leaf-list "testleaf", and the data tree dtree1 has the value [A, B], while the dtree2 has [B, A]. When we do dtree1.diff(dtree2), we get :
This does not give full idea of the diff, right? The first element A changed B, and second element B changed A.
Shouldn't it be something like below:
{
"testleaf": [
"B",
"A",
],
"@testleaf": [
{
"yang:operation": "replace",
"yang:orig-default": false,
"yang:orig-value": "A",
"yang:value": ""
},
{
"yang:operation": "replace",
"yang:orig-default": false,
"yang:orig-value": "B",
"yang:value": ""
}
]
}
Beta Was this translation helpful? Give feedback.
All reactions