forked from pulp/pulp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '3.0-dev' into temp/20161122135630
- Loading branch information
Showing
49 changed files
with
289 additions
and
253 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from gettext import gettext as _ | ||
|
||
from rest_framework import serializers | ||
|
||
from pulp.app import models | ||
from pulp.app.serializers import ModelSerializer, DetailRelatedField | ||
|
||
|
||
class DownloadCatalogSerializer(ModelSerializer): | ||
url = serializers.CharField( | ||
help_text=_("The URL used to download the related artifact."), | ||
allow_blank=True, read_only=True, | ||
) | ||
|
||
artifact = serializers.HyperlinkedRelatedField( | ||
help_text=_("The artifact that is expected to be present at url"), | ||
queryset=models.Artifact.objects.all(), | ||
view_name="artifact-details" | ||
) | ||
|
||
importer = DetailRelatedField( | ||
help_text=_("The importer that contains the configuration necessary to access url."), | ||
queryset=models.Importer.objects.all(), | ||
view_name="importer-details" | ||
) | ||
|
||
class Meta: | ||
model = models.DownloadCatalog | ||
fields = ModelSerializer.Meta.fields + ("artifact", "importer", "url",) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
from pulp.app.tasks import importer, publisher # 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from celery import shared_task | ||
|
||
from pulp.app import models | ||
from pulp.tasking.tasks import UserFacingTask | ||
|
||
|
||
@shared_task(base=UserFacingTask) | ||
def delete(repo_name, importer_name): | ||
""" | ||
Delete an :class:`~pulp.app.models.Importer` | ||
:param repo_name: the name of a repository | ||
:type repo_name: str | ||
:param importer_name: the name of an importer | ||
:type importer_name: str | ||
""" | ||
models.Importer.objects.filter(name=importer_name, repository__name=repo_name).delete() |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from celery import shared_task | ||
|
||
from pulp.app import models | ||
from pulp.tasking.tasks import UserFacingTask | ||
|
||
|
||
@shared_task(base=UserFacingTask) | ||
def delete(repo_name, publisher_name): | ||
""" | ||
Delete a :class:`~pulp.app.models.Publisher` | ||
:param repo_name: the name of a repository | ||
:type repo_name: str | ||
:param publisher_name: the name of a publisher | ||
:type publisher_name: str | ||
""" | ||
models.Publisher.objects.filter(name=publisher_name, repository__name=repo_name).delete() |
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 |
---|---|---|
|
@@ -5,5 +5,6 @@ pulp.app | |
|
||
fields | ||
models | ||
response | ||
serializers | ||
viewsets |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pulp.app.response | ||
================= | ||
|
||
All response objects documented here should be imported directly from the ``pulp.app.response`` namespace. | ||
|
||
.. automodule:: pulp.app.response |
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
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
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
Oops, something went wrong.