Skip to content

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

@pv2b

Description

@pv2b

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

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions