Sha256: 561bc39be4f57dc99b42d891b44b1422c7c34ba0a2dfc834d3f06f803621499e

Contents?: true

Size: 1.22 KB

Versions: 23

Compression:

Stored size: 1.22 KB

Contents

module Veewee
  module Provider
    module Core
      module Helper

        module Comm

          def comm_method
            if (definition.winrm_user && definition.winrm_password)
              :winrm
            else
              :ssh
            end
          end

          def when_comm_login_works(ip="127.0.0.1", options = {  } , &block)
            case comm_method
            when :winrm
              when_winrm_login_works(ip,options,block)
            when :ssh
              when_ssh_login_works(ip,options,block)
            end
          end

          def comm_transfer_file(host,filename,destination = '.' , options = {})
            case comm_method
            when :winrm
              winrm_transfer_file(host,filename,destination,options)
            when :ssh
              ssh_transfer_file(host,filename,destination,options)
            end
          end

          def comm_execute(host,command, options = { :progress => "on"} )
            case comm_method
            when :winrm
              winrm_execute(host,command, options )
            when :ssh
              ssh_execute(host,command, options )
            end
          end

        end #Class
      end #Module
    end #Module
  end #Module
end #Module

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
veewee-0.5.0.alpha4 lib/veewee/provider/core/helper/comm.rb
veewee-0.5.0.alpha3 lib/veewee/provider/core/helper/comm.rb
veewee-0.5.0.alpha2 lib/veewee/provider/core/helper/comm.rb
veewee-0.5.0.alpha1 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.5.1 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.5 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.5.pre1 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.4 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.3 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.2 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.1 lib/veewee/provider/core/helper/comm.rb
veewee-0.4.0 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.12 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.11 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.10 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.9 lib/veewee/provider/core/helper/comm.rb
veewee-atlassian-0.3.11 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.7 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.6 lib/veewee/provider/core/helper/comm.rb
veewee-0.3.5 lib/veewee/provider/core/helper/comm.rb