Revision b2f29800
b/lib/backend.py | ||
---|---|---|
1755 | 1755 |
atime=atime, mtime=mtime) |
1756 | 1756 |
|
1757 | 1757 |
|
1758 |
def RunOob(oob_program, command, node, timeout): |
|
1759 |
"""Executes oob_program with given command on given node. |
|
1760 |
|
|
1761 |
@param oob_program: The path to the executable oob_program |
|
1762 |
@param command: The command to invoke on oob_program |
|
1763 |
@param node: The node given as an argument to the program |
|
1764 |
@param timeout: Timeout after which we kill the oob program |
|
1765 |
|
|
1766 |
@return: stdout |
|
1767 |
@raise RPCFail: If execution fails for some reason |
|
1768 |
|
|
1769 |
""" |
|
1770 |
result = utils.RunCmd([oob_program, command, node], timeout=timeout) |
|
1771 |
|
|
1772 |
if result.failed: |
|
1773 |
_Fail("'%s' failed with reason '%s'; output: %s", result.cmd, |
|
1774 |
result.fail_reason, result.output) |
|
1775 |
|
|
1776 |
return result.stdout |
|
1777 |
|
|
1778 |
|
|
1758 | 1779 |
def WriteSsconfFiles(values): |
1759 | 1780 |
"""Update all ssconf files. |
1760 | 1781 |
|
b/lib/constants.py | ||
---|---|---|
645 | 645 |
|
646 | 646 |
NDS_PARAMETERS = frozenset(NDS_PARAMETER_TYPES.keys()) |
647 | 647 |
|
648 |
# OOB supported commands |
|
649 |
OOB_POWER_ON = "power-on" |
|
650 |
OOB_POWER_OFF = "power-off" |
|
651 |
OOB_POWER_CYCLE = "power-cycle" |
|
652 |
OOB_POWER_STATUS = "power-status" |
|
653 |
OOB_HEALTH = "health" |
|
654 |
|
|
655 |
OOB_COMMANDS = frozenset([OOB_POWER_ON, OOB_POWER_OFF, OOB_POWER_CYCLE, |
|
656 |
OOB_POWER_STATUS, OOB_HEALTH]) |
|
657 |
|
|
648 | 658 |
# Instance Parameters Profile |
649 | 659 |
PP_DEFAULT = "default" |
650 | 660 |
|
Also available in: Unified diff