Port template (profiles) for set of Interface #2496

Closed
opened 2025-12-29 18:19:23 +01:00 by adam · 1 comment
Owner

Originally created by @gueryacine on GitHub (Apr 4, 2019).

Environment

  • Python version: 3.7.2
  • NetBox version: Develop

Proposed Functionality

Functionality :
A- Add PortTemplate on IPAM to manage a VLANs template and assign them to a Device Interfaces
B- Add PortTemplate Group on IPAM to regroup PortTemplates
C- Assign PortTemplate Group to a Device then, the interfaces linked with this device can choose a Port Template than to insert VLANs

  • In the logic of the code, when we assign a PortTemplate to the interface it will assign automatically the VLANs from the PortTemplate in the Interface, so like that, the features will not affect the workflows.

  • When we assign a PortTemplate to an interface, a verification between the Type of the PortTemplate ( Ethernet, Virtual , LAG) and the Form factor of the interface are done.

  • You can see the user interfaces here : ScreenShot

Use Case

If a user wants to manage device's interfaces with the same configuration of VLANs, he can assign port templates.
When the user modifies a port template, all its interfaces linked will change, then the modification will be quicker.

Database Changes

1- Add PortTemplateGroup Modal on IPAM with :

  • name = CharField
  • slug = SlugField
  • site = ForeignKey

2- Add PortTemplate Modal on IPAM with :

  • site = ForeignKey
  • group = ForeignKey
  • name = CharField
  • tenant = ForeignKey
  • status = PositiveSmallIntegerField
  • types = PositiveSmallIntegerField
  • mode = PositiveSmallIntegerField
  • untagged_vlan = ForeignKey
  • tagged_vlans = ManyToManyField
  • role = ForeignKey
  • description = CharField

3- Modify Interface Modal on DCIM :

  • Add port_template = ForeignKey

4- Modify Device Modal on DCIM :

  • Add port_template_groups = ManyToManyField
Originally created by @gueryacine on GitHub (Apr 4, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7.2 * NetBox version: Develop <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Functionality : A- Add **PortTemplate** on **IPAM** to manage a **VLANs** template and assign them to a Device **Interfaces** B- Add **PortTemplate Group** on IPAM to regroup PortTemplates C- Assign **PortTemplate Group** to a **Device** then, the interfaces linked with this device can choose a Port Template than to insert VLANs - In the logic of the code, when we **assign** a **PortTemplate** to the **interface** it will **assign** automatically the **VLANs** from the PortTemplate in the Interface, so like that, the features will not affect the workflows. - When we assign a **PortTemplate** to an interface, a verification between the **Type** of the PortTemplate ( Ethernet, Virtual , LAG) and the **Form factor** of the interface are done. - You can see the user interfaces here : [ScreenShot](https://goopics.net/a/u8FmRzr8) <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case If a user wants to manage device's interfaces with the same configuration of VLANs, he can assign port templates. When the user modifies a port template, all its interfaces linked will change, then the modification will be quicker. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes 1- Add PortTemplateGroup Modal on IPAM with : - name = CharField - slug = SlugField - site = ForeignKey 2- Add PortTemplate Modal on IPAM with : - site = ForeignKey - group = ForeignKey - name = CharField - tenant = ForeignKey - status = PositiveSmallIntegerField - types = PositiveSmallIntegerField - mode = PositiveSmallIntegerField - untagged_vlan = ForeignKey - tagged_vlans = ManyToManyField - role = ForeignKey - description = CharField 3- Modify Interface Modal on DCIM : - Add port_template = ForeignKey 4- Modify Device Modal on DCIM : - Add port_template_groups = ManyToManyField
adam closed this issue 2025-12-29 18:19:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2019):

Sorry, we're not currently accepting any major feature requests.

@jeremystretch commented on GitHub (Apr 4, 2019): Sorry, we're not currently accepting any major feature requests.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2496