Project

Profile

Help

Story #7191

closed

As a plugin writer, I want to have an immutable RepositoryViewSet

Added by lmjachky about 2 years ago. Updated about 2 years ago.

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

100%

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

Description

Create a new ViewSet class similar to RepositoryViewSet that will be immutable.

class ImmutableRepositoryViewSet(
    NamedModelViewSet,
    mixins.CreateModelMixin,
    mixins.RetrieveModelMixin,
    mixins.ListModelMixin,
    AsyncRemoveMixin,
):
    """
    A repository ViewSet that does not allow the usage of the methods PATCH and PUT.
    """

    queryset = Repository.objects.all().order_by("name")
    serializer_class = RepositorySerializer
    endpoint_name = "repositories"
    router_lookup = "repository"
    filterset_class = RepositoryFilter

Added by Lubos Mjachky about 2 years ago

Revision 9ba8dfeb

Enable plugin writers to inherit from ImmutableRepositoryViewSet

Required by https://github.com/pulp/pulp_container/pull/127.

closes #7191

Actions #1

Updated by Anonymous about 2 years ago

  • Status changed from NEW to MODIFIED
  • % Done changed from 0 to 100
Actions #2

Updated by dkliban@redhat.com about 2 years ago

  • Sprint/Milestone set to 3.6.0
Actions #3

Updated by pulpbot about 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF