Cable terminations are not refreshed correctly on API PATCH of Cable #10586

Closed
opened 2025-12-29 21:33:25 +01:00 by adam · 0 comments
Owner

Originally created by @bctiemann on GitHub (Dec 21, 2024).

Originally assigned to: @bctiemann on GitHub.

Deployment Type

Self-hosted

Triage priority

I volunteer to perform this work (if approved)

NetBox Version

v4.1.8

Python Version

3.10

Steps to Reproduce

Ideally populate the DB with a large number (1000+) of Interfaces and Cables connecting them.

API call:

http://127.0.0.1:8000/api/dcim/cables/1/
{
    "b_terminations": [
        {
            "object_type": "dcim.interface",
            "object_id": 161
        }
    ]
}

Compare to UI edit of Cable where B-side interface is changed.

Expected Behavior

Both operations (UI and API) should have the same effect and execute in the same amount of time.

Observed Behavior

The UI call completes in a few hundred ms; but depending on the data size, the API call can take many seconds or minutes to complete.

Originally created by @bctiemann on GitHub (Dec 21, 2024). Originally assigned to: @bctiemann on GitHub. ### Deployment Type Self-hosted ### Triage priority I volunteer to perform this work (if approved) ### NetBox Version v4.1.8 ### Python Version 3.10 ### Steps to Reproduce Ideally populate the DB with a large number (1000+) of Interfaces and Cables connecting them. API call: ``` http://127.0.0.1:8000/api/dcim/cables/1/ { "b_terminations": [ { "object_type": "dcim.interface", "object_id": 161 } ] } ``` Compare to UI edit of Cable where B-side interface is changed. ### Expected Behavior Both operations (UI and API) should have the same effect and execute in the same amount of time. ### Observed Behavior The UI call completes in a few hundred ms; but depending on the data size, the API call can take many seconds or minutes to complete.
adam added the type: bugstatus: acceptedtopic: cablingseverity: medium labels 2025-12-29 21:33:25 +01:00
adam closed this issue 2025-12-29 21:33:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10586