device bulk import to site+rack via WebUI fails #4155

Closed
opened 2025-12-29 18:33:30 +01:00 by adam · 2 comments
Owner

Originally created by @elwonk on GitHub (Sep 29, 2020).

Environment

  • Python version: Python 3.7.3
  • NetBox version: 2.9.4

Steps to Reproduce

create site + rack and group(optional)

site,group,name,facility_id,tenant,status,role,type,serial,asset_tag,width,u_height,desc_units,outer_width,outer_depth,outer_unit,comments
Testsite,GroupA,Rack1,,,Active,,,,,19,42,,,,,
Testsite,GroupA,Rack2,,,Active,,,,,19,42,,,,,
  1. try to add a device via WebUI and assign it to existing site and rack
name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments
testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,GroupA,10,Rack1,Front, 
  1. using the following import and adding device to rack manually works
name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments
testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,,,,, 

Expected Behavior

succesful addition of the device to site, rack and HU

Observed Behavior

Error message:
Row 1 rack: Object not found.
Row 1 position: Enter a whole number.
Row 1 face: Cannot select a rack face without assigning a rack.

on a side note, the device export shows a wrong header for racks ('rack_name' instead of 'rack')

Originally created by @elwonk on GitHub (Sep 29, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss 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: Python 3.7.3 * NetBox version: 2.9.4 ### Steps to Reproduce create site + rack and group(optional) ``` site,group,name,facility_id,tenant,status,role,type,serial,asset_tag,width,u_height,desc_units,outer_width,outer_depth,outer_unit,comments Testsite,GroupA,Rack1,,,Active,,,,,19,42,,,,, Testsite,GroupA,Rack2,,,Active,,,,,19,42,,,,, ``` 1. try to add a device via WebUI and assign it to existing site and rack ``` name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,GroupA,10,Rack1,Front, ``` 2. using the following import and adding device to rack manually works ``` name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,,,,, ``` ### Expected Behavior succesful addition of the device to site, rack and HU ### Observed Behavior Error message: Row 1 rack: Object not found. Row 1 position: Enter a whole number. Row 1 face: Cannot select a rack face without assigning a rack. on a side note, the device export shows a wrong header for racks ('rack_name' instead of 'rack')
adam closed this issue 2025-12-29 18:33:30 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 29, 2020):

Your CSV data is out of order:

name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments
testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,GroupA,10,Rack1,Front, 

Your columns headers read site,rack_group,rack,position, but the data is ordered as site, rack group, position, rack name, hence the error messages. (The order of the columns doesn't matter, but the headers and data need to match.) Please post to our mailing list if you need any further assistance with this matter.

@jeremystretch commented on GitHub (Sep 29, 2020): Your CSV data is out of order: ``` name,device_role,tenant,manufacturer,device_type,platform,serial,asset_tag,status,site,rack_group,rack,position,face,comments testswitch,Switch,,Cisco,WS-C2960X-48FPS-L,IOS,,,Active,Testsite,GroupA,10,Rack1,Front, ``` Your columns headers read `site,rack_group,rack,position`, but the data is ordered as site, rack group, position, rack name, hence the error messages. (The order of the columns doesn't matter, but the headers and data need to match.) Please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) if you need any further assistance with this matter.
Author
Owner

@elwonk commented on GitHub (Sep 29, 2020):

you are right -my bad, must be blind
thank you for quick reply

@elwonk commented on GitHub (Sep 29, 2020): you are right -my bad, must be blind thank you for quick reply
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4155