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

routeros model: Remove intermittent POE comment #2141

Merged
merged 2 commits into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- rubocop dependency now ~> 0.81.0, the last one with ruby 2.3 support
- change pfSense secret scrubbing to handle new format in 2.4.5+
- Dockerfile rebased to phusion/baseimage-docker bionic-1.0.0
- scrub PoE related messages from routeros config output (@pioto)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions lib/oxidized/model/routeros.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class RouterOS < Oxidized::Model
cfg.gsub! /\\\r?\n\s+/, '' # strip new line
cfg.gsub! /# inactive time\r\n/, '' # Remove time based system comment
cfg.gsub! /# received packet from \S+ bad format\r\n/, '' # Remove intermittent VRRP/CARP collision comment
cfg.gsub! /# poe-out status: short_circuit\r\n/, '' # Remove intermittent POE short_circuit comment
cfg = cfg.split("\n").reject { |line| line[/^#\s\w{3}\/\d{2}\/\d{4}.*$/] }
cfg.join("\n") + "\n"
end
Expand Down