-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow non-unique site names #18098
Comments
On the flip side, in many environments it is critical that site names are unique. If this feature were to be accepted, I would hope to see some kind of scoping added along side it, or maybe just a global configuration setting, similar to the setting that exists for globally unique IP objects. |
While enforcing unique site names is a useful safeguard, applying this rule across the board can result in restrictions. Ultimately, the decision should be left to the user to determine what works best for their specific situation. NetBox's structure should be flexible enough to represent their network without unnecessary restrictions. Safeguards are important, but there should be an option to disable them when needed and not technically required. I believe that a tool like NetBox should enable its users and not unnecessarily restrict them. But please correct me here if I misunderstood something. I support the idea of making this behavior configurable. This would prevent issues in environments where this restriction wasn't originally considered, while still allowing it to be enabled for those who need it. Even with this change, sites would still have unique paths, such as: Trying to create another site with the same name and the same path should still be prevented, since this would only lead to problems. Again, please correct me if I misunderstood something 😅 |
This would also break bulk import with natural keys unless it is changed to support the hierarchy as well. |
NetBox version
v.4.1.6
Feature type
Change to existing functionality
Triage priority
N/A
Proposed functionality
Remove the uniqueness constraint on Site and Location names, so that multiple objects can be created with the same name.
Use case
When managing numerous branches (within Netbox), it is common for these branches to lack distinct names and are often identified solely by their location. The naming convention typically follows a pattern such as "Main Road 1," which is not akin to traditional and unique branch identifiers like "Branch A" or "Branch B."
The primary issue - in this case -arises from the high likelihood of branches sharing identical names. Here, branches are only distinguishable by the city (i.e., their region) they are located in. For instance:
City A (Region)
City B (Region)
This naming limitation seems unnescessary as sites can be uniquely identified based on their hierarchical structure, or their Facility ID, if present.
It would completely suffice if the site would need to have a unique name within the scope of its parent.
This problem is somewhat related to issue #2669.
Database changes
It should suffice to remove the unique=True field in the site data model.
External dependencies
None
The text was updated successfully, but these errors were encountered: