Skip to content

navigation.py is not compatible with NetBox v4 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jean1 opened this issue Mar 5, 2025 · 0 comments
Open

navigation.py is not compatible with NetBox v4 #33

jean1 opened this issue Mar 5, 2025 · 0 comments

Comments

@jean1
Copy link

jean1 commented Mar 5, 2025

cookiecutter-netbox-plugin version

0.2.0

Python version

3.12

Steps to Reproduce

When generating a plugin, the navigation.py uses an old import (extras.plugins) path which is no longer supported in NetBox v4 (see https://netboxlabs.com/docs/netbox/en/stable/plugins/development/migration-v4/#plugin-resources-relocated). The new path that must be used is "netbox.plugins"
The consequence is the plugin doesn't appear in the menu.

Moreover, when the path is fixed, NetBox raises another error message:
...
ImportError: cannot import name 'ButtonColorChoices'

As stated in https://netboxlabs.com/docs/netbox/en/stable/plugins/development/migration-v4/#remove-button-colors, the import of ButtonColorChoices must be removed.

Expected Behavior

The plugin should show up in the Plugin submenu in the left menu bar

Observed Behavior

No entry in the menu, plugin not loading even if path is fixed

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

No branches or pull requests

1 participant