Skip to content

Commit

Permalink
Update expected prompt (#3332)
Browse files Browse the repository at this point in the history
This is to fix issue #3330 so multiline output won't break the module.

Some cumulus commands results do not end with \n, so the prompt gets
polluted by the trailing line of the previous command.
This is the case of `cat /etc/cumulus/ports.conf`, so we an echo to it to get an LF at EOF..

---------

Co-authored-by: Robert Cheramy <r.cheramy@netze-bw.de>
Co-authored-by: Michał Margula <mmargula@squiz.pl>
  • Loading branch information
3 people authored Jan 3, 2025
1 parent 7cfa1ae commit d9639c8
Show file tree
Hide file tree
Showing 9 changed files with 1,924 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +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]

### 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. The prompt is more specific now (@alchemyx, @robertcheramy)

### Fixed
- tplink: send 'enable' before the enable password. Fixes #3271 (@robertcheramy)
Expand Down
22 changes: 22 additions & 0 deletions examples/device-simulation/cmdsets/cumulus_frr
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cat /etc/hostname
cat /etc/hosts
grep -r "" /etc/network/interface* | cut -d "/" -f 4-
cat /etc/resolv.conf
cat /etc/ntp.conf
cat /etc/snmp/snmpd.conf
cat /etc/frr/daemons
cat /etc/frr/zebra.conf
cat /etc/frr/bgpd.conf
cat /etc/frr/ospfd.conf
cat /etc/frr/ospf6d.conf
cat /etc/frr/frr.conf
cat /etc/motd
cat /etc/passwd
cat /etc/cumulus/switchd.conf
cat /etc/cumulus/ports.conf
cat /etc/cumulus/datapath/traffic.conf
cat /etc/cumulus/acl/policy.conf
cat /etc/default/isc-dhcp-relay
cat /etc/cumulus/etc.replace/os-release
cl-license
exit
2 changes: 2 additions & 0 deletions examples/device-simulation/cmdsets/cumulus_nclu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
net show configuration commands
exit
2 changes: 2 additions & 0 deletions examples/device-simulation/cmdsets/cumulus_nvue
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nv config show --color off
exit
22 changes: 22 additions & 0 deletions examples/device-simulation/cmdsets/cumulus_quagga
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cat /etc/hostname
cat /etc/hosts
grep -r "" /etc/network/interface* | cut -d "/" -f 4-
cat /etc/resolv.conf
cat /etc/ntp.conf
cat /etc/snmp/snmpd.conf
cat /etc/quagga/daemons
cat /etc/quagga/zebra.conf
cat /etc/quagga/bgpd.conf
cat /etc/quagga/ospfd.conf
cat /etc/quagga/ospf6d.conf
cat /etc/quagga/Quagga.conf
cat /etc/motd
cat /etc/passwd
cat /etc/cumulus/switchd.conf
cat /etc/cumulus/ports.conf
cat /etc/cumulus/datapath/traffic.conf
cat /etc/cumulus/acl/policy.conf
cat /etc/default/isc-dhcp-relay
cat /etc/cumulus/etc.replace/os-release
cl-license
exit
Loading

0 comments on commit d9639c8

Please sign in to comment.