Class: ChefMetalLXC::LXCTransport::LXCExecuteResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/chef_metal_lxc/lxc_transport.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exitstatusObject

Returns the value of attribute exitstatus

Returns:

  • (Object)

    the current value of exitstatus



14
15
16
# File 'lib/chef_metal_lxc/lxc_transport.rb', line 14

def exitstatus
  @exitstatus
end

#stderrObject

Returns the value of attribute stderr

Returns:

  • (Object)

    the current value of stderr



14
15
16
# File 'lib/chef_metal_lxc/lxc_transport.rb', line 14

def stderr
  @stderr
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



14
15
16
# File 'lib/chef_metal_lxc/lxc_transport.rb', line 14

def stdout
  @stdout
end

Instance Method Details

#error!Object



15
16
17
# File 'lib/chef_metal_lxc/lxc_transport.rb', line 15

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