Commit 1d6d678a by Máhonfai Bálint

Add port argument to export in disk model for SSH

parent efad160b
...@@ -497,18 +497,17 @@ class Disk(TimeStampedModel): ...@@ -497,18 +497,17 @@ class Disk(TimeStampedModel):
disk.save() disk.save()
return disk return disk
def export(self, exported_name, disk_format, upload_link, task): def export(self, disk_format, upload_link, port, task):
queue_name = self.get_remote_queue_name('storage', priority='slow') queue_name = self.get_remote_queue_name('storage', priority='slow')
remote = storage_tasks.export_disk.apply_async( remote = storage_tasks.export_disk.apply_async(
kwargs={ kwargs={
"disk_desc": self.get_disk_desc(), "disk_desc": self.get_disk_desc(),
"disk_format": disk_format, "disk_format": disk_format,
"exported_name": exported_name,
"upload_link": upload_link, "upload_link": upload_link,
"task": task.request.id "port": port
}, },
queue=queue_name) queue=queue_name)
self._run_abortable_task(remote, task) return self._run_abortable_task(remote, task)
def destroy(self, user=None, task_uuid=None): def destroy(self, user=None, task_uuid=None):
if self.destroyed: if self.destroyed:
......
...@@ -44,7 +44,7 @@ def import_disk(disk_desc, url): ...@@ -44,7 +44,7 @@ def import_disk(disk_desc, url):
@celery.task(name='storagedriver.export_disk') @celery.task(name='storagedriver.export_disk')
def export_disk(disk_desc, format): def export_disk(disk_desc, disk_format, url, port):
pass pass
......
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