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.93k stars 2.56k forks source link

Configuration profiles/templates for set of interfaces #2461

Closed vsvetlov closed 6 years ago

vsvetlov commented 6 years ago

Environment

Proposed Functionality

It could be already discussed somewhere, sorry if I missed that. Cisco NXOS and IOS for switches have ability to configure predefined configuration that later can be applied to a bunch of the interfaces instead of configuring every interface independently in manual mode.

Use Case

When you have many switches and thousends of interfaces it is a very convenient feature to apply the same configuration to many ports. It also significantly decrease the amount of work when you need to modify interface configuration. For example, if you need to add vlan to 20 trunk interfaces it can be easily done by modifying port-profile in NXOS. If you have just 10 different configurations for 500 ports it would be really helpful to have ability to modify just 10 entities instead of 500. Also, it creates some level of abstraction which is good for automation purposes and decrease number of requests to NetBox.

Database Changes

Looking into NetBox data scheme it seems the best way to implement such feature is by using config context killer feature. May be it is better to create separate UI view for config contexts associated with interfaces. Coexistent with current interface settings in DB can be done in the folowing way. If interface has associated config context it should take data from it, such as 802.1q mode, assigned vlans etc. If not the settings assigned to that particular interface should be used.

External Dependencies

None

jeremystretch commented 6 years ago

NetBox is not intended to fully replicate device configuration. This feature would be out of scope.