From ccb583b20d731b965a9082b5f6ee6547d545d7df Mon Sep 17 00:00:00 2001 From: modulos Date: Mon, 22 May 2017 13:28:14 +0200 Subject: [PATCH] Add vm-ipv6-nat64-ipv4 network name check --- opennebula_api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index 3d04d61f..622d89f6 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -155,7 +155,7 @@ class VirtualMachineSerializer(serializers.Serializer): def get_ip(self, obj): nic = obj.template.nics[0] - if is_in_v4_range(nic.mac): + if 'vm-ipv6-nat64-ipv4' is in nic.network and is_in_v4_range(nic.mac): return str(v4_from_mac(nic.mac)) else: return '-'