def _process_response(self, response): report = response_to_report_item(response) if report is None: self._online_target_list.append(response.request.target) return if not response.was_connected: report = (reports.omitting_node(response.request.target.label) if self._ignore_offline_targets else response_to_report_item( response, forceable=report_codes.SKIP_OFFLINE_NODES)) self._report(report)
def is_node_online(node): try: nodes_task.node_check_auth(lib_env.node_communicator(), node) online_node_list.append(node) except NodeConnectionException as e: if ignore_offline_nodes: to_raise.append(reports.omitting_node(node.label)) else: to_raise.append( node_communicator_exception_to_report_item( e, Severities.ERROR, report_codes.SKIP_OFFLINE_NODES)) except NodeCommunicationException as e: to_raise.append(node_communicator_exception_to_report_item(e))
def is_node_online(node): try: nodes_task.node_check_auth(lib_env.node_communicator(), node) online_node_list.append(node) except NodeConnectionException as e: if ignore_offline_nodes: to_raise.append(reports.omitting_node(node.label)) else: to_raise.append(node_communicator_exception_to_report_item( e, Severities.ERROR, report_codes.SKIP_OFFLINE_NODES )) except NodeCommunicationException as e: to_raise.append(node_communicator_exception_to_report_item(e))
def _process_response(self, response): report = response_to_report_item(response) if report is None: self._online_target_list.append(response.request.target) return if not response.was_connected: report = ( reports.omitting_node(response.request.target.label) if self._ignore_offline_targets else response_to_report_item( response, forceable=report_codes.SKIP_OFFLINE_NODES ) ) self._report(report)