-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Environment
- Python version: 3.9.5
- NetBox version: 3.0.2
- ntc-netbox-plugin-metrics-ext version: 1.0.0
Steps to Reproduce
- Use plugin with default settings on NetBox 3.0.2
- Navigate to API endpoint
/api/plugins/metrics-ext/app-metrics
Expected Behavior
Regular output just as designed.
Observed Behavior
<class 'ImportError'>
cannot import name 'ReportResult' from 'extras.models' (/opt/netbox/netbox/extras/models/__init__.py)
Python version: 3.9.5
NetBox version: 3.0.2
The cause is the version check in:
if netbox_version.major >= 2 and netbox_version.minor >= 9: |
The minor version check rules out anything other than 9 or above.
So e.g. 3.9.0 would be allowed, while 3.0.2 is not.
Suggestion:
if netbox_version >= version.parse("2.9.0"):
a-palirus, XioNoX and llamafilm
Metadata
Metadata
Assignees
Labels
No labels