Merge "Use new image for kitchen tests"
diff --git a/Makefile b/Makefile
index 1043fbe..d166862 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@
all:
@echo "make install - Install into DESTDIR"
+ @echo "make lint - Run lint tests"
@echo "make test - Run tests"
@echo "make kitchen - Run Kitchen CI tests (create, converge, verify)"
@echo "make clean - Cleanup after tests run"
@@ -45,6 +46,9 @@
[ -d $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME) ] || mkdir -p $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
cp -a metadata/service/* $(DESTDIR)/$(RECLASSDIR)/service/$(FORMULANAME)
+lint:
+ [ ! -d tests ] || (cd tests; ./run_tests.sh lint)
+
test:
[ ! -d tests ] || (cd tests; ./run_tests.sh)
@@ -65,7 +69,7 @@
[ ! -f debian/changelog ] || dch -v $(VERSION_MAJOR).$(NEW_MINOR_VERSION) -m --force-distribution -D `dpkg-parsechangelog -S Distribution` "New version"
make genchangelog-$(VERSION_MAJOR).$(NEW_MINOR_VERSION)
(git add -u; git commit -m "Version $(VERSION_MAJOR).$(NEW_MINOR_VERSION)")
- git tag -s -m $(NEW_MAJOR_VERSION) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
+ git tag -s -m $(VERSION_MAJOR).$(NEW_MINOR_VERSION) $(VERSION_MAJOR).$(NEW_MINOR_VERSION)
check-changes:
@git log --pretty=oneline --decorate $(VERSION)..HEAD | grep -Eqc '.*' || (echo "No new changes since version $(VERSION)"; exit 1)
diff --git a/_states/glanceng.py b/_states/glanceng.py
index e245866..bcf4d60 100644
--- a/_states/glanceng.py
+++ b/_states/glanceng.py
@@ -56,7 +56,7 @@
if type(images) is dict and len(images) == 1 and 'images' in images:
images = images['images']
- images_list = images.values() if type(images) is dict else images
+ images_list = list(images.values()) if type(images) is dict else images
if len(images_list) == 0:
return None, 'No image with name "{0}"'.format(name)
diff --git a/glance/client.sls b/glance/client.sls
index 3f45edb..1733e37 100644
--- a/glance/client.sls
+++ b/glance/client.sls
@@ -5,9 +5,9 @@
pkg.installed:
- names: {{ client.pkgs }}
-{%- for identity_name, identity in client.identity.iteritems() %}
+{%- for identity_name, identity in client.identity.items() %}
-{%- for image_name, image in identity.image.iteritems() %}
+{%- for image_name, image in identity.image.items() %}
glance_openstack_image_{{ image_name }}:
glanceng.image_import:
diff --git a/glance/files/_backends/_swift.conf b/glance/files/_backends/_swift.conf
index 2b34391..238b4d4 100644
--- a/glance/files/_backends/_swift.conf
+++ b/glance/files/_backends/_swift.conf
@@ -1,6 +1,6 @@
{%- from "glance/map.jinja" import server with context %}
-{% for reference_key, reference in server.storage.get('swift', {}).get('store', {}).get('references', {}).iteritems() %}
+{% for reference_key, reference in server.storage.get('swift', {}).get('store', {}).get('references', {}).items() %}
[{{ reference_key }}]
# A project_name user_name pair in the project_name:user_name format to authenticate against the Swift authentication service.
user = {{ reference.user }}
diff --git a/glance/server.sls b/glance/server.sls
index b160b7c..4adbb83 100644
--- a/glance/server.sls
+++ b/glance/server.sls
@@ -285,7 +285,7 @@
{%- endfor %}
-{%- for image_name, image in server.get('image', {}).iteritems() %}
+{%- for image_name, image in server.get('image', {}).items() %}
glance_download_{{ image_name }}:
cmd.run:
@@ -321,7 +321,7 @@
- service: glance_services
{%- endif %}
-{%- for name, rule in server.get('policy', {}).iteritems() %}
+{%- for name, rule in server.get('policy', {}).items() %}
{%- if rule != None %}
rule_{{ name }}_present: