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)