8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Docstrings adaptées views

This commit is contained in:
Gabriel Detraz 2018-11-15 15:47:15 +01:00 committed by root
parent 00fb5edce1
commit dd9090a14b

View file

@ -541,8 +541,8 @@ class ServiceRegenViewSet(viewsets.ModelViewSet):
# Config des switches # Config des switches
class SwitchPortView(generics.ListAPIView): class SwitchPortView(generics.ListAPIView):
"""Exposes the associations between hostname, mac address and IPv4 in """Output each port of a switch, to be serialized with
order to build the DHCP lease files. 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") 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 # Rappel fin adhésion
class ReminderView(generics.ListAPIView): class ReminderView(generics.ListAPIView):
"""Exposes the associations between hostname, mac address and IPv4 in """Output for users to remind an end of their subscription.
order to build the DHCP lease files.
""" """
queryset = preferences.Reminder.objects.all() queryset = preferences.Reminder.objects.all()
serializer_class = serializers.ReminderSerializer serializer_class = serializers.ReminderSerializer
class RoleView(generics.ListAPIView): class RoleView(generics.ListAPIView):
"""Exposes the associations between hostname, mac address and IPv4 in """Output of roles for each server
order to build the DHCP lease files.
""" """
queryset = machines.Role.objects.all().prefetch_related('servers') queryset = machines.Role.objects.all().prefetch_related('servers')
serializer_class = serializers.RoleSerializer serializer_class = serializers.RoleSerializer