Hello,
Since "interrupt" action is supported by power operation,
why don't we accept it for "bkr system-power".
It is useful if an user wants to trigger crash dump on hung system.
The patch is tested with 0.9.2.
--
Jun'ichi Nomura, NEC Corporation
diff --git a/Client/src/bkr/client/commands/cmd_system_power.py b/Client/src/bkr/client/commands/cmd_system_power.py
index 5072d1c..bf6f220 100644
--- a/Client/src/bkr/client/commands/cmd_system_power.py
+++ b/Client/src/bkr/client/commands/cmd_system_power.py
@@ -23,7 +23,7 @@
.. option:: --action <action>
Perform the given power action. Valid actions are ``on``, ``off``,
- and ``reboot``. The default is ``reboot``.
+ ``interrupt``, and ``reboot``. The default is ``reboot``.
.. option:: --clear-netboot
@@ -62,12 +62,12 @@ class System_Power(BeakerCommand):
"""Control power for a system"""
enabled = True
- valid_actions = ('on', 'off', 'reboot')
+ valid_actions = ('on', 'off', 'interrupt', 'reboot')
def options(self):
self.parser.usage = "%%prog %s [options] <fqdn>" % self.normalized_name
self.parser.add_option('--action', metavar='ACTION',
- help='Perform ACTION (on, off, or reboot) [default: %default]')
+ help='Perform ACTION (on, off, interrupt, or reboot) [default: %default]')
self.parser.add_option('--clear-netboot', action='store_true',
help="Clear system's netboot configuration "
"before performing action")