miaow2 / netbox-config-diff

Find diff and push rendered device configurations from NetBox to devices and apply them.
https://miaow2.github.io/netbox-config-diff/
Apache License 2.0
74 stars 4 forks source link

Reverse compliance diff to show a patch to bring the device into the desired state #57

Closed Urth closed 4 months ago

Urth commented 6 months ago

Is your feature request related to a problem? Please describe. When I show the compliance diff to users there is confusion about which changes will be applied because the diff order does not match the expectations of the users. The diff shows how to patch the desired/rendered config to create the running config. e.g. diff -u rendered.cfg running.cfg

Describe the solution you'd like I believe it is more natural to have the compliance diff show the changes needed to patch the running config to create the desired config. e.g. diff -u running.cfg rendered.cfg

Additional context image In the diff prefix: 10.101.16.0/23 is the prefix configured in netbox, the desired/rendered config and prefix: 10.101.16.0/24 is from the running config. A configuration request would deploy prefix: 10.101.16.0/23 but in the diff it seems like it would be removed.

miaow2 commented 4 months ago

Closed by #59