def history_get_text(env, node=None): """ Get full fencing history in plain text LibraryEnvironment env string node -- get history for the specified node or all nodes if None """ if not is_fence_history_supported(): raise LibraryError(reports.fence_history_not_supported()) try: return fence_history_text(env.cmd_runner(), node) except FenceHistoryCommandErrorException as e: raise LibraryError(reports.fence_history_command_error(str(e), "show"))
def history_get_text(env, node=None): """ Get full fencing history in plain text LibraryEnvironment env string node -- get history for the specified node or all nodes if None """ if not is_fence_history_supported(): raise LibraryError(reports.fence_history_not_supported()) try: return fence_history_text(env.cmd_runner(), node) except FenceHistoryCommandErrorException as e: raise LibraryError( reports.fence_history_command_error(str(e), "show") )
def history_get_text(env: LibraryEnvironment, node: Optional[str] = None): """ Get full fencing history in plain text env node -- get history for the specified node or all nodes if None """ runner = env.cmd_runner() if not is_fence_history_supported_management(runner): raise LibraryError( ReportItem.error(reports.messages.FenceHistoryNotSupported())) try: return fence_history_text(runner, node) except FenceHistoryCommandErrorException as e: raise LibraryError( ReportItem.error( reports.messages.FenceHistoryCommandError(str(e), "show")))