Feed leg names show as "Leg {'name': 'A', 'allocated': 0, 'maximum': 0, 'outlet_count': 0}" etc #8582

Closed
opened 2025-12-29 20:38:28 +01:00 by adam · 0 comments
Owner

Originally created by @pv2b on GitHub (Sep 6, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.6.0

Python version

3.11

Steps to Reproduce

  1. Create a Site, using this YAML in the bulk importer:
---
name: Feed Leg Bug Repro Site
slug: feed-leg-bug-repro-site
status: active
  1. Create a Power Panel using this YAML in the bulk importer:
---
site: Feed Leg Bug Repro Site
name: Feed Leg Bug Repro Panel
  1. Create a three-phase Power Feed using this YAML in the bulk importer:
---
site: Feed Leg Bug Repro Site
power_panel: Feed Leg Bug Repro Panel
name: Feed Leg Bug Repro Feed
status: active
type: primary
supply: ac
phase: three-phase
voltage: 230
amperage: 32
max_utilization: 80
  1. Create a Manufacturer as per the below YAML in the bulk importer:
---
name: Feed Leg Bug Repro Manufacturer
slug: feed-leg-bug-repro-manufacturer
  1. Create a Device Type as per below:
---
manufacturer: Feed Leg Bug Repro Manufacturer
model: Feed Leg Bug Repro PDU
slug: feed-leg-bug-repro-pdu
u_height: 1
power-ports:
- name: Inlet
power-outlets:
- name: Outlet A
  feed_leg: A
- name: Outlet B
  feed_leg: B
- name: Outlet C
  feed_leg: C
  1. Create a Device Role with this YAML:
---
name: Feed Leg Bug Repro Role
slug: feed-leg-bug-repro-role
color: ff0000
  1. Instantiate this device by importing this YAML:
---
role: Feed Leg Bug Repro Role
manufacturer: Feed Leg Bug Repro Manufacturer
device_type: Feed Leg Bug Repro PDU
status: active
site: Feed Leg Bug Repro Site
  1. Connect the power inlet we created to the power feed we created (use the GUI, I can't figure out how to do this in YAML, since it wants a "device" on both ends.)

  2. Go to the "device" tab of the device that we created and look at the Power Utilization Section.

Expected Behavior

Power utilizations will be shown in aggregate for the inlet and for each leg, with labels such as "Inlet", "Leg A", "Leg B", "Leg C" or similar.

Observed Behavior

The Power Utilization section has incorrect labels such as:

Leg {'name': 'A', 'allocated': 0, 'maximum': 0, 'outlet_count': 0}
Leg {'name': 'B', 'allocated': 0, 'maximum': 0, 'outlet_count': 0}
Leg {'name': 'C', 'allocated': 0, 'maximum': 0, 'outlet_count': 0}

See screenshot below:
bild

Originally created by @pv2b on GitHub (Sep 6, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.6.0 ### Python version 3.11 ### Steps to Reproduce 1. Create a Site, using this YAML in the bulk importer: ```yaml --- name: Feed Leg Bug Repro Site slug: feed-leg-bug-repro-site status: active ``` 2. Create a Power Panel using this YAML in the bulk importer: ```yaml --- site: Feed Leg Bug Repro Site name: Feed Leg Bug Repro Panel ``` 3. Create a three-phase Power Feed using this YAML in the bulk importer: ```yaml --- site: Feed Leg Bug Repro Site power_panel: Feed Leg Bug Repro Panel name: Feed Leg Bug Repro Feed status: active type: primary supply: ac phase: three-phase voltage: 230 amperage: 32 max_utilization: 80 ``` 4. Create a Manufacturer as per the below YAML in the bulk importer: ```yaml --- name: Feed Leg Bug Repro Manufacturer slug: feed-leg-bug-repro-manufacturer ``` 5. Create a Device Type as per below: ```yaml --- manufacturer: Feed Leg Bug Repro Manufacturer model: Feed Leg Bug Repro PDU slug: feed-leg-bug-repro-pdu u_height: 1 power-ports: - name: Inlet power-outlets: - name: Outlet A feed_leg: A - name: Outlet B feed_leg: B - name: Outlet C feed_leg: C ``` 6. Create a Device Role with this YAML: ```yaml --- name: Feed Leg Bug Repro Role slug: feed-leg-bug-repro-role color: ff0000 ``` 7. Instantiate this device by importing this YAML: ```yaml --- role: Feed Leg Bug Repro Role manufacturer: Feed Leg Bug Repro Manufacturer device_type: Feed Leg Bug Repro PDU status: active site: Feed Leg Bug Repro Site ``` 8. Connect the power inlet we created to the power feed we created (use the GUI, I can't figure out how to do this in YAML, since it wants a "device" on both ends.) 9. Go to the "device" tab of the device that we created and look at the Power Utilization Section. ### Expected Behavior Power utilizations will be shown in aggregate for the inlet and for each leg, with labels such as "Inlet", "Leg A", "Leg B", "Leg C" or similar. ### Observed Behavior The Power Utilization section has incorrect labels such as: Leg {'name': 'A', 'allocated': 0, 'maximum': 0, 'outlet_count': 0} Leg {'name': 'B', 'allocated': 0, 'maximum': 0, 'outlet_count': 0} Leg {'name': 'C', 'allocated': 0, 'maximum': 0, 'outlet_count': 0} See screenshot below: ![bild](https://github.com/netbox-community/netbox/assets/7115238/728ddf6c-7fc7-46c4-b353-9496281df21d)
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:38:29 +01:00
adam closed this issue 2025-12-29 20:38:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8582