Class: Chef::Provisioning::LXCDriver::LXCTransport::LXCExecuteResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/chef/provisioning/lxc_driver/lxc_transport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



16
17
18
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 16

def command
  @command
end

#exitstatusObject

Returns the value of attribute exitstatus

Returns:

  • (Object)

    the current value of exitstatus



16
17
18
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 16

def exitstatus
  @exitstatus
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



16
17
18
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 16

def options
  @options
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



16
17
18
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 16

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



16
17
18
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 16

def stdout
  @stdout
end

Instance Method Details

#error!Object



17
18
19
# File 'lib/chef/provisioning/lxc_driver/lxc_transport.rb', line 17

def error!
  raise "Error: '#{command}' failed with exit code #{exitstatus}.\nSTDOUT:#{stdout}\nSTDERR:#{stderr}" if exitstatus != 0
end