diff options
author | Nicholas Meredith <nick@ndm.id.au> | 2017-11-12 05:48:55 +1000 |
---|---|---|
committer | Neil Lathwood <neil@lathwood.co.uk> | 2017-11-11 19:48:55 +0000 |
commit | 4203e00cbde157e767e8be39ffdcecb30db14e6b (patch) | |
tree | 775d7008e9bbac06946466c016df078471b9f5e7 | |
parent | f720682514df9f49d35e6ced8af41e5dc789f8e0 (diff) |
fix: Fix prompt pattern for model/comware.rb to handle ASCII Bell response +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
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lib/oxidized/model/comware.rb | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -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`. diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb index d926854..a5b7190 100644 --- a/lib/oxidized/model/comware.rb +++ b/lib/oxidized/model/comware.rb @@ -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 |