merge two definitions of item types
ClosedPublic

Authored by kparal on Feb 16 2017, 9:53 AM.

Details

Summary

As identified in D1119, we had two locations for definining allowed item
types. This merges it into a single location. Type handling might change
again soon, but for this moment this eliminates code duplication.

A few notes:

  • I picked check.ReportType as the single location, because it shows

up in documentation and our code and tasks use that.

  • The new single definition is a superset of both (therefore we now have

more item types documented and easy to use in reporting than we had
before)

  • There was a clash between bodhi_update and bodhi_id, I picked

bodhi_update because that's what our current tasks use.

  • I renamed yum_repository to dnf_repo, because no task currently

uses it, so it seems safe.

Test Plan

Test suite works, local rpmlint execution works

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal retitled this revision from to merge two definitions of item types.Feb 16 2017, 9:53 AM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: libtaskotron, jskladan, mkrizek.
kparal added inline comments.Feb 16 2017, 9:55 AM
libtaskotron/check.py
256–265

If you don't like this, the alternative is to depend on https://pypi.python.org/pypi/enum34 and use a proper enum.

jskladan accepted this revision.Feb 16 2017, 10:02 AM

LGTM, thanks for taking care of this

libtaskotron/check.py
256–265

I'm fine with this. python-enum34 is packaged in Fedora, so that would not be that big of a deal, but I don't really see it as that big of a win here, especially since we might be getting rid of these soon anyway.

This revision is now accepted and ready to land.Feb 16 2017, 10:02 AM
Closed by commit rLTRN8b6a72fea49e: merge two definitions of item types (authored by Kamil Páral <kparal@redhat.com>). · Explain WhyFeb 16 2017, 10:07 AM
This revision was automatically updated to reflect the committed changes.