summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hilliard <nick@foobar.org>2016-07-10 11:09:53 +0100
committerNick Hilliard <nick@foobar.org>2016-07-10 11:09:53 +0100
commit2e2d5fde34efddc669e97c4c8af581ca2aaf3e1c (patch)
tree043e46157fc499455223201b108a64effc1891a9
parent80e3d54056b7cfc7bb0ab240ae89e19b959b1a6a (diff)
move ssh_no_exec exec test into exec definition
-rw-r--r--lib/oxidized/input/ssh.rb2
-rw-r--r--lib/oxidized/model/airos.rb2
-rw-r--r--lib/oxidized/model/fabricos.rb2
-rw-r--r--lib/oxidized/model/junos.rb2
-rw-r--r--lib/oxidized/model/opengear.rb2
-rw-r--r--lib/oxidized/model/routeros.rb2
-rw-r--r--lib/oxidized/model/tmos.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index db39a7e..8db5aa4 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -112,7 +112,7 @@ module Oxidized
end
def exec state=nil
- state == nil ? @exec : (@exec=state)
+ state == nil ? @exec : (@exec=state) unless vars :ssh_no_exec
end
def cmd_shell(cmd, expect_re)
diff --git a/lib/oxidized/model/airos.rb b/lib/oxidized/model/airos.rb
index 3ccf887..775005f 100644
--- a/lib/oxidized/model/airos.rb
+++ b/lib/oxidized/model/airos.rb
@@ -15,6 +15,6 @@ class Airos < Oxidized::Model
end
cfg :ssh do
- exec true unless vars :ssh_no_exec
+ exec true
end
end
diff --git a/lib/oxidized/model/fabricos.rb b/lib/oxidized/model/fabricos.rb
index 8ad32d9..7ab9fd5 100644
--- a/lib/oxidized/model/fabricos.rb
+++ b/lib/oxidized/model/fabricos.rb
@@ -15,7 +15,7 @@ class FabricOS < Oxidized::Model
end
cfg :ssh do
- exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel
+ exec true # don't run shell, run each command in exec channel
end
end
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb
index a4fee6a..058e3cf 100644
--- a/lib/oxidized/model/junos.rb
+++ b/lib/oxidized/model/junos.rb
@@ -43,7 +43,7 @@ class JunOS < Oxidized::Model
end
cfg :ssh do
- exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel
+ exec true # don't run shell, run each command in exec channel
end
cfg :telnet, :ssh do
diff --git a/lib/oxidized/model/opengear.rb b/lib/oxidized/model/opengear.rb
index 0e2f8d2..7f801f8 100644
--- a/lib/oxidized/model/opengear.rb
+++ b/lib/oxidized/model/opengear.rb
@@ -13,7 +13,7 @@ class OpenGear < Oxidized::Model
cmd 'config -g config'
cfg :ssh do
- exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel
+ exec true # don't run shell, run each command in exec channel
end
end
diff --git a/lib/oxidized/model/routeros.rb b/lib/oxidized/model/routeros.rb
index f7746c8..4822500 100644
--- a/lib/oxidized/model/routeros.rb
+++ b/lib/oxidized/model/routeros.rb
@@ -18,6 +18,6 @@ class RouterOS < Oxidized::Model
end
cfg :ssh do
- exec true unless vars :ssh_no_exec
+ exec true
end
end
diff --git a/lib/oxidized/model/tmos.rb b/lib/oxidized/model/tmos.rb
index 7a1ca73..390046d 100644
--- a/lib/oxidized/model/tmos.rb
+++ b/lib/oxidized/model/tmos.rb
@@ -46,7 +46,7 @@ class TMOS < Oxidized::Model
cmd('cat /config/partitions/*/bigip.conf') { |cfg| comment cfg }
cfg :ssh do
- exec true unless vars :ssh_no_exec # don't run shell, run each command in exec channel
+ exec true # don't run shell, run each command in exec channel
end
end