more debugging info
diff --git a/xos/openstack_observer/steps/sync_images.py b/xos/openstack_observer/steps/sync_images.py
index 94cfd99..5133b7a 100644
--- a/xos/openstack_observer/steps/sync_images.py
+++ b/xos/openstack_observer/steps/sync_images.py
@@ -4,6 +4,9 @@
from xos.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.image import Image
+from util.logger import Logger, logging
+
+logger = Logger(level=logging.INFO)
class SyncImages(OpenStackSyncStep):
provides=[Image]
@@ -14,11 +17,14 @@
# Images come from the back end
# You can't delete them
if (deleted):
+ logger.info("SyncImages: returning because deleted=True")
return []
# get list of images on disk
images_path = Config().observer_images_directory
+ logger.info("SyncImages: deleted=False, images_path=%s" % images_path)
+
available_images = {}
if os.path.exists(images_path):
for f in os.listdir(images_path):
@@ -26,6 +32,8 @@
if os.path.isfile(filename):
available_images[f] = filename
+ logger.info("SyncImages: available_images = %s" % str(available_images))
+
images = Image.objects.all()
image_names = [image.name for image in images]
@@ -33,6 +41,7 @@
#remove file extension
clean_name = ".".join(image_name.split('.')[:-1])
if clean_name not in image_names:
+ logger.info("SyncImages: adding %s" % clean_name)
image = Image(name=clean_name,
disk_format='raw',
container_format='bare',