summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/vrp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/vrp.rb')
-rw-r--r--lib/oxidized/model/vrp.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/oxidized/model/vrp.rb b/lib/oxidized/model/vrp.rb
index 98229c3..42762c2 100644
--- a/lib/oxidized/model/vrp.rb
+++ b/lib/oxidized/model/vrp.rb
@@ -1,6 +1,6 @@
class VRP < Oxidized::Model
# Huawei VRP
-
+
prompt /^(<[\w.-]+>)$/
comment '# '
@@ -13,19 +13,19 @@ class VRP < Oxidized::Model
cmd :all do |cfg|
cfg.each_line.to_a[1..-2].join
end
-
+
cfg :telnet do
username /^Username:$/
password /^Password:$/
end
- cfg :telnet, :ssh do
+ cfg :telnet, :ssh do
post_login 'screen-length 0 temporary'
pre_logout 'quit'
end
cmd 'display version' do |cfg|
- cfg = cfg.each_line.select {|l| not l.match /uptime/ }.join
+ cfg = cfg.each_line.reject { |l| l.match /uptime/ }.join
comment cfg
end
@@ -36,5 +36,4 @@ class VRP < Oxidized::Model
cmd 'display current-configuration all' do |cfg|
cfg
end
-
end