Methods

Class/Module Index [+]

Quicksearch

Deltacloud::Runner

Public Class Methods

execute(command, opts={}) click to toggle source
# File lib/deltacloud/runner.rb, line 34
def self.execute(command, opts={})

  if opts[:credentials] and (not opts[:credentials][:password] and not opts[:private_key])
    raise RunnerError::new("Either password or key must be specified")
  end

  # First check networking and firewalling
  network = Network::new(opts[:ip], opts[:port])

  # Then check SSH availability
  ssh = SSH::new(network, opts[:credentials], opts[:private_key])

  # Finaly execute SSH command on instance
  ssh.execute(command)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.