From e32bff648290e14e47c0b1dd57955eaceb8d2add Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Fri, 8 Jan 2021 17:56:05 -0300 Subject: [PATCH] New endpoint - all collection versions unpaginated https://pulp.plan.io/issues/7941 closes #7941 --- CHANGES/7941.feature | 2 ++ pulp_ansible/app/galaxy/v3/views.py | 6 ++++++ pulp_ansible/app/urls.py | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 CHANGES/7941.feature diff --git a/CHANGES/7941.feature b/CHANGES/7941.feature new file mode 100644 index 000000000..688fe8f55 --- /dev/null +++ b/CHANGES/7941.feature @@ -0,0 +1,2 @@ +Introduce a new ``v3/metadata///versions/`` endpoint returning +all collections versions unpaginated diff --git a/pulp_ansible/app/galaxy/v3/views.py b/pulp_ansible/app/galaxy/v3/views.py index 9ade5bae0..33d8642a2 100644 --- a/pulp_ansible/app/galaxy/v3/views.py +++ b/pulp_ansible/app/galaxy/v3/views.py @@ -333,6 +333,12 @@ def list(self, request, *args, **kwargs): return Response(serializer.data) +class UnpaginatedCollectionVersionViewSet(CollectionVersionViewSet): + """Unpaginated ViewSet for CollectionVersions.""" + + pagination_class = None + + class CollectionVersionDocsViewSet( CollectionVersionRetrieveMixin, ExceptionHandlerMixin, diff --git a/pulp_ansible/app/urls.py b/pulp_ansible/app/urls.py index f601e2bad..96e74b01e 100644 --- a/pulp_ansible/app/urls.py +++ b/pulp_ansible/app/urls.py @@ -77,6 +77,11 @@ views_v3.UnpaginatedCollectionViewSet.as_view({"get": "list"}), name="metadata-collection-list", ), + path( + "metadata///versions/", + views_v3.UnpaginatedCollectionVersionViewSet.as_view({"get": "list"}), + name="metadata-collection-versions-list", + ), ] urlpatterns = [