Skip to content
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

Support netbox 3.2.x versions #24

Closed
tsv1991 opened this issue Apr 6, 2022 · 3 comments
Closed

Support netbox 3.2.x versions #24

tsv1991 opened this issue Apr 6, 2022 · 3 comments

Comments

@tsv1991
Copy link
Contributor

tsv1991 commented Apr 6, 2022

When I upgrade Netbox to version 3.2.0, netbox_ddns plugin can not been installed.

Traceback (most recent call last):
  File "/opt/netbox-3.2.0/netbox/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/core/management/__init__.py", line 420, in execute
    django.setup()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/__init__.py", line 25, in ready
    super().ready()
  File "/opt/netbox-3.2.0/netbox/extras/plugins/__init__.py", line 68, in ready
    template_extensions = import_object(f"{self.__module__}.{self.template_extensions}")
  File "/opt/netbox-3.2.0/netbox/extras/plugins/utils.py", line 31, in import_object
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/template_content.py", line 5, in <module>
    from . import tables
  File "/opt/netbox-3.2.0/venv/lib64/python3.9/site-packages/netbox_ddns/tables.py", line 4, in <module>
    from utilities.tables import BaseTable, ToggleColumn
ImportError: cannot import name 'BaseTable' from 'utilities.tables' (/opt/netbox-3.2.0/netbox/utilities/tables.py)```
@tsv1991
Copy link
Contributor Author

tsv1991 commented Apr 6, 2022

#25 I prepared this PR for fast upgrade to NetBox 3.2.0, but it breaks working with lower versions.

@tsv1991
Copy link
Contributor Author

tsv1991 commented Apr 7, 2022

I modified PR #25 with support NetBox 3.1.x and 3.2.x.

Now fully tested on NetBox 3.1.7, 3.1.8, 3.1.10 and 3.2.0

@YWatchman
Copy link
Collaborator

Merged #25

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

2 participants