mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
call function with parameter names
This commit is contained in:
parent
5425519408
commit
31c575e852
1 changed files with 18 additions and 18 deletions
|
@ -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 })
|
||||
|
|
Loading…
Reference in a new issue