Commit 9d513b83 by Kálmán Viktor

vm: fix screenshot

parent d0ad840c
......@@ -2822,8 +2822,7 @@ class InterfaceDeleteView(DeleteView):
def get_vm_screenshot(request, pk):
instance = get_object_or_404(Instance, pk=pk)
image = instance.screenshot(instance=instance,
image = instance.screenshot(user=request.user).getvalue()
# TODO handle this better
raise Http404()
......@@ -949,7 +949,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
return merged_acts
def get_screenshot(self, timeout=5):
queue_name = self.get_remote_queue_name('vm')
queue_name = self.get_remote_queue_name("vm", "fast")
return vm_tasks.screenshot.apply_async(args=[self.vm_name],
......@@ -594,7 +594,7 @@ class ScreenshotOperation(InstanceOperation):
if self.instance.status not in ['RUNNING']:
raise self.instance.WrongStateError(self.instance)
def _operation(self, instance, user):
def _operation(self):
return self.instance.get_screenshot(timeout=20)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment