-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowstype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.6.5
Python version
3.10
Steps to Reproduce
- create 2 devices with front ports and a device with interfaces
- find ids that overlap (ex: front port id = 2 and interface id = 2)
- create a cable from the interface to a front port on the 2nd device (ex: interface 2 to front port 20)
- query
GET /api/dcim/cables/?termination_a_id=2&termination_a_type=dcim.frontport - review results
Expected Behavior
No cable - in this scenario, front port 2 belonging to device 1 has no cable. Front port 20 belonging to device 2 has a cable to interface 2.
Observed Behavior
The query asks for termination_a_id=2 and termination_a_type=dcim.frontport but returns a cable where termination_a_id=2 and termination_b_type=dcim.frontport
Have also tested this with rear cables. A matching id on the A side and matching type on the B side will return a cable. Can also confirm b termination queries yield similar behavior:
GET /api/dcim/cables/?termination_b_id=4&termination_b_type=dcim.frontport
results in (trimmed):
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"a_terminations": [
{
"object_type": "dcim.frontport",
"object_id": 12
}
],
"b_terminations": [
{
"object_type": "dcim.interface",
"object_id": 4
}
],
"status": {
"value": "connected",
"label": "Connected"
}
}
]
}
Metadata
Metadata
Assignees
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowstype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application