summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/vrp.rb
diff options
context:
space:
mode:
authorKodApa85 <parsons151185@gmail.com>2018-04-27 13:48:47 +0100
committerGitHub <noreply@github.com>2018-04-27 13:48:47 +0100
commita40bb72e78755891ec84f5a4378c30114dae8316 (patch)
tree5e057527f163fa1bea10cbdc7318b035ff939200 /lib/oxidized/model/vrp.rb
parentdbbe6af563072b62e373a9824c6a23482d20896e (diff)
parentf530a50a949310aa9996d764eeaaba7458b7d6b6 (diff)
Merge branch 'master' into xgs4600-cli
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