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
efad160b
authored
Feb 24, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new requests to store api for SSH disk export
parent
b7436aa6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
circle/dashboard/store_api.py
+12
-1
No files found.
circle/dashboard/store_api.py
View file @
efad160b
...
@@ -47,7 +47,7 @@ class NoStoreException(StoreApiException):
...
@@ -47,7 +47,7 @@ class NoStoreException(StoreApiException):
class
Store
(
object
):
class
Store
(
object
):
def
__init__
(
self
,
user
,
default_timeout
=
0.
5
):
def
__init__
(
self
,
user
,
default_timeout
=
5
):
self
.
store_url
=
settings
.
STORE_URL
self
.
store_url
=
settings
.
STORE_URL
if
not
self
.
store_url
:
if
not
self
.
store_url
:
raise
NoStoreException
raise
NoStoreException
...
@@ -127,6 +127,17 @@ class Store(object):
...
@@ -127,6 +127,17 @@ class Store(object):
r
=
self
.
_request_cmd
(
"UPLOAD"
,
PATH
=
path
)
r
=
self
.
_request_cmd
(
"UPLOAD"
,
PATH
=
path
)
return
r
.
json
()[
'LINK'
]
return
r
.
json
()[
'LINK'
]
def
request_disk_export
(
self
):
r
=
self
.
_request_cmd
(
"EXPORT_DISK"
)
return
r
.
json
()[
'LINK'
],
r
.
json
()[
'PORT'
]
def
disk_export_finished
(
self
,
file_name
,
new_name
):
self
.
_request_cmd
(
"EXPORT_DISK_FINISHED"
,
FILENAME
=
file_name
,
NEWNAME
=
new_name
)
def
remove
(
self
,
path
):
def
remove
(
self
,
path
):
self
.
_request_cmd
(
"REMOVE"
,
PATH
=
path
)
self
.
_request_cmd
(
"REMOVE"
,
PATH
=
path
)
...
...
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