Skip to content

Conversation

@dmcken
Copy link
Contributor

@dmcken dmcken commented Sep 7, 2022

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.

Add create_module_bays and activate in createDeviceTypes()
@ndom91
Copy link
Contributor

ndom91 commented Sep 7, 2022

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
Copy link
Contributor Author

dmcken commented Sep 7, 2022

I am fine with it either way.

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

@dmcken dmcken marked this pull request as draft September 7, 2022 20:17
@dmcken
Copy link
Contributor Author

dmcken commented Sep 8, 2022

Fully functional, importing modules as well now.

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

@dmcken dmcken changed the title Add module bay Add module bays and module types. Sep 8, 2022
@ndom91
Copy link
Contributor

ndom91 commented Sep 8, 2022

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

Instead automatically detect via version 3.2 or higher.
@dmcken
Copy link
Contributor Author

dmcken commented Sep 8, 2022

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
Copy link
Contributor Author

dmcken commented Sep 8, 2022

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

@dmcken dmcken marked this pull request as ready for review September 8, 2022 19:17
@ndom91
Copy link
Contributor

ndom91 commented Sep 9, 2022

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
Copy link
Contributor Author

dmcken commented Sep 9, 2022

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.

Removed type hint which is throwing an error on python 3.8.10
@minitriga
Copy link
Collaborator

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

@minitriga minitriga merged commit 730c8d2 into netbox-community:master Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants