Skip to content

Commit

Permalink
Update PR #3332 documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcheramy committed Jan 3, 2025
1 parent d5a3b64 commit ade3093
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 1 addition & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]
### Release notes
- cumulus: to fix prompt issues, the prompt does not match on the leading
newline anymore. We had to make the prompt regex more restrictive to avoid
side effects. If you get into timeouts because of the new prompt, open an
issue so that we can adapt the prompt to your needs.

### Added
- junos: add unit test (@systeembeheerder)
- apc_aos: support for scp (@robertcheramy)

### Changed
- sonicos: accept policy message. Fixes #3339 (@Steve-M-C, @robertcheramy)
- input/ssh: change input.debug to dump all characters and include sent commands. (@robertcheramy)
- cumulus: remove ANSI Escape codes and fix prompt issues (@alchemyx, @robertcheramy)
- cumulus: remove ANSI Escape codes and fix prompt issues. The prompt is more specific now (@alchemyx, @robertcheramy)

### Fixed
- tplink: send 'enable' before the enable password. Fixes #3271 (@robertcheramy)
Expand Down
11 changes: 7 additions & 4 deletions lib/oxidized/model/cumulus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ class Cumulus < Oxidized::Model
data.gsub re, ''
end

# The prompt has ANSI ESC codes, the are removed from the code above
# We do not match the line begining, as some commands end without \n
# The prompt contains ANSI escape codes, which have already been removed
# from the expect call above
# ^ : match begin of line, to have the most specific prompt
# [\w.-]+@[\w.-]+ : user@hostname
# (:mgmt)? : optional when logged in out of band
# :~[#$] $ : end of prompt, containing the
# path, which is always "~" in our context
# :~[#$] $ : end of prompt, containing the linux path,
# which is always "~" in our context
prompt /^[\w.-]+@[\w.-]+(:mgmt)?:~[#$] $/
comment '# '

Expand Down Expand Up @@ -90,6 +91,8 @@ def add_comment(comment)
cfg += cmd 'cat /etc/cumulus/switchd.conf'

cfg += add_comment 'PORTS'
# in some configurations, ports.conf has no trailing Line Feed,
# which breaks the prompt, so we add one
cfg += cmd "cat /etc/cumulus/ports.conf; echo"

cfg += add_comment 'TRAFFIC'
Expand Down

0 comments on commit ade3093

Please sign in to comment.