summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/stoneos.rb
diff options
context:
space:
mode:
authorWild Kat <wk@users.noreply.github.com>2018-05-26 23:49:29 +0200
committerGitHub <noreply@github.com>2018-05-26 23:49:29 +0200
commit39dbb74c527c054007e26ad34c8921d4be6cb638 (patch)
treed55745153153450fb40e1f591eb861495a6068d9 /lib/oxidized/model/stoneos.rb
parentdefdc69f92b3bcf62b1fd3b5ceac63a7a4e637ae (diff)
parent42bf10b7bce34ff577c469f6c2f659f3913cbf4a (diff)
Merge branch 'master' into FortiOS-Push
Diffstat (limited to 'lib/oxidized/model/stoneos.rb')
-rw-r--r--lib/oxidized/model/stoneos.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/oxidized/model/stoneos.rb b/lib/oxidized/model/stoneos.rb
new file mode 100644
index 0000000..d2bc017
--- /dev/null
+++ b/lib/oxidized/model/stoneos.rb
@@ -0,0 +1,32 @@
+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.each_line.to_a[1..-2].join
+ end
+
+ cmd 'show configuration running'
+
+ cmd 'show version' do |cfg|
+ comment cfg
+ end
+
+ cfg :telnet do
+ username(/^login:/)
+ password(/^Password:/)
+ end
+
+ cfg :telnet, :ssh do
+ post_login 'terminal length 256'
+ post_login 'terminal width 512'
+ pre_logout 'exit'
+ end
+end