Class: Dployr::Commands::Ssh
Instance Method Summary collapse
-
#initialize(options) ⇒ Ssh
constructor
A new instance of Ssh.
Methods inherited from Base
#create, #create_compute_client, #get_region_config
Methods included from Utils
parse_attributes, parse_flags, parse_matrix
Constructor Details
#initialize(options) ⇒ Ssh
Returns a new instance of Ssh.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dployr/commands/ssh.rb', line 9 def initialize() super puts "Connecting to #{@provider}...".yellow @client = Dployr::Compute.const_get(@provider.to_sym).new @options, @p_attrs puts "Looking for #{@p_attrs["name"]} in #{@options[:region]}...".yellow @ip = @client.get_ip if @ip puts "#{@p_attrs["name"]} found with IP #{@ip}".yellow else raise "#{@p_attrs["name"]} not found" end Dployr::Scripts::Ssh.new @ip, @config end |