Commit 79c73c50 by Máhonfai Bálint

Modify VM disk export operation to use the new store requests

parent 1d6d678a
Pipeline #1397 passed with stage
in 0 seconds
......@@ -377,7 +377,6 @@ class ExportDiskOperation(InstanceOperation):
name = _('export disk')
description = _('Export disk to the selected format.')
abortable = True
has_percentage = True
required_perms = ('storage.export_disk',)
accept_states = ('STOPPED',)
async_queue = 'localhost.man.slow'
......@@ -391,8 +390,9 @@ class ExportDiskOperation(InstanceOperation):
def _operation(self, user, disk, exported_name, disk_format, task):
store = Store(user)
upload_link = store.request_upload('/')
disk.export(exported_name, disk_format, upload_link, task)
upload_link, port = store.request_disk_export()
file_name = disk.export(disk_format, upload_link, port, task)
store.disk_export_finished(file_name, exported_name + '.' + disk_format)
@register_operation
......
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