CORD-1010 refactor openstack synchronizer to use new_base

Change-Id: I4eb4e5131275faf69e1da05efc81a3d8d0d12296
diff --git a/xos/synchronizer/steps/sync_controller_sites.py b/xos/synchronizer/steps/sync_controller_sites.py
index 1a1ce41..ba489aa 100644
--- a/xos/synchronizer/steps/sync_controller_sites.py
+++ b/xos/synchronizer/steps/sync_controller_sites.py
@@ -1,13 +1,12 @@
 import os
 import base64
-from django.db.models import F, Q
 from xos.config import Config
 from synchronizers.openstack.openstacksyncstep import OpenStackSyncStep
-from core.models.site import *
-from synchronizers.base.syncstep import *
-from synchronizers.base.ansible_helper import *
+from synchronizers.new_base.syncstep import *
+from synchronizers.new_base.ansible_helper import *
 from xos.logger import observer_logger as logger
 import json
+from synchronizers.new_base.modelaccessor import *
 
 class SyncControllerSites(OpenStackSyncStep):
     requested_interval=0
@@ -16,7 +15,12 @@
     playbook = 'sync_controller_sites.yaml'
 
     def fetch_pending(self, deleted=False):
-        lobjs = ControllerSite.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False),Q(controller__isnull=False))
+        lobjs = super(SyncControllerSites, self).fetch_pending(deleted)
+
+        if not deleted:
+            # filter out objects with null controllers
+            lobjs = [x for x in lobjs if x.controller]
+
         return lobjs
 
     def map_sync_inputs(self, controller_site):