Power Connections cannot be retrieved by the ID of both connected devices #4589

Closed
opened 2025-12-29 18:38:01 +01:00 by adam · 3 comments
Owner

Originally created by @mshems on GitHub (Feb 24, 2021).

Environment

  • Python version: 3.8.5
  • NetBox version: v2.10.4
  • Netbox-Docker version: 1.0.2

Steps to Reproduce

  1. Create Device A (will have id# 1) via UI
  2. Add power outlet to Device A via UI
  3. Create Device B (will have id#2) via UI
  4. Add power port to Device B via UI
  5. Connect outlet on Device A to port on Device B
  6. Make request to ".../api/dcim/power-connections/?device_id=1"
  7. Make request to ".../api/dcim/power-connections/?device_id=2"

(requests were made via the Swagger API browser linked at the bottom of the UI)

Expected Behavior

The two requests should return the same data -- one connection between device A and device B

Observed Behavior

The first request returns no results

{
  "count": 0,
  "next": null,
  "previous": null,
  "results": []
}

Additional Info

In another Netbox instance running v2.9.4, I was able to successfully retrieve power connections using the device ID of either connected device. I can no longer do this in Netbox v2.10+

Originally created by @mshems on GitHub (Feb 24, 2021). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.8.5 * NetBox version: v2.10.4 * Netbox-Docker version: 1.0.2 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create Device A (will have id# 1) via UI 2. Add power outlet to Device A via UI 3. Create Device B (will have id#2) via UI 4. Add power port to Device B via UI 5. Connect outlet on Device A to port on Device B 6. Make request to ".../api/dcim/power-connections/?device_id=1" 7. Make request to ".../api/dcim/power-connections/?device_id=2" (requests were made via the Swagger API browser linked at the bottom of the UI) <!-- What did you expect to happen? --> ### Expected Behavior The two requests should return the same data -- one connection between device A and device B <!-- What happened instead? --> ### Observed Behavior The first request returns no results ``` { "count": 0, "next": null, "previous": null, "results": [] } ``` ### Additional Info In another Netbox instance running v2.9.4, I was able to successfully retrieve power connections using the device ID of either connected device. I can no longer do this in Netbox v2.10+
adam added the status: duplicate label 2025-12-29 18:38:01 +01:00
adam closed this issue 2025-12-29 18:38:01 +01:00
Author
Owner

@mshems commented on GitHub (Feb 24, 2021):

This looks to be related to/an extension of this Issue: https://github.com/netbox-community/netbox/issues/5627

@mshems commented on GitHub (Feb 24, 2021): This looks to be related to/an extension of this Issue: https://github.com/netbox-community/netbox/issues/5627
Author
Owner

@jeremystretch commented on GitHub (Feb 24, 2021):

Yeah, I'd say this is very likely covered by any fix for #5627. Let's close this out as a suspected duplicate, but feel free to re-open if the problem persists after #5627 has been addressed.

@jeremystretch commented on GitHub (Feb 24, 2021): Yeah, I'd say this is very likely covered by any fix for #5627. Let's close this out as a suspected duplicate, but feel free to re-open if the problem persists after #5627 has been addressed.
Author
Owner

@mshems commented on GitHub (Feb 24, 2021):

Sounds good, thanks for the quick response!

@mshems commented on GitHub (Feb 24, 2021): Sounds good, thanks for the quick response!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4589