Closed nicolatron closed 3 weeks ago
int_a = nb.dcim.rearports.get(name="RP 1", device=str("device_name")
If you say that the correct URL has /dcim/rear-ports/
, then you need to call nb.dcim.rear_ports.get()
(= replace dash with underscore)
Thank you very much. This works like a charm. int_a = nb.dcim.rear_ports.get(name="RP 1",device_id=orig_device.id) I see now that it is clearly mentioned in documentation I failed to read (like here), and not a bug at all.
pynetbox version
v7.3.3
NetBox version
v4.0.3
Python version
3.11
Steps to Reproduce
int_a = nb.dcim.rearports.get(name="RP 1", device=str("device_name")
Expected Behavior
Getting a pointer to given rearport, i plan to then use it to connect with another rear port using:
But can't get there yet.
Observed Behavior
If I go to https://netbox.mydomain.com/api/dcim/rear-ports/?name=RP+1&device=J1%3AC0F1%3AOV01PAT02V&limit=0 instead the correct information is there.
Looking at
pynetbox/models/dcim.py
there is aTraceableRecord
class with an entry:"dcim/rear-ports": RearPorts,
Not sure what's preventing that from being used in this case.