Exemple #1
0
 def add_failed_module(self, module, traceback):
     """
     Updates the progress report that a module failed to be imported.
     """
     self.modules_error_count += 1
     self.modules_individual_errors = self.modules_individual_errors or {}
     error_key = '%s-%s-%s' % (module.name, module.version, module.author)
     self.modules_individual_errors[error_key] = reporting.format_traceback(traceback)
 def _metadata_section(self):
     metadata_report = {
         'state' : self.metadata_state,
         'execution_time' : self.metadata_execution_time,
         'error_message' : self.metadata_error_message,
         'error' : reporting.format_exception(self.metadata_exception),
         'traceback' : reporting.format_traceback(self.metadata_traceback),
         }
     return metadata_report
Exemple #3
0
 def _metadata_section(self):
     metadata_report = {
         'state': self.metadata_state,
         'execution_time': self.metadata_execution_time,
         'error_message': self.metadata_error_message,
         'error': reporting.format_exception(self.metadata_exception),
         'traceback': reporting.format_traceback(self.metadata_traceback),
     }
     return metadata_report
Exemple #4
0
 def add_failed_module(self, module, exception, traceback):
     """
     Updates the progress report that a module failed to be imported.
     """
     self.modules_error_count += 1
     self.modules_individual_errors.append({
         'module': '%s-%s' % (module.name, module.version),
         'author': module.author,
         'exception': reporting.format_exception(exception),
         'traceback': reporting.format_traceback(traceback),
     })
Exemple #5
0
 def add_failed_module(self, module, exception, traceback):
     """
     Updates the progress report that a module failed to be imported.
     """
     self.modules_error_count += 1
     self.modules_individual_errors = self.modules_individual_errors or {}
     error_key = '%s-%s-%s' % (module.name, module.version, module.author)
     self.modules_individual_errors[error_key] = {
         'exception': reporting.format_exception(exception),
         'traceback': reporting.format_traceback(traceback),
     }
    def add_failed_module(self, unit, traceback):
        """
        Updates the progress report that a module failed to be built to the
        repository.

        :param unit: Pulp representation of the module
        :type  unit: pulp.plugins.model.AssociatedUnit
        """
        self.modules_error_count += 1
        self.modules_individual_errors = self.modules_individual_errors or {}
        error_key = '%s-%s-%s' % (unit.unit_key['name'], unit.unit_key['version'], unit.unit_key['author'])
        self.modules_individual_errors[error_key] = reporting.format_traceback(traceback)
Exemple #7
0
 def _metadata_section(self):
     metadata_report = {
         'state' : self.metadata_state,
         'execution_time' : self.metadata_execution_time,
         'current_query' : self.metadata_current_query,
         'query_finished_count' : self.metadata_query_finished_count,
         'query_total_count' : self.metadata_query_total_count,
         'error_message' : self.metadata_error_message,
         'error' : reporting.format_exception(self.metadata_exception),
         'traceback' : reporting.format_traceback(self.metadata_traceback),
     }
     return metadata_report
 def _metadata_section(self):
     metadata_report = {
         'state': self.metadata_state,
         'execution_time': self.metadata_execution_time,
         'current_query': self.metadata_current_query,
         'query_finished_count': self.metadata_query_finished_count,
         'query_total_count': self.metadata_query_total_count,
         'error_message': self.metadata_error_message,
         'error': reporting.format_exception(self.metadata_exception),
         'traceback': reporting.format_traceback(self.metadata_traceback),
     }
     return metadata_report
 def _modules_section(self):
     modules_report = {
         'state': self.modules_state,
         'execution_time': self.modules_execution_time,
         'total_count': self.modules_total_count,
         'finished_count': self.modules_finished_count,
         'error_count': self.modules_error_count,
         'individual_errors': self.modules_individual_errors,
         'error_message': self.modules_error_message,
         'error': reporting.format_exception(self.modules_exception),
         'traceback': reporting.format_traceback(self.modules_traceback),
     }
     return modules_report
Exemple #10
0
 def _modules_section(self):
     modules_report = {
         'state' : self.modules_state,
         'execution_time' : self.modules_execution_time,
         'total_count' : self.modules_total_count,
         'finished_count' : self.modules_finished_count,
         'error_count' : self.modules_error_count,
         'individual_errors' : self.modules_individual_errors,
         'error_message' : self.modules_error_message,
         'error' : reporting.format_exception(self.modules_exception),
         'traceback' : reporting.format_traceback(self.modules_traceback),
     }
     return modules_report
Exemple #11
0
    def add_failed_module(self, unit, traceback):
        """
        Updates the progress report that a module failed to be built to the
        repository.

        :param unit: puppet module
        :type  unit: pulp_puppet.plugins.db.models.Module
        :param traceback: the traceback associated with the module failure
        :type traceback: traceback
        """
        self.modules_error_count += 1
        self.modules_individual_errors = self.modules_individual_errors or {}
        error_key = '%s-%s-%s' % (unit.name, unit.version, unit.author)
        self.modules_individual_errors[error_key] = reporting.format_traceback(traceback)
Exemple #12
0
 def add_failed_module(self, module, exception, traceback):
     """
     Updates the progress report that a module failed to be imported.
     """
     self.modules_error_count += 1
     self.modules_individual_errors.append({
         'module':
         '%s-%s' % (module.name, module.version),
         'author':
         module.author,
         'exception':
         reporting.format_exception(exception),
         'traceback':
         reporting.format_traceback(traceback),
     })
Exemple #13
0
    def add_failed_module(self, unit, traceback):
        """
        Updates the progress report that a module failed to be built to the
        repository.

        :param unit: Pulp representation of the module
        :type  unit: pulp.plugins.model.AssociatedUnit
        """
        self.modules_error_count += 1
        self.modules_individual_errors = self.modules_individual_errors or {}
        error_key = '%s-%s-%s' % (unit.unit_key['name'],
                                  unit.unit_key['version'],
                                  unit.unit_key['author'])
        self.modules_individual_errors[error_key] = reporting.format_traceback(
            traceback)
    def _metadata_section(self):
        """
        Builds the "metadata" section of the progress report.

        :return: The "metadata" section of the progress report.
        :rtype: dict
        """
        metadata_report = {
            'state': self.metadata_state,
            'execution_time': self.metadata_execution_time,
            'error_message': self.metadata_error_message,
            'error': reporting.format_exception(self.metadata_exception),
            'traceback': reporting.format_traceback(self.metadata_traceback),
        }
        return metadata_report
    def add_failed_module(self, unit, traceback):
        """
        Updates the progress report that a module failed to be built to the
        repository.

        :param unit: puppet module
        :type  unit: pulp_puppet.plugins.db.models.Module
        :param traceback: the traceback associated with the module failure
        :type traceback: traceback
        """
        self.modules_error_count += 1
        self.modules_individual_errors = self.modules_individual_errors or {}
        error_key = '%s-%s-%s' % (unit.name, unit.version, unit.author)
        self.modules_individual_errors[error_key] = reporting.format_traceback(
            traceback)
Exemple #16
0
    def _metadata_section(self):
        """
        Builds the "metadata" section of the progress report.

        :return: The "metadata" section of the progress report.
        :rtype: dict
        """
        metadata_report = {
            'state' : self.metadata_state,
            'execution_time' : self.metadata_execution_time,
            'error_message' : self.metadata_error_message,
            'error' : reporting.format_exception(self.metadata_exception),
            'traceback' : reporting.format_traceback(self.metadata_traceback),
            }
        return metadata_report
Exemple #17
0
    def add_failed_module(self, module, exception, traceback):
        """
        Updates the progress report that a module failed to be imported.

        :param module: The module being processed when the failure occurred
        :type module: pulp_puppet.plugins.db.models.Module
        :param exception: The exception related to the module failure
        :type exception: exception
        :param traceback: The traceback corresponding with the exception
        :type traceback: traceback
        """
        self.modules_error_count += 1
        error_dict = {
            'module': '%s-%s' % (module.name, module.version),
            'author': module.author,
            'exception': reporting.format_exception(exception),
            'traceback': reporting.format_traceback(traceback),
        }
        self.modules_individual_errors.append(error_dict)
Exemple #18
0
    def add_failed_module(self, module, exception, traceback):
        """
        Updates the progress report that a module failed to be imported.

        :param module: The module being processed when the failure occurred
        :type module: pulp_puppet.plugins.db.models.Module
        :param exception: The exception related to the module failure
        :type exception: exception
        :param traceback: The traceback corresponding with the exception
        :type traceback: traceback
        """
        self.modules_error_count += 1
        error_dict = {
            'module': '%s-%s' % (module.name, module.version),
            'author': module.author,
            'exception': reporting.format_exception(exception),
            'traceback': reporting.format_traceback(traceback),
        }
        self.modules_individual_errors.append(error_dict)
Exemple #19
0
    def _modules_section(self):
        """
        Builds the "modules" section of the progress report.

        :return: The "modules" section of the progress report.
        :rtype: dict
        """
        modules_report = {
            'state' : self.modules_state,
            'execution_time' : self.modules_execution_time,
            'total_count' : self.modules_total_count,
            'finished_count' : self.modules_finished_count,
            'error_count' : self.modules_error_count,
            'individual_errors' : self.modules_individual_errors,
            'error_message' : self.modules_error_message,
            'error' : reporting.format_exception(self.modules_exception),
            'traceback' : reporting.format_traceback(self.modules_traceback),
        }
        return modules_report
    def _modules_section(self):
        """
        Builds the "modules" section of the progress report.

        :return: The "modules" section of the progress report.
        :rtype: dict
        """
        modules_report = {
            'state': self.modules_state,
            'execution_time': self.modules_execution_time,
            'total_count': self.modules_total_count,
            'finished_count': self.modules_finished_count,
            'error_count': self.modules_error_count,
            'individual_errors': self.modules_individual_errors,
            'error_message': self.modules_error_message,
            'error': reporting.format_exception(self.modules_exception),
            'traceback': reporting.format_traceback(self.modules_traceback),
        }
        return modules_report