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

@dpombo dpombo commented Mar 16, 2026

Copy link
Copy Markdown

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

dpombo commented Mar 16, 2026

Copy link
Copy Markdown
Author

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

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 90 days with no activity.

@github-actions github-actions Bot added the Stale label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants