mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
make net/ssh require optional
This commit is contained in:
parent
8d37c603b3
commit
ebfaa0c97a
3 changed files with 6 additions and 3 deletions
|
@ -81,7 +81,6 @@ module Fog
|
|||
|
||||
def setup(credentials = {})
|
||||
requires :ssh_ip_address
|
||||
require 'net/ssh'
|
||||
|
||||
commands = [
|
||||
%{mkdir .ssh},
|
||||
|
|
|
@ -90,7 +90,6 @@ module Fog
|
|||
|
||||
def setup(credentials = {})
|
||||
requires :ssh_ip_address, :username
|
||||
require 'net/ssh'
|
||||
|
||||
attrs = attributes.dup
|
||||
attrs.delete(:rootpassword)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
require 'fog/joyent/core'
|
||||
require 'fog/joyent/errors'
|
||||
require 'net/ssh'
|
||||
|
||||
module Fog
|
||||
module Compute
|
||||
|
@ -126,6 +125,12 @@ module Fog
|
|||
end
|
||||
|
||||
if options[:joyent_keyname]
|
||||
begin
|
||||
require "net/ssh"
|
||||
rescue LoadError
|
||||
Fog::Logger.warning("'net/ssh' missing, please install and try again.")
|
||||
exit(1)
|
||||
end
|
||||
@joyent_keyname = options[:joyent_keyname]
|
||||
@joyent_keyphrase = options[:joyent_keyphrase]
|
||||
@key_manager = Net::SSH::Authentication::KeyManager.new(nil, {
|
||||
|
|
Loading…
Add table
Reference in a new issue