From dd9090a14b403f8a07620bca4de866e7b60cd224 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Thu, 15 Nov 2018 15:47:15 +0100 Subject: [PATCH] =?UTF-8?q?Docstrings=20adapt=C3=A9es=20views?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api/views.py b/api/views.py index 3d7f4bc2..a2a376e9 100644 --- a/api/views.py +++ b/api/views.py @@ -541,8 +541,8 @@ class ServiceRegenViewSet(viewsets.ModelViewSet): # Config des switches class SwitchPortView(generics.ListAPIView): - """Exposes the associations between hostname, mac address and IPv4 in - order to build the DHCP lease files. + """Output each port of a switch, to be serialized with + additionnal informations (profiles etc) """ queryset = topologie.Switch.objects.all().select_related("switchbay").select_related("model__constructor").prefetch_related("ports__custom_profile__vlan_tagged").prefetch_related("ports__custom_profile__vlan_untagged").prefetch_related("ports__machine_interface__domain__extension").prefetch_related("ports__room") @@ -551,16 +551,14 @@ class SwitchPortView(generics.ListAPIView): # Rappel fin adhésion class ReminderView(generics.ListAPIView): - """Exposes the associations between hostname, mac address and IPv4 in - order to build the DHCP lease files. + """Output for users to remind an end of their subscription. """ queryset = preferences.Reminder.objects.all() serializer_class = serializers.ReminderSerializer class RoleView(generics.ListAPIView): - """Exposes the associations between hostname, mac address and IPv4 in - order to build the DHCP lease files. + """Output of roles for each server """ queryset = machines.Role.objects.all().prefetch_related('servers') serializer_class = serializers.RoleSerializer