netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Alternate name / location for interfaces #2147

Closed wenners closed 6 years ago

wenners commented 6 years ago

Issue type

[x] Feature request [ ] Bug report
[ ] Documentation

Environment

Description

A detailed description of the proposed functionality

Interfaces, especially for servers in my usecase, should have a second, alternate field for the name indicatiing the location of the interface.

A use case for the new feature

In our setup we want use netbox as singe source of truth (tm) for mainly two use cases. The first one is building up hardware and cabling it. Therefore I need an interface name which is meaningful to the DC folks - something like "onboard#1" or "PCI2-2" so they know where to plug the cable. In the second use case netbox is the source for our config management. But in that case "onboard#1" is relatively useless, something like enp2s0f0 of enp14s0f1 is needed to identify the right interface. I know that I could use the description field of an interface to add the text for the first use case but this is only available for the device. It is not available in device type which means I would need to add this to each and every device I add to netbox. Having this in the device type already it would be inherited to each device I create with this special type. Therefor I opt for having a alternate name or location field for the interfaces in device type.

A rough description of any necessary changes to the database schema

Adding a new field "AltName" or "Location" to the interface spec in DeviceType and Device

Any relevant third-party libraries which would be needed

Nope

jeremystretch commented 6 years ago

The recommended approach is to always name the interface as it appears to the operating system, to avoid breaking things like LLDP neighbor validation.

If you need to make additional notes about where interfaces are physically located, they can be stored in the comments on the DeviceType. This ensures that the information is readily available while avoid duplication.