1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 07:35:22 +00:00

call function with parameter names

This commit is contained in:
catborise 2022-09-05 15:35:51 +03:00
parent 5425519408
commit 31c575e852

View file

@ -199,24 +199,24 @@ class CreateInstanceViewSet(viewsets.ViewSet):
firmware["secure"] = "yes"
ret = conn.create_instance(
serializer.validated_data['name'],
serializer.validated_data['memory'],
serializer.validated_data['vcpu'],
serializer.validated_data['vcpu_mode'],
util.randomUUID(),
arch,
machine,
firmware,
volume_list,
serializer.validated_data['networks'],
serializer.validated_data['nwfilter'],
serializer.validated_data['graphics'],
serializer.validated_data['virtio'],
serializer.validated_data['listener_addr'],
serializer.validated_data['video'],
serializer.validated_data['console_pass'],
serializer.validated_data['mac'],
serializer.validated_data['qemu_ga'],
name=serializer.validated_data['name'],
memory=serializer.validated_data['memory'],
vcpu=serializer.validated_data['vcpu'],
vcpu_mode=serializer.validated_data['vcpu_mode'],
uuid=util.randomUUID(),
arch=arch,
machine=machine,
firmware=firmware,
volumes=volume_list,
networks=serializer.validated_data['networks'],
nwfilter=serializer.validated_data['nwfilter'],
graphics=serializer.validated_data['graphics'],
virtio=serializer.validated_data['virtio'],
listener_addr=serializer.validated_data['listener_addr'],
video=serializer.validated_data['video'],
console_pass=serializer.validated_data['console_pass'],
mac=serializer.validated_data['mac'],
qemu_ga=serializer.validated_data['qemu_ga'],
)
msg = f"Instance {serializer.validated_data['name']} is created"
return Response({'status': msg })