scaleway / netbox-netprod-importer

Poll data from network devices in production and import it into netbox
GNU General Public License v3.0
101 stars 31 forks source link

mtu parameter added to napalm #30

Closed VictorPavlushin closed 4 years ago

VictorPavlushin commented 4 years ago

If napalm cannot determine it, it defaults to 0, and netbox accepts values greater than 0 or Null

aruhier commented 4 years ago

Hi @VictorPavlushin, Sorry, I don't see how this https://github.com/aruhier/netbox-netprod-importer/pull/30/files#diff-6d0a489e4e4740bb77e1ea290a0762c9R175 is different than what it did before.

The only thing I can see is that it will default to None if the MTU is 0 or "". Can you detail the issue you had and what this change is supposed to fix please? Was the MTU returned as a string before?

Thanks a lot again for your work!

VictorPavlushin commented 4 years ago

napalm returns 0 if it could not determine the MTU, and if 0 try to write to the netbox it gives an error: "Ensure this value is greater than or equal to 1."