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
7a8c2ac5
authored
Nov 12, 2019
by
Bálint Máhonfai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the store to upload exported disk
parent
31c9b14a
Pipeline
#948
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
circle/vm/operations.py
+12
-2
No files found.
circle/vm/operations.py
View file @
7a8c2ac5
...
...
@@ -360,8 +360,18 @@ class ExportDiskOperation(InstanceOperation):
accept_states
=
(
'STOPPED'
,)
async_queue
=
'localhost.man.slow'
def
_operation
(
self
,
disk
,
format
):
disk
.
export
(
format
)
def
check_auth
(
self
,
user
):
super
(
ExportDiskOperation
,
self
)
.
check_auth
(
user
)
try
:
Store
(
user
)
except
NoStoreException
:
raise
PermissionDenied
def
_operation
(
self
,
user
,
disk
,
format
):
store
=
Store
(
user
)
store
.
new_folder
(
'/export'
)
upload_link
=
store
.
request_upload
(
'/export'
)
disk
.
export
(
format
,
upload_link
)
@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