diff options
author | ytti <saku@ytti.fi> | 2014-10-23 20:07:26 +0300 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2014-10-23 20:07:26 +0300 |
commit | b2811e88e05bfb3e1b2707e41c00e4a2cdcb4a6f (patch) | |
tree | bb6f92c62b86a67ef1db9bdf29c429c94e1eab98 | |
parent | e261abf91d6bdd637eb448ad281f820e0aa43964 (diff) | |
parent | 764ebd865a8360057dea1b913cd41d6361e0a01f (diff) |
Merge pull request #57 from sts/master
Fixing Cisco ASA models
-rw-r--r-- | lib/oxidized/model/asa.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/oxidized/model/asa.rb b/lib/oxidized/model/asa.rb index 3ee4e2d..11db547 100644 --- a/lib/oxidized/model/asa.rb +++ b/lib/oxidized/model/asa.rb @@ -3,7 +3,7 @@ class ASA < Oxidized::Model # Cisco ASA model # # Only SSH supported for the sake of security - prompt /^\r*([\w]+[#>]\s?)$/ + prompt /^\r*([\w.@()-]+[#>]\s?)$/ comment '! ' cmd :all do |cfg| @@ -16,11 +16,10 @@ class ASA < Oxidized::Model cfg end - cmd 'show clock' do |cfg| - comment cfg - end - cmd 'show version' do |cfg| + # avoid commits due to uptime / ixo-router01 up 2 mins 28 secs / ixo-router01 up 1 days 2 hours + cfg = cfg.each_line.select { |line| not line.match /\s+up\s+\d+\s+/ } + cfg = cfg.join comment cfg end |