Module: Rubyipmi::PowerMixin
- Included in:
- Freeipmi::Power, Ipmitool::Power
- Defined in:
- lib/rubyipmi/commands/mixins/power_mixin.rb
Instance Method Summary collapse
-
#cycle ⇒ Object
Power cycle the system.
-
#off ⇒ Object
Turn the system off.
-
#off? ⇒ Boolean
Test to see if the power is off.
-
#on ⇒ Object
Turn the system on.
-
#on? ⇒ Boolean
Test to see if the power is on.
-
#powerInterrupt ⇒ Object
DEPRECATED: Please use power_interrupt instead.
-
#reset ⇒ Object
Perform a power reset on the system.
-
#soft_shutdown ⇒ Object
Perform a soft shutdown, like briefly pushing the power button.
-
#softShutdown ⇒ Object
DEPRECATED: Please use soft_shutdown instead.
Instance Method Details
#cycle ⇒ Object
Power cycle the system
19 20 21 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 19 def cycle off? ? on : command("cycle") end |
#off ⇒ Object
Turn the system off
9 10 11 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 9 def off command("off") end |
#off? ⇒ Boolean
Test to see if the power is off
34 35 36 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 34 def off? status == "off" end |
#on ⇒ Object
Turn the system on
4 5 6 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 4 def on command("on") end |
#on? ⇒ Boolean
Test to see if the power is on
29 30 31 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 29 def on? status == "on" end |
#powerInterrupt ⇒ Object
DEPRECATED: Please use power_interrupt instead.
45 46 47 48 |
# 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 ⇒ Object
Perform a power reset on the system
14 15 16 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 14 def reset command("reset") end |
#soft_shutdown ⇒ Object
Perform a soft shutdown, like briefly pushing the power button
24 25 26 |
# File 'lib/rubyipmi/commands/mixins/power_mixin.rb', line 24 def soft_shutdown command("soft") end |
#softShutdown ⇒ Object
DEPRECATED: Please use soft_shutdown instead.
39 40 41 42 |
# 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 |