Commit b9747820 by Bodor Máté

Fix falke8 errors

parent 01de9191
Pipeline #752 failed with stages
in 17 seconds
...@@ -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
......
...@@ -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__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment