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

Be able to use regex in interface bulk renaming #1983

Closed
matthieugouel opened this issue Mar 21, 2018 · 0 comments
Closed

Be able to use regex in interface bulk renaming #1983

matthieugouel opened this issue Mar 21, 2018 · 0 comments
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@matthieugouel
Copy link

Issue type

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

Environment

  • Python version: 3.6
  • NetBox version: 2.3.1

Description

Hi !
I'm currently using interface bulk renaming implemented in v2.3.0 in order to rename stack / module interfaces easily from the IHM. Currently it seems to use replace() string built-in function to do the find / replace processing.

It does the work very well most of the time but it has some limitations. For instance, let's say you have interfaces noted with numbers only (1, 2, 3, ...) and you want to replace that with (1/1, 1/2, 1/3, ...). For this particular case I don't think it's actually possible.

I would suggest to use re.sub() function to do the find / replace processing. It would not change the current use, but it would add the possibility to do something like :

Find : (\d+)
Replace : 1/\1

If that feature request is accepted I would be happy to do a pull request with that little modification.

Have a good day,
Matthieu.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application labels Mar 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 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

Successfully merging a pull request may close this issue.

2 participants