This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make an Artifact from a PulpTemporaryUploadedFile
Adds the Artifact.create_and_validate staticmethod that creates an in-memory, unsaved Artifact from a PulpTemporaryUploadedFile. Uploaded files to Pulp show up with that type so that is convenient for plugin writers. Also as the file is received by Django it auto-computes all of the digest types. This PR also moves SizeValidationError and DigestValidation error to pulpcore.exceptions instead of living in pulpcore.plugin.downloads. The ArtifactSerializer is also exposed via the plugin API with this change also. https://pulp.plan.io/issues/4072 closes #4072
- Loading branch information
Brian Bouterse
committed
Oct 9, 2018
1 parent
d65d2d8
commit 50251ae
Showing
7 changed files
with
57 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
from .base import BaseDownloader, DownloadResult # noqa | ||
from .exceptions import (DigestValidationError, DownloaderValidationError, # noqa | ||
SizeValidationError) # noqa | ||
from .factory import DownloaderFactory # noqa | ||
from .file import FileDownloader # noqa | ||
from .http import HttpDownloader # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from .base import PulpException, exception_to_dict, ResourceImmutableError # noqa | ||
from .http import MissingResource # noqa | ||
from .validation import DigestValidationError, SizeValidationError, ValidationError # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters