Skip to content

Update ios.rb#3764

Open
dpombo wants to merge 1 commit into
ytti:masterfrom
dpombo:patch-1
Open

Update ios.rb#3764
dpombo wants to merge 1 commit into
ytti:masterfrom
dpombo:patch-1

Conversation

@dpombo
Copy link
Copy Markdown

@dpombo dpombo commented Mar 16, 2026

Replace:
cfg.gsub! /^ tunnel mpls traffic-eng bandwidth[^\n]\n(
(?: [^\n]\n)*
tunnel mpls traffic-eng auto-bw)/mx, '\1'

by:

This removes 'bandwidth X' only if 'auto-bw' is configured in the same interface

  cfg.gsub! /^ (tunnel mpls traffic-eng bandwidth [^\n]*)\n((?: [^\n]*\n)* tunnel mpls traffic-eng auto-bw)/, '\2'

Pre-Request Checklist

  • Passes rubocop code analysis (try rubocop --auto-correct)
  • Tests added or adapted (try rake test)
  • Changes are reflected in the documentation
  • User-visible changes appended to CHANGELOG.md

Description

Replace:
cfg.gsub! /^ tunnel mpls traffic-eng bandwidth[^\n]*\n*(
              (?: [^\n]*\n*)*
              tunnel mpls traffic-eng auto-bw)/mx, '\1'

by:
## This removes 'bandwidth X' only if 'auto-bw' is configured in the same interface
      cfg.gsub! /^ (tunnel mpls traffic-eng bandwidth [^\n]*)\n((?: [^\n]*\n)* tunnel mpls traffic-eng auto-bw)/, '\2'
@dpombo
Copy link
Copy Markdown
Author

dpombo commented Mar 16, 2026

Correct ios.rb to avoid tunnel mpls traffic-eng bandwidht changes when auto-bw is configured under the interface

@robertcheramy
Copy link
Copy Markdown
Collaborator

Sorry, but:

  • better describe the problem (Example of a false positive and example of a configuration to ignore)
  • Add the change to CHANGELOG.md
  • Provide or update a YAML Simulation file to reproduce the problem and its solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants