dainok / netdoc

Automatic Network Documentation plugin for NetBox
GNU General Public License v3.0
84 stars 14 forks source link

Do not update netbox when running netdoc without any change #101

Closed dietybright closed 8 months ago

dietybright commented 8 months ago

I am trying to send event to telegram via netbox webhook whenever netdoc script detect any change

But for netmiko script, netdoc always update to device/interface even no any change, anyway to ignore if no any change?

dainok commented 8 months ago

@dietybright to be honest I expect objects are updated only if needed: https://github.com/dainok/netdoc/blob/master/netdoc/utils.py#L1094 Except MAC addresses and ARP, other objects should not be saved if nothing changed. On which objects do you see the issue?

dietybright commented 8 months ago

On dcim | interface object, the device is cisco ios

dainok commented 8 months ago

@dietybright please check https://github.com/dainok/netdoc/pull/99/commits/8a42ebf9b7f506abd50e82259734db78e18c3207 I'm not ready to merge yet, but if you can I appreciate you test it.

dainok commented 8 months ago

@dietybright please check https://github.com/dainok/netdoc/pull/99

dainok commented 8 months ago

@dietybright please check https://github.com/dainok/netdoc/releases/tag/3.5.11 and let me know

dietybright commented 8 months ago

Sorry for late, I have updated to netdoc 3.5.14, all good, thanks very much