-
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 the enabled
field to be set on InterfaceTemplates
#11440
Comments
I implemented it here to see if there were any hard stuff needing to be done, there wasn't. develop...kkthxbye-code:netbox:11440-add-enabled-interfacetemplate If accepted, it might need to be targeted v3.5 as there's db and API changes, however existing DeviceTypes in the devicetype-library should be compatible as the enabled field defaults to True. |
Why create two interfaces, and not rename the one interfaces ? (also to tackle the interface naturalization sorting that messes some use cases up) |
@PieterL75 - Our users prefer to have both interfaces and disable the one not being used. It also helps with custom scripts where the user has to choose an interface, as it allows both configurations to be shown and we can do the enabling of the chosen interface.
I'm not sure I understand here. So while the device uses the following names:
You would just use Eth0/0/0/20 for both configurations? If that's the case, that would not work for us. We rely on netbox representing the real world to allow automation. Total disclosure, I'm not really a networking guy, so the request is as explained by our users at my place of work. There might very well be a better/more correct way of doing it. I still think the feature makes sense though, at least as much as mgmt_only being avalible on interface templates. I'll ask for feedback form our users. |
We don't create duplicate interfaces like in @kkthxbye-code's example, but still face the same problem. In our use case, devices are often deployed with the majority of their interfaces disabled. When we just had DeviceTypes, this was annoying, but manageable, to go into a device after it was instantiated, do a select all, deselect the handful of interfaces that were being used for uplinks, then do a bulk edit to set them all as disabled. The addition of modules make this significantly more painful, as we have a number of high-density cards that have maybe 48 interfaces on them and so now when you slot in that module in NetBox, you have to find just those interfaces that it added in order to select and disable them. This had led to a number of problems, and ultimately workarounds, to be able to support automated provisioning without leaving a bunch of interfaces enabled that generate alarms in our monitoring application for being Up/Down, when the engineers inevitably forget to manually disable the interfaces they aren't using. |
This is largely going to be dependent on caveats across different platforms, but I want to clarify that the That said, I'm in favor of adding an |
This feels like a customfield solution. Add a Field that holds the info you need, so that it works the way you want.. |
@PieterL75 - Custom fields are not replicated. |
I must have missed the part that he requested this to be added to the template.. you're right, CF will not cut it then |
I realize this is still under review, but I wanted to just create the PR as the code was done as a quick PoC already. If the FR is ultimately rejected it can easily be closed. |
This will need to wait for v3.5 as it introduces a new database field. But I'm fine with tagging it as a milestone. |
NetBox version
v3.4.2
Feature type
Change to existing functionality
Proposed functionality
Allow the
enabled
field to be set on InterfaceTemplates added toDeviceTypes
orModuleTypes
. The implementation would mirror themgmt_only
field which is currently supported.Use case
DeviceTypes might be configured with disabled interfaces by default. In some cases ports might be configurable at different speeds depending on the installed SFP which changes the name of the interface on the device. Currently we have both combinations on the DeviceType, e.g.:
GigabitEthernet0/0/0/20
TenGigE0/0/0/20
Having the option to disabled one of the interfaces by default would help manage this.
Database changes
Add
enabled
BooleanField toInterfaceTemplate
.External dependencies
None
The text was updated successfully, but these errors were encountered: