summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/junos.rb
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-07-06 11:47:54 +0300
committerGitHub <noreply@github.com>2016-07-06 11:47:54 +0300
commit02ceb047909be051bc13a1d6bb35d0f81f083ca7 (patch)
tree9bd822e9bc57f49cfd47494e8c84d31781888935 /lib/oxidized/model/junos.rb
parent503c88f987277ff1776f174dc32f3efd24d374dd (diff)
parent6fb983c3e497dcc8d8b000e9064bb43b10be29c8 (diff)
Merge pull request #488 from nickhilliard/nf-ssh-no-exec
Added support for ssh_no_exec config file variable
Diffstat (limited to 'lib/oxidized/model/junos.rb')
-rw-r--r--lib/oxidized/model/junos.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb
index bdd9bed..6392709 100644
--- a/lib/oxidized/model/junos.rb
+++ b/lib/oxidized/model/junos.rb
@@ -8,7 +8,7 @@ class JunOS < Oxidized::Model
cmd :all do |cfg|
# we don't need screen-scraping in ssh due to exec
- cfg = cfg.lines.to_a[1..-2].join if telnet
+ cfg = cfg.lines.to_a[1..-2].join if telnet || !vars(:ssh_no_exec)
cfg.lines.map { |line| line.rstrip }.join("\n") + "\n"
end
@@ -44,7 +44,7 @@ class JunOS < Oxidized::Model
end
cfg :ssh do
- exec true # don't run shell, run each command in exec channel
+ exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel
end
cfg :telnet, :ssh do