Skip to content

Bug in validate uniqueness of VM name #5396

@xcdr

Description

@xcdr

Environment

  • Python version: 3.8.6
  • NetBox version: 2.9.10

Cannot add VM without Tenant to different clusters.

Steps to Reproduce

  1. Add cluster A, B
  2. Add VM named "Example VM" to cluster A without Tenant
  3. Try to add VM named "Example VM" to cluster B without Tenant

Expected Behavior

VM should be added.

Observed Behavior

I see validation error: A virtual machine with this name already exists.

I see that validate_unique(self, exclude=None) in VirtualMachine model doesn't filter by cluster!

Metadata

Metadata

Assignees

No one assigned

    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