From 6202ddd0fac9f3906a956f1a8618e11c6aeb50a8 Mon Sep 17 00:00:00 2001 From: chirac Date: Sun, 29 Jul 2018 17:21:58 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9plac=C3=A9=20dans=20une=20MR=20ult=C3=A9?= =?UTF-8?q?rieure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/serializers.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/api/serializers.py b/api/serializers.py index cdcf41f7..839a1047 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -623,41 +623,6 @@ class ServiceRegenSerializer(NamespacedHMSerializer): 'api_url': {'view_name': 'serviceregen-detail'} } -# Switches et ports - -class InterfaceVlanSerializer(NamespacedHMSerializer): - domain = serializers.CharField(read_only=True) - ipv4 = serializers.CharField(read_only=True) - ipv6 = Ipv6ListSerializer(read_only=True, many=True) - vlan_id = serializers.IntegerField(source='type.ip_type.vlan.vlan_id', read_only=True) - - class Meta: - model = machines.Interface - fields = ('ipv4', 'ipv6', 'domain', 'vlan_id') - -class InterfaceRoleSerializer(NamespacedHMSerializer): - interface = InterfaceVlanSerializer(source='machine.interface_set', read_only=True, many=True) - - class Meta: - model = machines.Interface - fields = ('interface',) - - -class RoleSerializer(NamespacedHMSerializer): - """Serialize `machines.models.OuverturePort` objects. - """ - servers = InterfaceRoleSerializer(read_only=True, many=True) - - class Meta: - model = machines.Role - fields = ('role_type', 'servers', 'specific_role') - - -class VlanPortSerializer(NamespacedHMSerializer): - class Meta: - model = machines.Vlan - fields = ('vlan_id', 'name') - class ProfilSerializer(NamespacedHMSerializer): vlan_untagged = VlanSerializer(read_only=True)