Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Without this fix frr-reload would do a del/add even if the only
difference were bogus whitespaces.
root@cel-redxp-10[nclu]# /usr/lib/frr/frr-reload.py --test
/etc/frr/frr.conf
Lines To Delete
===============
router bgp 100
no bgp router-id 1.1.1.1
Lines To Add
============
router bgp 100
bgp router-id 1.1.1.1
root@cel-redxp-10[nclu]#
for line in file_output.split('\n'):
line = line.strip()
+
+ # Compress duplicate whitespaces
+ line = ' '.join(line.split())
+
if ":" in line:
qv6_line = get_normalized_ipv6_line(line)
self.lines.append(qv6_line)