Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
11
Merge Requests
0
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
b9747820
authored
Jul 09, 2019
by
Bodor Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix falke8 errors
parent
01de9191
Pipeline
#752
failed with stages
in 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
recircle/image/views.py
+1
-1
recircle/instance/views.py
+2
-2
No files found.
recircle/image/views.py
View file @
b9747820
...
@@ -3,13 +3,13 @@ from image.serializers import DiskSerializer
...
@@ -3,13 +3,13 @@ from image.serializers import DiskSerializer
# from django.shortcuts import render
# from django.shortcuts import render
from
rest_framework.views
import
APIView
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
from
rest_framework.response
import
Response
import
openstack
from
interface_openstack.implementation.image.openstack_image_manager
import
(
from
interface_openstack.implementation.image.openstack_image_manager
import
(
OpenstackImageManager
,
OpenstackImageManager
,
)
)
from
django.conf
import
settings
from
django.conf
import
settings
class
DiskList
(
APIView
):
class
DiskList
(
APIView
):
def
get
(
self
,
request
,
format
=
None
):
def
get
(
self
,
request
,
format
=
None
):
# OpenStack
# OpenStack
...
...
recircle/instance/views.py
View file @
b9747820
...
@@ -4,12 +4,12 @@ from django.http import Http404
...
@@ -4,12 +4,12 @@ from django.http import Http404
from
rest_framework.views
import
APIView
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
from
rest_framework.response
import
Response
from
rest_framework
import
status
from
rest_framework
import
status
import
openstack
import
datetime
import
datetime
from
interface_openstack.implementation.vm.instance
import
OSVirtualMachineManager
from
interface_openstack.implementation.vm.instance
import
OSVirtualMachineManager
from
django.conf
import
settings
from
django.conf
import
settings
class
InstanceList
(
APIView
):
class
InstanceList
(
APIView
):
def
get
(
self
,
request
,
format
=
None
):
def
get
(
self
,
request
,
format
=
None
):
instances
=
Instance
.
objects
.
all
()
instances
=
Instance
.
objects
.
all
()
...
@@ -55,7 +55,7 @@ class InstanceDetail(APIView):
...
@@ -55,7 +55,7 @@ class InstanceDetail(APIView):
instance
=
self
.
get_object
(
pk
)
instance
=
self
.
get_object
(
pk
)
instanceDict
=
InstanceSerializer
(
instance
)
.
data
instanceDict
=
InstanceSerializer
(
instance
)
.
data
interface
=
OSVirtualMachineManager
(
conn
)
interface
=
OSVirtualMachineManager
(
setting
.
CONNECTION
)
remoteInstance
=
interface
.
get_vm
(
instance
.
remote_id
)
remoteInstance
=
interface
.
get_vm
(
instance
.
remote_id
)
remoteInstanceDict
=
remoteInstance
.
__dict__
remoteInstanceDict
=
remoteInstance
.
__dict__
...
...
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