From 07c7a64c5a3da4d5a66d496187f9905f8eb6c00c Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 4 Aug 2018 08:46:00 +0200 Subject: [PATCH] Leave 'ipv6only' as a part of the VM name if it starts with it --- opennebula_api/serializers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opennebula_api/serializers.py b/opennebula_api/serializers.py index 79f37ecd..f63f2eb0 100644 --- a/opennebula_api/serializers.py +++ b/opennebula_api/serializers.py @@ -162,7 +162,10 @@ class VirtualMachineSerializer(serializers.Serializer): return '-' def get_name(self, obj): - return obj.name.lstrip('public-') + if obj.name.startswith('public-'): + return obj.name.lstrip('public-') + else: + return obj.name class VMTemplateSerializer(serializers.Serializer):