summaryrefslogtreecommitdiffstats
path: root/dashboard/src/dashboard/tasks.py
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-11-20 11:19:55 -0500
committerParker Berberian <pberberian@iol.unh.edu>2018-11-26 14:07:15 -0500
commitf2bbdbbf7e03be031723a9680aa9deaf80e4a99c (patch)
tree54086b0ae60b65da0905e3b51c922934247b5370 /dashboard/src/dashboard/tasks.py
parent674812a20f6804c287e1355ec8a1adf907798a94 (diff)
Fix all flake8 errors
The flake8 command in test.sh finds no longer finds any errors. This may form a basis of a jenkins verify job as a sort of 'weak compile-time checks' The flake8 command will not complain about line length, and will not complain about django's manage.py file Change-Id: Ic47cb4fc7ada55e64485661ab6881aef475018ff Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/dashboard/tasks.py')
-rw-r--r--dashboard/src/dashboard/tasks.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/dashboard/src/dashboard/tasks.py b/dashboard/src/dashboard/tasks.py
index d4b4189..b1d97b7 100644
--- a/dashboard/src/dashboard/tasks.py
+++ b/dashboard/src/dashboard/tasks.py
@@ -14,7 +14,7 @@ from django.utils import timezone
from django.db.models import Q
from booking.models import Booking
from notifier.manager import NotificationHandler
-from api.models import *
+from api.models import JobStatus, SoftwareRelation, HostHardwareRelation, HostNetworkRelation, AccessRelation
from resource_inventory.resource_manager import ResourceManager
@@ -26,7 +26,7 @@ def booking_poll():
config.clear_delta()
config.set_power("off")
config.save()
- hostrelation.status=JobStatus.NEW
+ hostrelation.status = JobStatus.NEW
hostrelation.save()
def cleanup_network(qs):
@@ -53,7 +53,7 @@ def booking_poll():
interface.config.clear()
network.add_interface(interface)
network.save()
- hostrelation.status=JobStatus.NEW
+ hostrelation.status = JobStatus.NEW
hostrelation.save()
def cleanup_software(qs):
@@ -62,7 +62,7 @@ def booking_poll():
software = relation.config.opnfv
software.clear_delta()
software.save()
- relation.status=JobStatus.NEW
+ relation.status = JobStatus.NEW
relation.save()
def cleanup_access(qs):
@@ -96,11 +96,11 @@ def free_hosts():
hardware = ~Q(~Q(job__hosthardwarerelation__status=200))
bookings = Booking.objects.filter(
- networks,
- hardware,
- end__lt=timezone.now(),
- job__complete=True,
- resource__isnull=False
- )
+ networks,
+ hardware,
+ end__lt=timezone.now(),
+ job__complete=True,
+ resource__isnull=False
+ )
for booking in bookings:
ResourceManager.getInstance().deleteResourceBundle(booking.resource)