Commit 7a8c2ac5 by Bálint Máhonfai

Use the store to upload exported disk

parent 31c9b14a
Pipeline #948 passed with stage
in 0 seconds
...@@ -360,8 +360,18 @@ class ExportDiskOperation(InstanceOperation): ...@@ -360,8 +360,18 @@ class ExportDiskOperation(InstanceOperation):
accept_states = ('STOPPED',) accept_states = ('STOPPED',)
async_queue = 'localhost.man.slow' async_queue = 'localhost.man.slow'
def _operation(self, disk, format): def check_auth(self, user):
disk.export(format) super(ExportDiskOperation, self).check_auth(user)
try:
Store(user)
except NoStoreException:
raise PermissionDenied
def _operation(self, user, disk, format):
store = Store(user)
store.new_folder('/export')
upload_link = store.request_upload('/export')
disk.export(format, upload_link)
@register_operation @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