fixed configuration name in vm detail

This commit is contained in:
Levi 2017-05-23 11:58:48 -05:00
parent 3d03d00201
commit da3194fee3

View file

@ -151,7 +151,7 @@ class VirtualMachineSerializer(serializers.Serializer):
def get_configuration(self, obj): def get_configuration(self, obj):
template_id = obj.template.template_id template_id = obj.template.template_id
template = OpenNebulaManager().get_template(template_id) template = OpenNebulaManager().get_template(template_id)
return template.name return template.name.strip('public-')
def get_ipv4(self, obj): def get_ipv4(self, obj):
nic = obj.template.nics[0] nic = obj.template.nics[0]