netbox-community / Device-Type-Library-Import

This library is intended to assist with importing device and module types into NetBox from the NetBox Community DeviceType-Library
https://github.com/netbox-community/devicetype-library
MIT License
247 stars 74 forks source link

Script replaces seemingly random existing images with each run #108

Open st-nip opened 9 months ago

st-nip commented 9 months ago

With one run, the script will create new device types, but then on subsequent runs it seems to overwrite device images with a new name, then the next sometimes it'll do the same again, and again.

Example: device type EMAT09-10

First run:

Difference

{ "front_image": "" }

{ "front_image": "devicetype-images/eaton-emat09-10.front.png" }

Second run:

Difference

{ "front_image": "devicetype-images/eaton-emat09-10.front.png" }

{ "front_image": "devicetype-images/eaton-emat09-10.front_8zE6qHf.png" }

Third run:

Difference

{ "front_image": "devicetype-images/eaton-emat09-10.front.png" }

{ "front_image": "devicetype-images/eaton-emat09-10.front_KCjLwwE.png" }

Of course, this is completely unnecessary and no doubt is filling up storage with random new images. I'm just wondering - why does the script even overwrite images in the first place? Surely it's enough to upload them once.

I pulled the version of the script down yesterday, so it's a current issue.

Azmodeszer commented 9 months ago

Can confirm, seemingly pointless image updates at random.

image