Renamed ImageDeployment back to ImageDeployments
diff --git a/planetstack/openstack_observer/steps/__init__.py b/planetstack/openstack_observer/steps/__init__.py
index 74f38b7..0151af3 100644
--- a/planetstack/openstack_observer/steps/__init__.py
+++ b/planetstack/openstack_observer/steps/__init__.py
@@ -12,5 +12,5 @@
#from .sync_roles import SyncRoles
#from .sync_nodes import SyncNodes
#from .sync_images import SyncImages
-#from .sync_image_deployments import SyncImageDeployment
+#from .sync_image_deployments import SyncImageDeployments
#from .garbage_collector import GarbageCollector
diff --git a/planetstack/openstack_observer/steps/sync_image_deployments.py b/planetstack/openstack_observer/steps/sync_image_deployments.py
index 4bdad87..20c22a2 100644
--- a/planetstack/openstack_observer/steps/sync_image_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_image_deployments.py
@@ -5,24 +5,24 @@
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models import Deployment
-from core.models import Image, ImageDeployment
+from core.models import Image, ImageDeployments
from util.logger import Logger, logging
logger = Logger(level=logging.INFO)
-class SyncImageDeployment(OpenStackSyncStep):
- provides=[ImageDeployment]
+class SyncImageDeployments(OpenStackSyncStep):
+ provides=[ImageDeployments]
requested_interval=0
def fetch_pending(self, deleted):
if (deleted):
return []
- # smbaker: commented out automatic creation of ImageDeployment as
+ # smbaker: commented out automatic creation of ImageDeployments as
# as they will now be configured in GUI. Not sure if this is
# sufficient.
# # ensure images are available across all deployments
-# image_deployments = ImageDeployment.objects.all()
+# image_deployments = ImageDeployments.objects.all()
# image_deploy_lookup = defaultdict(list)
# for image_deployment in image_deployments:
# image_deploy_lookup[image_deployment.image].append(image_deployment.deployment)
@@ -33,11 +33,11 @@
# for expected_deployment in expected_deployments:
# if image not in image_deploy_lookup or \
# expected_deployment not in image_deploy_lookup[image]:
-# id = ImageDeployment(image=image, deployment=expected_deployment)
+# id = ImageDeployments(image=image, deployment=expected_deployment)
# id.save()
# now we return all images that need to be enacted
- return ImageDeployment.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
+ return ImageDeployments.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
def sync_record(self, image_deployment):
logger.info("Working on image %s on deployment %s" % (image_deployment.image.name, image_deployment.deployment.name))