8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 15:33:45 +00:00

Add ip_type in dhcp api serializer

This commit is contained in:
chapeau 2020-02-04 10:54:17 +00:00 committed by Gabriel Detraz
parent 8c5cfc65ae
commit c863107293

View file

@ -1168,11 +1168,12 @@ class HostMacIpSerializer(serializers.ModelSerializer):
hostname = serializers.CharField(source="domain.name", read_only=True) hostname = serializers.CharField(source="domain.name", read_only=True)
extension = serializers.CharField(source="domain.extension.name", read_only=True) extension = serializers.CharField(source="domain.extension.name", read_only=True)
mac_address = serializers.CharField(read_only=True) mac_address = serializers.CharField(read_only=True)
ip_type = serializers.CharField(source="machine_type.ip_type", read_only=True)
ipv4 = serializers.CharField(source="ipv4.ipv4", read_only=True) ipv4 = serializers.CharField(source="ipv4.ipv4", read_only=True)
class Meta: class Meta:
model = machines.Interface model = machines.Interface
fields = ("hostname", "extension", "mac_address", "ipv4") fields = ("hostname", "extension", "mac_address", "ipv4", "ip_type")
# DNS # DNS