Skip to content
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

When creating Interfaces, allow more wildcard variants #1586

Closed
darkstar opened this issue Oct 13, 2017 · 6 comments
Closed

When creating Interfaces, allow more wildcard variants #1586

darkstar opened this issue Oct 13, 2017 · 6 comments
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@darkstar
Copy link

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.

@jeremystretch jeremystretch added the type: feature Introduction of new functionality to the application label Oct 13, 2017
@eqTom
Copy link

eqTom commented 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.

@netsiphon
Copy link

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

@RyanBreaker
Copy link
Contributor

RyanBreaker commented 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.

@darkstar
Copy link
Author

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

@RyanBreaker
Copy link
Contributor

RyanBreaker commented 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

@larsuhartmann
Copy link

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

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed help wanted labels Jan 26, 2018
jeremystretch added a commit that referenced this issue Mar 22, 2018
Implements #1586, add additional variants for ExpandableNameFields
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

6 participants