Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Device Uniqueness by Device Role #3974

Closed
darcynz opened this issue Jan 21, 2020 · 1 comment
Closed

Enable Device Uniqueness by Device Role #3974

darcynz opened this issue Jan 21, 2020 · 1 comment

Comments

@darcynz
Copy link

darcynz commented Jan 21, 2020

Environment

  • Python version: 3.7
  • NetBox version: 2.71

Proposed Functionality

Enable a toggle per device role that allows a device (physical/vm) to be checked for uniqueness upon creation of a new item.

Use Case

As per the implementation of #2669 in 2.71, device names were made non unique.

This enables generic device types (patch panels, cables), however it allows the possibility of introducing a conflict in the database for a unique device (eg logical router).

Whilst this can be addressed re-actively by validation (reports) for users that use Netbox as their network source of truth this problem can be magnified by automation that is in place and increase the difficulty of cross system API calls that use the Device name as an identifier.

Database Changes

None

External Dependencies

None

@jeremystretch
Copy link
Member

however it allows the possibility of introducing a conflict in the database for a unique device (eg logical router).

This is not a conflict, but a violation of your particular organization's naming/provisioning policy. If you need to restrict certain device roles to have no more than n instances, it will need to be done using a custom script or other custom mechanism. NetBox does not support conditional uniqueness enforcement for any models and we have no plans to introduce it at this time.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants