Commit e6d6cc46 by Máhonfai Bálint

Rename store api disk export to SSH upload

parent 79c73c50
......@@ -127,13 +127,13 @@ class Store(object):
r = self._request_cmd("UPLOAD", PATH=path)
return r.json()['LINK']
def request_disk_export(self):
r = self._request_cmd("EXPORT_DISK")
def request_ssh_upload(self):
r = self._request_cmd("SSH_UPLOAD")
return r.json()['LINK'], r.json()['PORT']
def disk_export_finished(self, file_name, new_name):
def ssh_upload_finished(self, file_name, new_name):
self._request_cmd(
"EXPORT_DISK_FINISHED",
"SSH_UPLOAD_FINISHED",
FILENAME=file_name,
NEWNAME=new_name
)
......
......@@ -390,9 +390,9 @@ class ExportDiskOperation(InstanceOperation):
def _operation(self, user, disk, exported_name, disk_format, task):
store = Store(user)
upload_link, port = store.request_disk_export()
upload_link, port = store.request_ssh_upload()
file_name = disk.export(disk_format, upload_link, port, task)
store.disk_export_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