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
265 stars 82 forks source link

Add module bays and module types. #52

Closed dmcken closed 2 years ago

dmcken commented 2 years ago

Adds support for importing the device type module-bays.

Requires IMPORT_MODULES=True to be set for the code to activate (was debating if to detect automatically from the netbox version).

Will do the module-types in a separate pull request.

ndom91 commented 2 years ago

I'd say your safe defaulting to module-bays enabled, no? My opinion is this should always be up-to-date and working with the latest Netbox version. No need for extra backward compatibility.

But that's just my opinion, maybe @minitriga sees it differently

dmcken commented 2 years ago

I am fine with it either way.

I guess once its tested a bit more we can change the default later on.

dmcken commented 2 years ago

Fully functional, importing modules as well now.

Did a complete import on a fresh 3.3.2 (latest docker image).

ndom91 commented 2 years ago

When you're ready, don't forget to set it out of draft and "ready to review" and tag @minitriga as reviewer 👍

dmcken commented 2 years ago

Just doing some minor cleanup and want to test it against 3.2 before I finalize.

Just removed the manual setting, it will automatically detect the version to figure out if to sync modules or not.

dmcken commented 2 years ago

Ok, so 3.2.9 is working (I still use it as some plugins I use aren't ready for 3.3 yet).

The final result of a sync at the moment:

Script took 0:16:17.233122 to run
1724 devices created
42593 interfaces/ports updated
89 manufacturers created
141 modules created
1657 module interface / ports created
ndom91 commented 2 years ago

Awesome, thanks! I'd also recommend updating the "tested with...3.2" towards the top of the README 👍

Also don't forget to add minitriga as reviewer

dmcken commented 2 years ago

I can't change the reviewer at the moment.

The option to link / close matching issues isn't available either so I assume thats something only the repo owners / maintainers can do.

minitriga commented 2 years ago

Thank you very much for this work. Looks good. Yes we should default to latest version of Netbox. I'm not interested in backwards compatibility for this project. Thank you @ndom91 @dmcken