def set_message(cmd_runner, device, node_name, message): """ Set message of specified type 'message' on SBD device for node. cmd_runner -- CommandRunner device -- string, device path node_name -- string, nae of node for which message should be set message -- string, message type """ dummy_std_out, std_err, ret_val = cmd_runner.run( [settings.sbd_binary, "-d", device, "message", node_name, message]) if ret_val != 0: raise LibraryError( reports.sbd_device_message_error(device, node_name, message, std_err))
def set_message(cmd_runner, device, node_name, message): """ Set message of specified type 'message' on SBD device for node. cmd_runner -- CommandRunner device -- string, device path node_name -- string, nae of node for which message should be set message -- string, message type """ dummy_std_out, std_err, ret_val = cmd_runner.run( [settings.sbd_binary, "-d", device, "message", node_name, message] ) if ret_val != 0: raise LibraryError(reports.sbd_device_message_error( device, node_name, message, std_err ))