~zyga/checkbox/cloudbox

« back to all changes in this revision

Viewing changes to plainbox/plainbox/provider_manager.py

  • Committer: Daniel Manrique
  • Author(s): Zygmunt Krynicki
  • Date: 2014-03-31 17:35:08 UTC
  • mfrom: (2843.1.9 launchpad/fix-1297746)
  • Revision ID: daniel_manrique-20140331173508-sd09m5r6qcracqic
"automatic merge by tarmac [r=roadmr][bug=1297746][author=zkrynicki]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
        problem_list = []
625
625
        for job in job_list:
626
626
            try:
627
 
                job.validate()
 
627
                job.validate(strict=True, deprecated=True)
628
628
            except JobValidationError as exc:
629
629
                problem_list.append((job, exc))
630
630
        return problem_list
637
637
            Problem.missing: _("missing definition of required field"),
638
638
            Problem.wrong: _("incorrect value supplied"),
639
639
            Problem.useless: _("useless field in this context"),
 
640
            Problem.deprecated: _("usage of deprecated field"),
640
641
        }
641
642
        for job, error in problem_list:
642
643
            if isinstance(error, JobValidationError):
665
666
        else:
666
667
            print(_("All jobs seem to be valid"))
667
668
 
 
669
    def get_provider(self):
 
670
        """
 
671
        Get a Provider1 that describes the current provider
 
672
 
 
673
        This version disables all validation so that we can see totally broken
 
674
        providers and let us validate them and handle the errors explicitly.
 
675
        """
 
676
        return Provider1.from_definition(
 
677
            # NOTE: don't validate, we want to validate manually
 
678
            self.definition, secure=False, validate=False)
 
679
 
668
680
 
669
681
@docstring(
670
682
    # TRANSLATORS: please leave various options (both long and short forms),