digitalocean / digitalocean/icingaweb2-module-netboximport
API changes with 2.7.0 - value for status active instead of 1
- Dominant language
- PHP
- Stars
- 12
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
thanks a lot for this icinga2 module.
After upgrade to netbox 2.7.0 (https://github.com/netbox-community/netbox/releases/tag/v2.7.0) this module does not work anymore.
i have found that in issue https://github.com/netbox-community/netbox/issues/3569 they switched the status variable from 1 to active but this module always genereate a url with 1 instead of active.
example old url: http://xxx.xxx.xxx.xxx:80/api/dcim/devices/?limit=1000&status=1
example net url: http://xxx.xxx.xxx.xxx:80/api/dcim/devices/?limit=1000&status=active
with netbox 2.7.0 and newer you get with the old url an:
```
HTTP 400 Bad Request
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"status": [
"Select a valid choice. 1 is not one of the available choices."
]
}
```
i can not find the relevant changes in this module so i hope you can fix this.
thanks and regards
christian
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the code that generates the NetBox devices API URL and inspect how the status query parameter is set. Reproduce the request against NetBox 2.7.0 or newer; done means the module requests status=active instead of status=1 and no longer receives the shown HTTP 400 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100