Rear port name in Front port export contains excess rear port label which breaks import/update #7685

Closed
opened 2025-12-29 20:26:58 +01:00 by adam · 1 comment
Owner

Originally created by @jnovak-netsystemcz on GitHub (Feb 26, 2023).

NetBox version

v3.4.5

Python version

3.8

Steps to Reproduce

  1. Create a device 'Device' (fill other mandatory fields on your own)
  2. Create rear port with name 'Port 1' and label 'Test' (fill other mandatory fields on your own)
  3. Create front port with name 'Port 1' and link it to rear port (fill other mandatory fields on your own)
  4. Export front ports of 'Device' with Export->All data (CSV)

Output:

Name,Device,Label,Type,Color,Rear port,Position,Description,ID,Module bay,Module,Mark connected,Cable,Cable Color,Link Peers,Tags,Created,Last updated
Port 1,Device,,8P8C,,Port 1 (Test),1,,453,,,False,,,,,2023-02-26 16:07,2023-02-26 16:07

The issue is that if you would like to import/update data back, text "Port 1 (Test)" is not recognized as rear port name because of excess ' (Test)'.

Expected Behavior

There are two ways how to handle it:

  1. Export just rear port name and ignore label
  2. Export rear port name in one column and rear port label in second column

My personal point of view is that first option is enough.

Observed Behavior

Content of Rear port is combined rear port name and rear port label.

Originally created by @jnovak-netsystemcz on GitHub (Feb 26, 2023). ### NetBox version v3.4.5 ### Python version 3.8 ### Steps to Reproduce 1. Create a device 'Device' (fill other mandatory fields on your own) 2. Create rear port with name 'Port 1' and label 'Test' (fill other mandatory fields on your own) 3. Create front port with name 'Port 1' and link it to rear port (fill other mandatory fields on your own) 4. Export front ports of 'Device' with Export->All data (CSV) Output: ``` Name,Device,Label,Type,Color,Rear port,Position,Description,ID,Module bay,Module,Mark connected,Cable,Cable Color,Link Peers,Tags,Created,Last updated Port 1,Device,,8P8C,,Port 1 (Test),1,,453,,,False,,,,,2023-02-26 16:07,2023-02-26 16:07 ``` The issue is that if you would like to import/update data back, text "Port 1 (Test)" is not recognized as rear port name because of excess ' (Test)'. ### Expected Behavior There are two ways how to handle it: 1. Export just rear port name and ignore label 2. Export rear port name in one column and rear port label in second column My personal point of view is that first option is enough. ### Observed Behavior Content of Rear port is combined rear port name and rear port label.
adam closed this issue 2025-12-29 20:26:58 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 26, 2023):

This is not a bug. You cannot blindly feed exported data into the import form.

@jeremystretch commented on GitHub (Feb 26, 2023): This is not a bug. You cannot blindly feed exported data into the import form.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7685