Skip to content

Commit

Permalink
fix: Fix prompt pattern for model/comware.rb to handle ASCII Bell res…
Browse files Browse the repository at this point in the history
…ponse +fix minor README.md typo (#1094)

* comware.rb: update prompt to work when trailing ^G ASCII 7 (bell) is sent

* README.md: correct typo 'HTT' to 'HTTP' for Configuration / Outputs paragraph

* model/comware.rb: cleaning out some comments
  • Loading branch information
udha authored and laf committed Nov 11, 2017
1 parent f720682 commit 4203e00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Oxidized supports [CSV](docs/Configuration.md#source-csv), [SQLite](docs/Config

## Outputs

Possible outputs are either [File](docs/Configuration.md#output-file), [GIT](docs/Configuration.md#output-git), [GIT-Crypt](docs/Configuration.md#output-git-crypt) and [HTT](docs/Configuration.md#output-http). The file backend takes a destination directory as argument and will keep a file per device, with most recent running version of a device. The GIT backend (recommended) will initialize an empty GIT repository in the specified path and create a new commit on every configuration change. The GIT-Crypt backend will also initialize a GIT repository but every configuration push to it will be encrypted on the fly by using `git-crypt` tool. Take a look at the [Configuration](docs/Configuration.md) for more details.
Possible outputs are either [File](docs/Configuration.md#output-file), [GIT](docs/Configuration.md#output-git), [GIT-Crypt](docs/Configuration.md#output-git-crypt) and [HTTP](docs/Configuration.md#output-http). The file backend takes a destination directory as argument and will keep a file per device, with most recent running version of a device. The GIT backend (recommended) will initialize an empty GIT repository in the specified path and create a new commit on every configuration change. The GIT-Crypt backend will also initialize a GIT repository but every configuration push to it will be encrypted on the fly by using `git-crypt` tool. Take a look at the [Configuration](docs/Configuration.md) for more details.

Maps define how to map a model's fields to model [model fields](https://github.com/ytti/oxidized/tree/master/lib/oxidized/model). Most of the settings should be self explanatory, log is ignored if `use_syslog`(requires Ruby >= 2.0) is set to `true`.

Expand Down
4 changes: 2 additions & 2 deletions lib/oxidized/model/comware.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Comware < Oxidized::Model
# HP (A-series)/H3C/3Com Comware

# sometimes the prompt might have a leading nul
prompt /^\0*(<[\w.-]+>)$/
# sometimes the prompt might have a leading nul or trailing ASCII Bell (^G)
prompt /^\0*(<[\w.-]+>).?$/
comment '# '

# example how to handle pager
Expand Down

0 comments on commit 4203e00

Please sign in to comment.