Skip to content

Bulk import prefixes with associated VLAN not working when multiple VLANs with the same vid exist. #18582

@gabrielmarmen

Description

@gabrielmarmen

Deployment Type

Self-hosted

NetBox Version

v4.2.3

Python Version

3.12

Steps to Reproduce

  1. Create multiple VLAN entries with the same vid but associated to different sites. I use this to represent VLANs with the same vid, but located in different sites with different prefixes.

  2. Import prefix csv with the following fields: prefix, status, role, scope_type, scope_id, vlan. Include the previously added VLANs vid in the "vlan" field.

  3. The import will fail because multiple vlans with the same vid exist

Image

Expected Behavior

Import succeeds associating the right vlan depending on the DCIM.site value. The import should use the VLAN with the specified vid contained in the specified scope (site).

To fix this issue, it could also be possible to specify the VLAN object ID instead of the vid to avoid confusion.

Observed Behavior

Import fails with error :

Image

Metadata

Metadata

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

Relationships

None yet

Development

No branches or pull requests

Issue actions