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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
729cb080
authored
Apr 15, 2019
by
edems
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleted unused controller
parent
eeaec84f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
controllers/StoragesController.py
+0
-49
No files found.
controllers/StoragesController.py
deleted
100644 → 0
View file @
eeaec84f
import
json
from
aiohttp
import
web
from
implementation.storage.OpenstackStorageManager
import
OpenstackStorageManager
class
StoragesController
:
storage_manager
=
None
@staticmethod
def
init
(
app
,
os
):
StoragesController
.
storage_manager
=
OpenstackStorageManager
(
os
)
StoragesController
.
add_routes
(
app
)
@staticmethod
def
add_routes
(
app
):
app
.
add_routes
([
web
.
get
(
'/storages'
,
StoragesController
.
list
),
web
.
post
(
'/storages/create'
,
StoragesController
.
create
),
web
.
get
(
'/storages/{volume}'
,
StoragesController
.
show
),
web
.
delete
(
'/storages/{storage}/delete'
,
StoragesController
.
delete
)
])
@staticmethod
async
def
create
(
request
):
return
web
.
Response
(
text
=
'Create'
)
@staticmethod
async
def
list
(
request
):
volumes
=
StoragesController
.
storage_manager
.
list
()
return
web
.
Response
(
text
=
json
.
dumps
(
volumes
[
0
]))
@staticmethod
async
def
show
(
request
):
id
=
request
.
match_info
.
get
(
'volume'
)
volume
=
StoragesController
.
storage_manager
.
get
(
id
)
response
=
json
.
dumps
(
volume
)
return
web
.
Response
(
text
=
response
)
@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