When creating Interfaces, allow more wildcard variants #1302

Closed
opened 2025-12-29 16:31:14 +01:00 by adam · 6 comments
Owner

Originally created by @darkstar on GitHub (Oct 13, 2017).

Issue type

[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.2.1

Description

When adding interfaces to a device or device template, there is already a Syntax in place to have multiple numbered interfaces created with one single step: Eth1/[1-32] for example.

I am managing systems that do not have such a numbered syntax for the network interfaces. For example, I might have to create interfaces e0a, e0b, e0c and e0d.

Currently, this involves 4 clicks on "create and add another", each with selecting the interface type from the list again, which is tedious.

My suggestion is to allow another syntax: e0a,e0b,e0c,e0d to create, in this case, 4 interfaces at the same time.

An alternative would be to allow letters in the brackets as well, which would enable a syntax like e0[a,b,c,d] which would also be fine. Even better, of course, would be e0[a-d] ... But I am fine with any of these options.

If that is not feasible, I would at least like to have the "Create and add another" button to remember all selections in the drop down lists for the next interface, to reduce clicking required. I can open a new case for this if it is necessary.

Originally created by @darkstar on GitHub (Oct 13, 2017). ### Issue type [X] Feature request <!-- Requesting the implementation of a new feature --> [ ] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.2.1 ### Description When adding interfaces to a device or device template, there is already a Syntax in place to have multiple numbered interfaces created with one single step: ```Eth1/[1-32]``` for example. I am managing systems that do not have such a numbered syntax for the network interfaces. For example, I might have to create interfaces ```e0a```, ```e0b```, ```e0c``` and ```e0d```. Currently, this involves 4 clicks on "create and add another", each with selecting the interface type from the list again, which is tedious. My suggestion is to allow another syntax: ```e0a,e0b,e0c,e0d``` to create, in this case, 4 interfaces at the same time. An alternative would be to allow letters in the brackets as well, which would enable a syntax like ```e0[a,b,c,d]``` which would also be fine. Even better, of course, would be ```e0[a-d]``` ... But I am fine with any of these options. If that is not feasible, I would at least like to have the "Create and add another" button to remember all selections in the drop down lists for the next interface, to reduce clicking required. I can open a new case for this if it is necessary.
adam added the status: acceptedtype: feature labels 2025-12-29 16:31:14 +01:00
adam closed this issue 2025-12-29 16:31:14 +01:00
Author
Owner

@eqTom commented on GitHub (Oct 13, 2017):

Mileage may vary based on OS and Browser, however if you're looking for a temp way of doing this -

Hold "ctrl" while clicking create, the creating runs in a new tab, which you can close once completed. Your then left with the original tab, which you can quickly edit and create again etc.

@eqTom commented on GitHub (Oct 13, 2017): Mileage may vary based on OS and Browser, however if you're looking for a temp way of doing this - Hold "ctrl" while clicking create, the creating runs in a new tab, which you can close once completed. Your then left with the original tab, which you can quickly edit and create again etc.
Author
Owner

@netsiphon commented on GitHub (Oct 14, 2017):

Besides being able to import interface definitions from outside documentation or import previous exports via csv, the ability to add multiple interfaces simultaneously that can't otherwise be easily entered via built-in wildcard is a plus. #1465

@netsiphon commented on GitHub (Oct 14, 2017): Besides being able to import interface definitions from outside documentation or import previous exports via csv, the ability to add multiple interfaces simultaneously that can't otherwise be easily entered via built-in wildcard is a plus. #1465
Author
Owner

@RyanBreaker commented on GitHub (Oct 24, 2017):

I have a working solution almost ready, just need to write tests and documentation, I'll try to get it pushed this week.

@RyanBreaker commented on GitHub (Oct 24, 2017): I have a working solution almost ready, just need to write tests and documentation, I'll try to get it pushed this week.
Author
Owner

@darkstar commented on GitHub (Oct 24, 2017):

@RyanBreaker just curious, which syntax would your solution provide?

@darkstar commented on GitHub (Oct 24, 2017): @RyanBreaker just curious, which syntax would your solution provide?
Author
Owner

@RyanBreaker commented on GitHub (Oct 24, 2017):

@darkstar It'll be the separated format:

eth[0-3][a-c,f] => eth0a eth0b eth0c eth0f eth1a ... eth3f

Edit:
It'll also support mixing them, for example:

eth[0-3,a-c,f] => eth0 eth1 eth2 eth3 etha ethb ethc ethf
@RyanBreaker commented on GitHub (Oct 24, 2017): @darkstar It'll be the separated format: ```nohighlight eth[0-3][a-c,f] => eth0a eth0b eth0c eth0f eth1a ... eth3f ``` Edit: It'll also support mixing them, for example: ```nohighlight eth[0-3,a-c,f] => eth0 eth1 eth2 eth3 etha ethb ethc ethf ```
Author
Owner

@larsuhartmann commented on GitHub (Jan 18, 2018):

Is there a chance for this Pull Request to be merged?
This would really come in handy!

@larsuhartmann commented on GitHub (Jan 18, 2018): Is there a chance for this Pull Request to be merged? This would really come in handy!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1302