summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-11 21:14:56 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-11 21:14:56 +0200
commit36f31e7d053365fe9f5d6b64bae4ac485677c93c (patch)
treedc5366836e9776f30aa38da2929e9eb5b50a935d /lib/oxidized/model
parent91deea2ef8a7ae5f9ed6b523b720f9cf2c3f33b9 (diff)
eliminate tabs in favor of double space
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/asyncos.rb88
-rw-r--r--lib/oxidized/model/ciscosma.rb80
-rw-r--r--lib/oxidized/model/cumulus.rb2
3 files changed, 85 insertions, 85 deletions
diff --git a/lib/oxidized/model/asyncos.rb b/lib/oxidized/model/asyncos.rb
index 875690b..ac19e34 100644
--- a/lib/oxidized/model/asyncos.rb
+++ b/lib/oxidized/model/asyncos.rb
@@ -1,49 +1,49 @@
class AsyncOS < Oxidized::Model
- # ESA prompt "(mail.example.com)> "
- prompt /^\r*([(][\w. ]+[)][#>]\s+)$/
- comment '! '
-
- # Select passphrase display option
- expect /\[\S+\]>\s/ do |data, re|
- send "3\n"
- data.sub re, ''
- end
-
- # handle paging
- expect /-Press Any Key For More-+.*$/ do |data, re|
- send " "
- data.sub re, ''
- end
-
- cmd 'version' do |cfg|
- comment cfg
- end
+ # ESA prompt "(mail.example.com)> "
+ prompt /^\r*([(][\w. ]+[)][#>]\s+)$/
+ comment '! '
+
+ # Select passphrase display option
+ expect /\[\S+\]>\s/ do |data, re|
+ send "3\n"
+ data.sub re, ''
+ end
+
+ # handle paging
+ expect /-Press Any Key For More-+.*$/ do |data, re|
+ send " "
+ data.sub re, ''
+ end
+
+ cmd 'version' do |cfg|
+ comment cfg
+ end
- cmd 'showconfig' do |cfg|
- #Delete hour and date which change each run
- #cfg.gsub! /\sCurrent Time: \S+\s\S+\s+\S+\s\S+\s\S+/, ' Current Time:'
- # Delete select passphrase display option
- cfg.gsub! /Choose the passphrase option:/, ''
- cfg.gsub! /1. Mask passphrases \(Files with masked passphrases cannot be loaded using/, ''
- cfg.gsub! /loadconfig command\)/, ''
- cfg.gsub! /2. Encrypt passphrases/, ''
- cfg.gsub! /3. Plain passphrases/, ''
- cfg.gsub! /^3$/, ''
- #Delete space
- cfg.gsub! /\n\s{25,26}/, ''
- #Delete after line
- cfg.gsub! /([-\\\/,.\w><@]+)(\s{25,27})/,"\\1"
- # Add a carriage return
- cfg.gsub! /([-\\\/,.\w><@]+)(\s{6})([-\\\/,.\w><@]+)/,"\\1\n\\2\\3"
- # Delete prompt
- cfg.gsub! /^\r*([(][\w. ]+[)][#>]\s+)$/, ''
- cfg
+ cmd 'showconfig' do |cfg|
+ #Delete hour and date which change each run
+ #cfg.gsub! /\sCurrent Time: \S+\s\S+\s+\S+\s\S+\s\S+/, ' Current Time:'
+ # Delete select passphrase display option
+ cfg.gsub! /Choose the passphrase option:/, ''
+ cfg.gsub! /1. Mask passphrases \(Files with masked passphrases cannot be loaded using/, ''
+ cfg.gsub! /loadconfig command\)/, ''
+ cfg.gsub! /2. Encrypt passphrases/, ''
+ cfg.gsub! /3. Plain passphrases/, ''
+ cfg.gsub! /^3$/, ''
+ #Delete space
+ cfg.gsub! /\n\s{25,26}/, ''
+ #Delete after line
+ cfg.gsub! /([-\\\/,.\w><@]+)(\s{25,27})/,"\\1"
+ # Add a carriage return
+ cfg.gsub! /([-\\\/,.\w><@]+)(\s{6})([-\\\/,.\w><@]+)/,"\\1\n\\2\\3"
+ # Delete prompt
+ cfg.gsub! /^\r*([(][\w. ]+[)][#>]\s+)$/, ''
+ cfg
- end
-
- cfg :ssh do
- pre_logout "exit"
- end
-
+ end
+
+ cfg :ssh do
+ pre_logout "exit"
+ end
+
end
diff --git a/lib/oxidized/model/ciscosma.rb b/lib/oxidized/model/ciscosma.rb
index a52e38a..6777ad5 100644
--- a/lib/oxidized/model/ciscosma.rb
+++ b/lib/oxidized/model/ciscosma.rb
@@ -1,45 +1,45 @@
class CiscoSMA < Oxidized::Model
- # SMA prompt "mail.example.com> "
- prompt /^\r*([-\w. ]+\.[-\w. ]+\.[-\w. ]+[#>]\s+)$/
- comment '! '
-
- # Select passphrase display option
- expect /using loadconfig command\. \[Y\]\>/ do |data, re|
- send "y\n"
- data.sub re, ''
- end
-
- # handle paging
- expect /-Press Any Key For More-+.*$/ do |data, re|
- send " "
- data.sub re, ''
- end
-
- cmd 'version' do |cfg|
- comment cfg
- end
+ # SMA prompt "mail.example.com> "
+ prompt /^\r*([-\w. ]+\.[-\w. ]+\.[-\w. ]+[#>]\s+)$/
+ comment '! '
+
+ # Select passphrase display option
+ expect /using loadconfig command\. \[Y\]\>/ do |data, re|
+ send "y\n"
+ data.sub re, ''
+ end
+
+ # handle paging
+ expect /-Press Any Key For More-+.*$/ do |data, re|
+ send " "
+ data.sub re, ''
+ end
+
+ cmd 'version' do |cfg|
+ comment cfg
+ end
- cmd 'showconfig' do |cfg|
- #Delete hour and date which change each run
- #cfg.gsub! /\sCurrent Time: \S+\s\S+\s+\S+\s\S+\s\S+/, ' Current Time:'
- # Delete select passphrase display option
- cfg.gsub! /Do you want to mask the password\? Files with masked passwords cannot be loaded/, ''
- cfg.gsub! /^\s+y/, ''
- # Delete space
- cfg.gsub! /\n\s{25}/, ''
- # Delete after line
- cfg.gsub! /([\/\-,.\w><@]+)(\s{27})/,"\\1"
- # Add a carriage return
- cfg.gsub! /([\/\-,.\w><@]+)(\s{6,8})([\/\-,.\w><@]+)/,"\\1\n\\2\\3"
- # Delete prompt
- cfg.gsub! /^\r*([-\w. ]+\.[-\w. ]+\.[-\w. ]+[#>]\s+)$/, ''
- cfg
+ cmd 'showconfig' do |cfg|
+ #Delete hour and date which change each run
+ #cfg.gsub! /\sCurrent Time: \S+\s\S+\s+\S+\s\S+\s\S+/, ' Current Time:'
+ # Delete select passphrase display option
+ cfg.gsub! /Do you want to mask the password\? Files with masked passwords cannot be loaded/, ''
+ cfg.gsub! /^\s+y/, ''
+ # Delete space
+ cfg.gsub! /\n\s{25}/, ''
+ # Delete after line
+ cfg.gsub! /([\/\-,.\w><@]+)(\s{27})/,"\\1"
+ # Add a carriage return
+ cfg.gsub! /([\/\-,.\w><@]+)(\s{6,8})([\/\-,.\w><@]+)/,"\\1\n\\2\\3"
+ # Delete prompt
+ cfg.gsub! /^\r*([-\w. ]+\.[-\w. ]+\.[-\w. ]+[#>]\s+)$/, ''
+ cfg
- end
-
- cfg :ssh do
- pre_logout "exit"
- end
-
+ end
+
+ cfg :ssh do
+ pre_logout "exit"
+ end
+
end
diff --git a/lib/oxidized/model/cumulus.rb b/lib/oxidized/model/cumulus.rb
index 20acb8a..09f3955 100644
--- a/lib/oxidized/model/cumulus.rb
+++ b/lib/oxidized/model/cumulus.rb
@@ -68,7 +68,7 @@ class Cumulus < Oxidized::Model
cfg += add_comment 'TRAFFIC'
cfg += cmd 'cat /etc/cumulus/datapath/traffic.conf'
-
+
cfg += add_comment 'ACL'
cfg += cmd 'iptables -L -n'