Open Dz3015 opened 6 days ago
that is expected behaviour in my book. if you want to filter them from the diff, did you try to filter them with the exclude regex in the platform settings?
that is expected behaviour in my book. if you want to filter them from the diff, did you try to filter them with the exclude regex in the platform settings?
Yes that is exactly what I did. I have filtered these lines in the platform settings. I would expect at that point they are ignored by the diff, not marked.
Hi @Dz3015 thanks for opening the issue,
I added tweak before diff, that replaces long sequences of new lines with only one line, is his fine solution for you?
>>> a = "a\n\n\n\n\n\n\n\n\n\nb\na\n\n\n\n\n\n\n\n\n\nb"
>>> re.sub("\n{3,}", "\n", a)
'a\nb\na\nb'
>>>
If this would then cause the configs to match and not show status as "Diff". My goal is that my team can review a daily report out of netbox to review configs showing a "Diff" status but it seems that these lines are not new lines but lines that were filtered out in my platform settings and are showing up that way rather than being ignored. Thank you as always for all the work on this module!
NetBox version v4.0.6
Describe the bug On many devices I am showing large blocks of empty lines that are marked as diffed:
To Reproduce Steps to reproduce the behavior:
Expected behavior Diff only for lines containing config
Screenshots
Additional context Filters are applied on the Platform settings