CSV import: accept slug values for role and platform #5861

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

Originally created by @tacerus on GitHub (Jan 2, 2022).

NetBox version

v3.1.3

Feature type

Change to existing functionality

Proposed functionality

I noticed a similar change has been implemented in #5003 and would like to follow up on this by requesting the acceptance of slug values for the role and platform fields in virtual machine imports.

Use case

This would make the machine-creation and import of CSV files easier and avoid quoting issues with values containing a comma in their name.

Database changes

No response

External dependencies

No response

Originally created by @tacerus on GitHub (Jan 2, 2022). ### NetBox version v3.1.3 ### Feature type Change to existing functionality ### Proposed functionality I noticed a similar change has been implemented in #5003 and would like to follow up on this by requesting the acceptance of `slug` values for the role and platform fields in virtual machine imports. ### Use case This would make the machine-creation and import of CSV files easier and avoid quoting issues with values containing a comma in their name. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:33:34 +01:00
adam closed this issue 2025-12-29 19:33:34 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 3, 2022):

This is already supported. Per the instructions on the import form:

Related objects may be referenced by any unique attribute. For example, vrf.rd would identify a VRF by its route distinguisher.

To specify e.g. a role by slug, you would name the header role.slug, and specify the desired slug values in each corresponding cell. Same for platform (platform.slug). Hope that helps!

@jeremystretch commented on GitHub (Jan 3, 2022): This is already supported. Per the instructions on the import form: > Related objects may be referenced by any unique attribute. For example, vrf.rd would identify a VRF by its route distinguisher. To specify e.g. a role by slug, you would name the header `role.slug`, and specify the desired slug values in each corresponding cell. Same for platform (`platform.slug`). Hope that helps!
Author
Owner

@tacerus commented on GitHub (Jan 3, 2022):

Oh! It did not occur to me that this example referred to a slug. Easier than I thought - thank you, much appreciated!

@tacerus commented on GitHub (Jan 3, 2022): Oh! It did not occur to me that this example referred to a slug. Easier than I thought - thank you, much appreciated!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5861