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
16.11k stars 2.58k forks source link

Update devices connected to a device type when changes are made to a device-type #16177

Closed RemcoVroman closed 5 months ago

RemcoVroman commented 5 months ago

NetBox version

v3.7.2

Feature type

Data model extension

Proposed functionality

Update devices connected to a device type when changes are made to a device-type.

Use case

For example: when I add power ports to a device-type because we need to go from two to four power ports. So I add the power ports to the device type and all new devices will get the two extra power ports. But I need to do add manualy the two power ports to all devices that are of the same device type.

Database changes

update statements will be required after a device-type is changed

External dependencies

N/A

arthanson commented 5 months ago

I think this could get tricky or confusing, we would only want to do additions as deletions would be dangerous, also if done it should probably be a dialog showing what would change (like delete) and a confirmation.

jeremystretch commented 5 months ago

This has been proposed in the past and rejected because it is not possible for NetBox to interpret the intended behavior of every possible scenario. (Consider, for instance, the implications of renaming or removing a device component.) Instead, please use NetBox's ability to bulk create components on multiple devices to achieve this functionality in a predictable and safe manner.

jeremystretch commented 5 months ago

Here's an example:

screenshot

RemcoVroman commented 5 months ago

Hi Jeremy, I do not agree with youre statement about not being able to predict every behaviour. You might have a look at Zabbix monitoring tool, there are templates (is equal to device-types in Netbox) being used. Every device connected to a template is being monitored in the same way. Is the template changed, it will apply to all devices connected to the template. Having said that, I think it is the responsibility of a Netbox administrator to properly administer the device-types and create multiple device-types for the same system with serveral possible configurations. Please take this in concideration. If you want a Zabbix demo with the template use, I'm willing to provide that. Best regards, Remco

jeremystretch commented 5 months ago

You're free to disagree, and you're free to fork and modify the code base as you see fit, and be responsible for those changes. However your proposed change has already been considered and rejected, and will not be implemented in the core product.