module Rubyipmi::PowerMixin

Public Instance Methods

cycle() click to toggle source

Power cycle the system

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 19
def cycle
  off? ? on : command("cycle")
end
off() click to toggle source

Turn the system off

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 9
def off
  command("off")
end
off?() click to toggle source

Test to see if the power is off

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 34
def off?
  status == "off"
end
on() click to toggle source

Turn the system on

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 4
def on
  command("on")
end
on?() click to toggle source

Test to see if the power is on

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 29
def on?
  status == "on"
end
powerInterrupt() click to toggle source

DEPRECATED: Please use power_interrupt instead.

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 45
def powerInterrupt
  warn "[DEPRECATION] `powerInterrupt` is deprecated, please use `power_interrupt` instead."
  power_interrupt
end
reset() click to toggle source

Perform a power reset on the system

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 14
def reset
  command("reset")
end
softShutdown() click to toggle source

DEPRECATED: Please use soft_shutdown instead.

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 39
def softShutdown
  warn "[DEPRECATION] `softShutdown` is deprecated, please use `soft_shutdown` instead."
  soft_shutdown
end
soft_shutdown() click to toggle source

Perform a soft shutdown, like briefly pushing the power button

# File lib/rubyipmi/commands/mixins/power_mixin.rb, line 24
def soft_shutdown
  command("soft")
end