Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
interface-openstack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c917ac5f
authored
Apr 02, 2019
by
edems
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StoragesController added
parent
6df75986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
controllers/StoragesController.py
+29
-0
No files found.
controllers/StoragesController.py
0 → 100644
View file @
c917ac5f
from
aiohttp
import
web
class
StoragesController
:
@staticmethod
def
add_routes
(
app
):
app
.
add_routes
([
web
.
get
(
'/storages'
,
StoragesController
.
list
),
web
.
post
(
'/storages/create'
,
StoragesController
.
create
),
web
.
get
(
'/storages/{storage}'
,
StoragesController
.
get
),
web
.
delete
(
'/storages/{storage}/delete'
,
StoragesController
.
delete
)
])
@staticmethod
async
def
create
(
request
):
return
web
.
Response
(
text
=
'Create'
)
@staticmethod
async
def
list
(
request
):
return
web
.
Response
(
text
=
'List'
)
@staticmethod
async
def
get
(
request
):
return
web
.
Response
(
text
=
'Get'
)
@staticmethod
async
def
delete
(
request
):
return
web
.
Response
(
text
=
'Delete'
)
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