def process_cli_view()

in modular_cli/service/decorators.py [0:0]


    def process_cli_view(self, status: str, response_meta: CommandResponse):
        if status == ERROR_STATUS:
            error_type, error_code, message = self.unpack_error_result_values(
                response_meta=response_meta)
            return f'Error:{os.linesep}{message}'
        elif status == SUCCESS_STATUS:
            success_code, warnings, message, items, table_title = \
                self.unpack_success_result_values(response_meta=response_meta)
            if table_title and items:
                return self.process_table_view(status=status,
                                               response_meta=response_meta)
            result_message = f'Response:{os.linesep}{message}'
            if warnings:
                result_message += self._prettify_warnings(warnings)
            return result_message