summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-05-13 15:01:13 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-13 15:01:13 -0700
commita8e4df735abcbb61915c28378f2fd045bdcdeb42 (patch)
treea05a61d4ca514ef466bccc8217a6d61b5cd4ca4c /lib/puppet/util
parent82fb02ce27c95d8326335a8d52a9ab7e676fe8d3 (diff)
parent4b7afaa065383c4a441068a15f97ab82d2ebd3fc (diff)
downloadpuppet-a8e4df735abcbb61915c28378f2fd045bdcdeb42.tar.gz
puppet-a8e4df735abcbb61915c28378f2fd045bdcdeb42.tar.xz
puppet-a8e4df735abcbb61915c28378f2fd045bdcdeb42.zip
Merge branch '2.7.next' into next
* 2.7.next: Revert "(#7220) Add the ability to "inherit" options." (#7469) Add license to test face so tests pass (#7264) Docs: Clarify that subscribe/notify imply require/before (#7468) Stub spec that tries to connect to pypi.python.org Prevent spec failure caused by network device mock leak Fix #7299 - do not require net/ssh for running rake spec
Diffstat (limited to 'lib/puppet/util')
-rw-r--r--lib/puppet/util/network_device/transport/ssh.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/util/network_device/transport/ssh.rb b/lib/puppet/util/network_device/transport/ssh.rb
index bf0e7193c..3d7976543 100644
--- a/lib/puppet/util/network_device/transport/ssh.rb
+++ b/lib/puppet/util/network_device/transport/ssh.rb
@@ -2,7 +2,6 @@
require 'puppet/util/network_device'
require 'puppet/util/network_device/transport'
require 'puppet/util/network_device/transport/base'
-require 'net/ssh'
# This is an adaptation/simplification of gem net-ssh-telnet, which aims to have
# a sane interface to Net::SSH. Credits goes to net-ssh-telnet authors
@@ -12,6 +11,9 @@ class Puppet::Util::NetworkDevice::Transport::Ssh < Puppet::Util::NetworkDevice:
def initialize
super
+ unless Puppet.features.ssh?
+ raise 'Connecting with ssh to a network device requires the \'net/ssh\' ruby library'
+ end
end
def handles_login?