removing plural from model names. some cleanup
diff --git a/planetstack/openstack_observer/steps/sync_controller_slices.py b/planetstack/openstack_observer/steps/sync_controller_slices.py
index b1a1f55..24453e3 100644
--- a/planetstack/openstack_observer/steps/sync_controller_slices.py
+++ b/planetstack/openstack_observer/steps/sync_controller_slices.py
@@ -5,22 +5,22 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models.slice import Slice, ControllerSlices
-from core.models.controllerusers import ControllerUsers
+from core.models.slice import Slice, ControllerSlice
+from core.models.controllerusers import ControllerUser
from util.logger import Logger, logging
from observer.ansible import *
logger = Logger(level=logging.INFO)
-class SyncControllerSlices(OpenStackSyncStep):
- provides=[ControllerSlices]
+class SyncControllerSlice(OpenStackSyncStep):
+ provides=[ControllerSlice]
requested_interval=0
def fetch_pending(self, deleted):
if (deleted):
- return ControllerSlices.deleted_objects.all()
+ return ControllerSlice.deleted_objects.all()
else:
- return ControllerSlices.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
+ return ControllerSlice.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
def sync_record(self, controller_slice):
logger.info("sync'ing slice controller %s" % controller_slice)
@@ -29,7 +29,7 @@
logger.info("controller %r has no admin_user, skipping" % controller_slice.controller)
return
- controller_users = ControllerUsers.objects.filter(user=controller_slice.slice.creator,
+ controller_users = ControllerUser.objects.filter(user=controller_slice.slice.creator,
controller=controller_slice.controller)
if not controller_users:
raise Exception("slice createor %s has not accout at controller %s" % (controller_slice.slice.creator, controller_slice.controller.name))