Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1d6d678a
authored
Feb 24, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add port argument to export in disk model for SSH
parent
efad160b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
circle/storage/models.py
+3
-4
circle/storage/tasks/storage_tasks.py
+1
-1
No files found.
circle/storage/models.py
View file @
1d6d678a
...
@@ -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
:
...
...
circle/storage/tasks/storage_tasks.py
View file @
1d6d678a
...
@@ -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
,
forma
t
):
def
export_disk
(
disk_desc
,
disk_format
,
url
,
por
t
):
pass
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment