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

Mask the changing temperature issue as reported in #2088. #3402

Merged
merged 12 commits into from
Feb 28, 2025

Conversation

clifcox
Copy link
Contributor

@clifcox clifcox commented Feb 15, 2025

Output of "show system" changes from:

! Unit            Temperature (Celsius)            Status
! ------------------------ ------------------------ ------------------------
! 1                        33                       OK

To:

! Unit            Temperature (Celsius)            Status
! ------------------------ ------------------------ ------------------------
! 1                        XXX                      OK
!

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

Re-Closes issue #2088 ;-)

…of "show system" changes from:

! Unit            Temperature (Celsius)            Status
! ------------------------ ------------------------ ------------------------
! 1                        33                       OK

To:

! Unit            Temperature (Celsius)            Status
! ------------------------ ------------------------ ------------------------
! 1                        XXX                      OK
!
I noticed that different powerconnect series like 3400, 3500, 6200 would have diferent widths of temperature tables, and
wanted to format the output better. Also if someone decides to include the temp tables in a stacked switch setup, you
could, and only generate config changes when the temp evaluation went from OK to Fail.
powerconnect: Mask the changing temperature issue for non-staced switches. Fixes ytti#2088 (@clifcox)
@clifcox
Copy link
Contributor Author

clifcox commented Feb 19, 2025

Fixed.

@robertcheramy
Copy link
Collaborator

Could you replace {3,} with +? This should solve the CodeQL warning.

@clifcox
Copy link
Contributor Author

clifcox commented Feb 20, 2025

I'm new to CodeQL, is it complaining about the (.*) now? I can't tell. :-)

@robertcheramy
Copy link
Collaborator

I've found the problem - using / +.*/ makes the regexp problematic, as . could also match .

@robertcheramy robertcheramy merged commit 03032fc into ytti:master Feb 28, 2025
7 checks passed
@clifcox clifcox deleted the 2088-mask_changing_temperatures branch February 28, 2025 20:20
@clifcox
Copy link
Contributor Author

clifcox commented Feb 28, 2025

That makes more sense now.

Thanks, :-)
Clif

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