NetBox version
netbox: 4.0.8
netbox-bgp: 0.13.2
pynetbox: 7.4.0
Describe the bug
When using pynetbox and I try to use the .save() or .update() methods on an object via the API I get an error that the URL could not be found. The URL that it complains about seems to be missing 'plugins' in the path
To Reproduce
Using pynetbox fetch an object via API, make a change and then try .save() method on the object.
{'comments': '',
'custom_fields': {},
'description': '',
'display': 'PL_TEST',
'family': 'ipv4',
'id': 198,
'name': 'PL_TESTAPI',
'tags': [],
'url': 'http://localhost:6999/plugins/bgp/prefix-list/198/'}
Traceback (most recent call last):
File "/home/rvt/scripts/netbox-mover/testing.py", line 26, in <module>
prefixlist.save()
File "/home/rvt/scripts/netbox-mover/.venv/lib/python3.10/site-packages/pynetbox/core/response.py", line 571, in save
if req.patch(updates):
File "/home/rvt/scripts/netbox-mover/.venv/lib/python3.10/site-packages/pynetbox/core/query.py", line 398, in patch
return self._make_call(verb="patch", data=data)
File "/home/rvt/scripts/netbox-mover/.venv/lib/python3.10/site-packages/pynetbox/core/query.py", line 260, in _make_call
raise RequestError(req)
pynetbox.core.query.RequestError: The requested url: http://localhost:6999/api/bgp/prefix-list/198/ could not be found.
Same result if I try for example prefixlist.update({"name": "PL_TEST_API", "display": "PL_TEST_API"})
Expected behavior
For the changes to be saved. This works ok for me in netbox 3.7.4 and netbox-bgp 0.12.1, same pynetbox version.
Additional context
This happens for me on policies and sessions as well. I can update just fine using requests and PATCH, however wondering if something changed recently which breaks the URL pynetbox is using.
Also I notice the url attribute on the returned object is missing 'api' in the path compared to other netbox objects
NetBox version netbox: 4.0.8 netbox-bgp: 0.13.2 pynetbox: 7.4.0
Describe the bug When using pynetbox and I try to use the .save() or .update() methods on an object via the API I get an error that the URL could not be found. The URL that it complains about seems to be missing 'plugins' in the path
To Reproduce Using pynetbox fetch an object via API, make a change and then try .save() method on the object.
Same result if I try for example
prefixlist.update({"name": "PL_TEST_API", "display": "PL_TEST_API"})
Expected behavior For the changes to be saved. This works ok for me in netbox 3.7.4 and netbox-bgp 0.12.1, same pynetbox version.
Additional context This happens for me on policies and sessions as well. I can update just fine using requests and PATCH, however wondering if something changed recently which breaks the URL pynetbox is using.
Also I notice the url attribute on the returned object is missing 'api' in the path compared to other netbox objects
thanks!