Sha256: 360f1d5fcd77b8d644bb08c18fd2c0b84ebea5a5c6237ccbad732c788f9f7bb7
Contents?: true
Size: 733 Bytes
Versions: 14
Compression:
Stored size: 733 Bytes
Contents
require 'net/scp' module Mccloud::Provider module Host module VmCommand def transfer(src,dest,options = {}) scp(src,dest,options) end def scp(src,dest,options = {}) # override options from Mccloudfile with parameter options ssh_options = mccloudfile_options.merge(options) Net::SCP.start(ip_address,ssh_options[:user],ssh_options) do |auth_scp| auth_scp.upload!(src,dest) end end def mccloudfile_options opts = Hash.new (opts[:user] = @user) if @user (opts[:keys] = @private_key_path) if @private_key_path (opts[:port] = @port) if @port opts end end #module end #module end #module
Version data entries
14 entries across 14 versions & 1 rubygems