Merge pull request #23 from bdrung/master

Support Python 3
diff --git a/cinder/client.sls b/cinder/client.sls
index 52b3042..865df36 100644
--- a/cinder/client.sls
+++ b/cinder/client.sls
@@ -21,7 +21,7 @@
                        'endpoint_type': identity.get('endpoint_type', 'internalURL'),
                        'certificate': identity.get('certificate', client.cacert_file)} %}
 
-{%- for backend_name, backend in client.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in client.get('backend', {}).items() %}
 
 cinder_type_create_{{ backend_name }}:
   cinderng.volume_type_present:
@@ -39,7 +39,7 @@
   - require:
     - cinderng: cinder_type_create_{{ backend_name }}
 
-{%- for key_name, key_value in backend.get('key', {}).iteritems() %}
+{%- for key_name, key_value in backend.get('key', {}).items() %}
 
 cinder_type_update_{{ backend_name }}_{{ key_name }}:
   cinderng.volume_type_key_present:
diff --git a/cinder/controller.sls b/cinder/controller.sls
index 60ff151..07772bd 100644
--- a/cinder/controller.sls
+++ b/cinder/controller.sls
@@ -117,7 +117,7 @@
 
 {% endif %}
 
-{%- for name, rule in controller.get('policy', {}).iteritems() %}
+{%- for name, rule in controller.get('policy', {}).items() %}
 
 {%- if rule != None %}
 rule_{{ name }}_present:
@@ -252,7 +252,7 @@
                        'endpoint_type': identity.get('endpoint_type', 'internalURL'),
                        'certificate': identity.get('certificate', controller.cacert_file)} %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- if backend.engine is defined and backend.engine == 'nfs' or (backend.engine == 'netapp' and backend.storage_protocol == 'nfs') %}
 /etc/cinder/nfs_shares_{{ backend_name }}:
diff --git a/cinder/files/juno/cinder.conf.controller.Debian b/cinder/files/juno/cinder.conf.controller.Debian
index d83df84..e5e95ae 100644
--- a/cinder/files/juno/cinder.conf.controller.Debian
+++ b/cinder/files/juno/cinder.conf.controller.Debian
@@ -37,7 +37,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -127,7 +127,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/juno/cinder.conf.volume.Debian b/cinder/files/juno/cinder.conf.volume.Debian
index 9766c2e..9e8508a 100644
--- a/cinder/files/juno/cinder.conf.volume.Debian
+++ b/cinder/files/juno/cinder.conf.volume.Debian
@@ -37,7 +37,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -136,7 +136,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/kilo/cinder.conf.controller.Debian b/cinder/files/kilo/cinder.conf.controller.Debian
index 71902e2..493e3bc 100644
--- a/cinder/files/kilo/cinder.conf.controller.Debian
+++ b/cinder/files/kilo/cinder.conf.controller.Debian
@@ -40,7 +40,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -164,7 +164,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/kilo/cinder.conf.volume.Debian b/cinder/files/kilo/cinder.conf.volume.Debian
index 3c8c720..506cfa3 100644
--- a/cinder/files/kilo/cinder.conf.volume.Debian
+++ b/cinder/files/kilo/cinder.conf.volume.Debian
@@ -39,7 +39,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -173,7 +173,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/liberty/cinder.conf.controller.Debian b/cinder/files/liberty/cinder.conf.controller.Debian
index e263513..39726c0 100644
--- a/cinder/files/liberty/cinder.conf.controller.Debian
+++ b/cinder/files/liberty/cinder.conf.controller.Debian
@@ -53,7 +53,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -184,7 +184,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/liberty/cinder.conf.volume.Debian b/cinder/files/liberty/cinder.conf.volume.Debian
index 98fc66e..72db2bc 100644
--- a/cinder/files/liberty/cinder.conf.volume.Debian
+++ b/cinder/files/liberty/cinder.conf.volume.Debian
@@ -39,7 +39,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- else %}
 
@@ -171,7 +171,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/mitaka/cinder.conf.controller.Debian b/cinder/files/mitaka/cinder.conf.controller.Debian
index 8a66c11..ac07702 100644
--- a/cinder/files/mitaka/cinder.conf.controller.Debian
+++ b/cinder/files/mitaka/cinder.conf.controller.Debian
@@ -47,7 +47,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -182,7 +182,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/mitaka/cinder.conf.volume.Debian b/cinder/files/mitaka/cinder.conf.volume.Debian
index b52aded..6ed1bf4 100644
--- a/cinder/files/mitaka/cinder.conf.volume.Debian
+++ b/cinder/files/mitaka/cinder.conf.volume.Debian
@@ -38,7 +38,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -163,7 +163,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/newton/cinder.conf.controller.Debian b/cinder/files/newton/cinder.conf.controller.Debian
index 6a0a6a2..8410383 100644
--- a/cinder/files/newton/cinder.conf.controller.Debian
+++ b/cinder/files/newton/cinder.conf.controller.Debian
@@ -48,7 +48,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -194,7 +194,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/newton/cinder.conf.volume.Debian b/cinder/files/newton/cinder.conf.volume.Debian
index 88a2944..17b445c 100644
--- a/cinder/files/newton/cinder.conf.volume.Debian
+++ b/cinder/files/newton/cinder.conf.volume.Debian
@@ -45,7 +45,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -179,7 +179,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/ocata/cinder.conf.controller.Debian b/cinder/files/ocata/cinder.conf.controller.Debian
index a36f403..d2dff42 100644
--- a/cinder/files/ocata/cinder.conf.controller.Debian
+++ b/cinder/files/ocata/cinder.conf.controller.Debian
@@ -52,7 +52,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -210,7 +210,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/ocata/cinder.conf.volume.Debian b/cinder/files/ocata/cinder.conf.volume.Debian
index f999860..c4dee4e 100644
--- a/cinder/files/ocata/cinder.conf.volume.Debian
+++ b/cinder/files/ocata/cinder.conf.volume.Debian
@@ -49,7 +49,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -193,7 +193,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/pike/cinder.conf.controller.Debian b/cinder/files/pike/cinder.conf.controller.Debian
index 8bc04ef..528c2a3 100644
--- a/cinder/files/pike/cinder.conf.controller.Debian
+++ b/cinder/files/pike/cinder.conf.controller.Debian
@@ -52,7 +52,7 @@
 
 default_volume_type={{ controller.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in controller.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in controller.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -207,7 +207,7 @@
 
 {%- if controller.backend is defined %}
 
-{%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in controller.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/files/pike/cinder.conf.volume.Debian b/cinder/files/pike/cinder.conf.volume.Debian
index f999860..c4dee4e 100644
--- a/cinder/files/pike/cinder.conf.volume.Debian
+++ b/cinder/files/pike/cinder.conf.volume.Debian
@@ -49,7 +49,7 @@
 
 default_volume_type={{ volume.default_volume_type }}
 
-enabled_backends={% for backend_name, backend in volume.get('backend', {}).iteritems() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
+enabled_backends={% for backend_name, backend in volume.get('backend', {}).items() %}{{ backend_name }}{% if not loop.last %},{% endif %}{% endfor %}
 
 {%- endif %}
 
@@ -193,7 +193,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- set backend_fragment = "cinder/files/backend/_" + backend.engine + ".conf" %}
 {%- include backend_fragment %}
diff --git a/cinder/meta/sphinx.yml b/cinder/meta/sphinx.yml
index f326ee9..bfdf85b 100644
--- a/cinder/meta/sphinx.yml
+++ b/cinder/meta/sphinx.yml
@@ -39,7 +39,7 @@
         {%- if controller.backend is defined %}
         backends:
           value: |
-            {%- for backend_name, backend in controller.get('backend', {}).iteritems() %}
+            {%- for backend_name, backend in controller.get('backend', {}).items() %}
             * {{ backend_name }}:
               * storage engine: {{ backend.engine }}
               * volume type: {{ backend.type_name}}
@@ -80,7 +80,7 @@
         {%- if volume.backend is defined %}
         backends:
           value: |
-            {%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+            {%- for backend_name, backend in volume.get('backend', {}).items() %}
             * {{ backend_name }}:
               * storage engine: {{ backend.engine }}
               * volume type: {{ backend.type_name}}
diff --git a/cinder/volume.sls b/cinder/volume.sls
index 671ba45..ed0a1e7 100644
--- a/cinder/volume.sls
+++ b/cinder/volume.sls
@@ -174,7 +174,7 @@
 
 {%- if volume.backend is defined %}
 
-{%- for backend_name, backend in volume.get('backend', {}).iteritems() %}
+{%- for backend_name, backend in volume.get('backend', {}).items() %}
 
 {%- if backend.get('engine') == 'nfs' or (backend.get('engine') == 'netapp' and backend.get('storage_protocol') == 'nfs') %}
 /etc/cinder/nfs_shares_{{ backend_name }}_for_cinder_volume: