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
e6d6cc46
authored
Feb 25, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename store api disk export to SSH upload
parent
79c73c50
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
circle/dashboard/store_api.py
+4
-4
circle/vm/operations.py
+2
-2
No files found.
circle/dashboard/store_api.py
View file @
e6d6cc46
...
...
@@ -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
)
...
...
circle/vm/operations.py
View file @
e6d6cc46
...
...
@@ -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
...
...
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