Module: TestLab::Support::Execution

Included in:
Container, Node
Defined in:
lib/testlab/support/execution.rb

Overview

Execution Support Module

Author:

  • Zachary Patten <zachary AT jovelabs DOT com>

Instance Method Summary collapse

Instance Method Details

#bootstrap(content, options = {}) ⇒ Object

Bootstrap

Renders the supplied content into a file over the SSH connection and executes it as the ‘root’ user.



13
14
15
# File 'lib/testlab/support/execution.rb', line 13

def bootstrap(content, options={})
  ssh.bootstrap(content, {:set_x => true, :set_e => true}.merge(options))
end

#download(remote, local, options = {}) ⇒ Object

Download



39
40
41
# File 'lib/testlab/support/execution.rb', line 39

def download(remote, local, options={})
  ssh.download(remote, local, options)
end

#exec(command, options = {}) ⇒ Object

Execute

Executes the supplied command over the SSH connection.



20
21
22
# File 'lib/testlab/support/execution.rb', line 20

def exec(command, options={})
  ssh.exec(command, options)
end

#file(options = {}, &block) ⇒ Object

File

Renders the supplied file over the SSH connection.



27
28
29
# File 'lib/testlab/support/execution.rb', line 27

def file(options={}, &block)
  ssh.file(options, &block)
end

#upload(local, remote, options = {}) ⇒ Object

Uploads

Uploads the supplied file over the SSH connection.



34
35
36
# File 'lib/testlab/support/execution.rb', line 34

def upload(local, remote, options={})
  ssh.upload(local, remote, options)
end