Skip to content
Snippets Groups Projects
Commit f4ab3154 authored by Michal Urban's avatar Michal Urban
Browse files

Merge branch 'develop' of...

Merge branch 'develop' of gitlab.ics.muni.cz:muni-kypo-crp/backend-python/kypo-sandbox-service into develop
parents b58abb6f 337290df
Branches
Tags
No related merge requests found
...@@ -28,17 +28,12 @@ LOG = structlog.get_logger() ...@@ -28,17 +28,12 @@ LOG = structlog.get_logger()
@utils.add_error_responses_doc('get', [401, 403, 500]) @utils.add_error_responses_doc('get', [401, 403, 500])
@utils.add_error_responses_doc('post', [400, 401, 403, 404, 500]) @utils.add_error_responses_doc('post', [400, 401, 403, 404, 500])
class PoolListCreateView(generics.ListCreateAPIView): class PoolListCreateView(generics.ListCreateAPIView):
"""
get: Get a list of pools.
"""
queryset = Pool.objects.all() queryset = Pool.objects.all()
serializer_class = serializers.PoolSerializer serializer_class = serializers.PoolSerializer
def get(self, request, *args, **kwargs):
"""
Get a list of pools.
"""
pools_serialized = self.serializer_class(self.get_queryset(), many=True).data
page = self.paginate_queryset(pools_serialized)
return self.get_paginated_response(page)
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
"""Creates new pool. """Creates new pool.
Also creates a new key-pair and certificate, which is then passed to terraform client. Also creates a new key-pair and certificate, which is then passed to terraform client.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment