Sha256: 284888ab607949f02bda08d7241958ba33ea23b46886a185b59c7ef7cdb8792f
Contents?: true
Size: 817 Bytes
Versions: 13
Compression:
Stored size: 817 Bytes
Contents
module Mccloud::Provider module Aws module VmCommand def transfer(src,dest,options = {}) scp(src,dest,options) end def scp(local_path, remote_path, scp_options = {}) unless File.exists?(local_path) raise Mccloud::Error,"scp failed: #{local_path} does not exist" end #@raw.scp(src,dest) scp_options[:key_data] = [@raw.private_key] if @raw.private_key ::Fog::SCP.new(self.ip_address, @raw.username, sanitize(scp_options)).upload(local_path, remote_path, {}) end # # sanitize the options by converting to a hash with # all keys converted to symbols as required by net/ssh # def sanitize(options) Hash[options.map{|(k,v)| [k.to_sym,v]}] end end #module end #module end #module
Version data entries
13 entries across 13 versions & 1 rubygems