summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/vrp.rb
diff options
context:
space:
mode:
authorRon <rgnv@users.noreply.github.com>2018-04-27 06:24:56 -0700
committerGitHub <noreply@github.com>2018-04-27 06:24:56 -0700
commit2bb40ad4d9e31cf2cd63a373f7c607eb86547e46 (patch)
treec12b52f0acd5192c457fa07189c4946674cd11fb /lib/oxidized/model/vrp.rb
parentec90b081f0fed05497ce6ae21e4b4ba4d44ecc01 (diff)
parent83a00943d7333fafdfe352173713a22a5ac89f6f (diff)
Merge pull request #1 from wk/pr-1280
massage into rubocop compliance
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