Project

Profile

Help

Task #1751

closed

Unify our checksum type field in our models

Added by jcline@redhat.com about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

I noticed we have several varieties of checksum type fields in our various models. There is a `checksum_algorithm` field in the platform's LazyCatalogEntry model that uses the following regex to validate the field: `ALG_REGEX = r'(md5|sha1|sha224|sha256|sha384|sha512)'`. However, in the pulp_rpm plugin, all the RPM-related models use a special `ChecksumTypeStringField` which uses a function to sanitize the input. It seems to match a subset of the LazyCatalogEntry field.

We should have a single field type (in platform) that every model uses.

Also available in: Atom PDF