Commit 8bf391bc by Máhonfai Bálint

Move path parameter to SSH upload finished

parent 9d16ea61
......@@ -131,14 +131,15 @@ class Store(object):
r = self._request_cmd("SSH_DOWNLOAD", PATH=path)
return r.json()['LINK'], r.json()['PORT']
def request_ssh_upload(self, path):
r = self._request_cmd("SSH_UPLOAD", PATH=path)
def request_ssh_upload(self):
r = self._request_cmd("SSH_UPLOAD")
return r.json()['LINK'], r.json()['PORT']
def ssh_upload_finished(self, file_name, new_name):
def ssh_upload_finished(self, uploaded_name, path, new_name):
self._request_cmd(
"SSH_UPLOAD_FINISHED",
FILENAME=file_name,
FILENAME=uploaded_name,
PATH=path,
NEWNAME=new_name
)
......
......@@ -389,9 +389,9 @@ class ExportDiskOperation(InstanceOperation):
def _operation(self, user, disk, exported_name, disk_format, task):
store = Store(user)
upload_link, port = store.request_ssh_upload('/')
upload_link, port = store.request_ssh_upload()
file_name = disk.export(disk_format, upload_link, port, task)
store.ssh_upload_finished(file_name, exported_name + '.' + disk_format)
store.ssh_upload_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