Open jk2lx opened 2 years ago
Thanks for catching this issue @jan-linx. We'll investigate why the output isn't correct.
Haven't seen your reply before, but if that helps the reason why the diff is like that is because that's exactly how dictdiffer
package works. It takes ports as a list of elements so showing 0
for difference in first port element.
@jk2lx would your usage of the API be affected if we were to change the output of compare_config to simply be:
A:admin@c# /configure port 1/1/1 admin-state disable
*(gl)[/]
A:admin@c# compare
configure {
port 1/1/1 {
- admin-state enable
+ admin-state disable
}
port 1/1/c7 {
+ admin-state enable
}
}
i.e. the output of the CLI 'compare' command, with '+' and '-' to denote additions/changes?
When showing the diff for a port admin-state change on an SR-7s, the diff does shows port numbers which cannot be correlated to any port:
Instead the diff should show the actual port name:
diff.json.txt