Skip to content

Module creation should fail validation when {module} token is present in a componnet name but no position is set on the bay #9190

@goebelmeier

Description

@goebelmeier

NetBox version

v3.2.1

Python version

3.8

Steps to Reproduce

  1. Create a device with module bays, I had 2 module bays with name ct0 and ct1
  2. Create a module type with interfaces named {module}.eth0
  3. Add the new module to a module bay in the device
  4. Add a second module to the second module bay

Expected Behavior

  1. The placeholder should be replaced by module name resulting in ct0.eth0
  2. The second module should be placed and the interface name should result in ct1.eth0

Observed Behavior

  1. First module creates an interface named .eth0
  2. Second module cannot be created. Error:
<class 'django.db.utils.IntegrityError'>

duplicate key value violates unique constraint "dcim_interface_device_id_name_bffc4ec4_uniq"
DETAIL:  Key (device_id, name)=(4478, .eth0) already exists.


Python version: 3.8.10
NetBox version: 3.2.1

Metadata

Metadata

Assignees

Labels

status: 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