From a4bd3e5ca5ab747fdbf2bd876d7be7a947e74f46 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sun, 8 Apr 2018 00:35:47 +0200 Subject: eliminate inverse methods from models --- lib/oxidized/model/vrp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model/vrp.rb') diff --git a/lib/oxidized/model/vrp.rb b/lib/oxidized/model/vrp.rb index 98229c3..e44f69e 100644 --- a/lib/oxidized/model/vrp.rb +++ b/lib/oxidized/model/vrp.rb @@ -25,7 +25,7 @@ class VRP < Oxidized::Model 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 -- cgit v1.2.1 From 21e3d6490496573f25ef77fe8172766ac7d1a736 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 21 Apr 2018 13:27:05 +0200 Subject: the great makeover - standardize layout, alignment, indentation --- lib/oxidized/model/vrp.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/oxidized/model/vrp.rb') diff --git a/lib/oxidized/model/vrp.rb b/lib/oxidized/model/vrp.rb index e44f69e..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,13 +13,13 @@ 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 @@ -36,5 +36,4 @@ class VRP < Oxidized::Model cmd 'display current-configuration all' do |cfg| cfg end - end -- cgit v1.2.1