diff options
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/model/stoneos.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/oxidized/model/stoneos.rb b/lib/oxidized/model/stoneos.rb index 405e389..d2bc017 100644 --- a/lib/oxidized/model/stoneos.rb +++ b/lib/oxidized/model/stoneos.rb @@ -1,25 +1,19 @@ -class Stoneos < Oxidized::Model -#Hillstone Networks StoneOS software +class StoneOS < Oxidized::Model + # Hillstone Networks StoneOS software prompt /^\r?[\w.()-]+[#>](\s)?$/ comment '# ' - + expect /^\s.*--More--.*$/ do |data, re| - send ' ' - data.sub re, '' - end - - cmd :all do |cfg| - cfg = cfg.lines.to_a[1..-2].join + send ' ' + data.sub re, '' end - cmd :secret do |cfg| - cfg + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join end - cmd 'show configuration running' do |cfg| - cfg - end + cmd 'show configuration running' cmd 'show version' do |cfg| comment cfg |