Merge "Don't fall when just loading pankov2 modules"
diff --git a/.kitchen.yml b/.kitchen.yml
index 017c521..97bffb8 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -21,6 +21,9 @@
     - name: apache
       repo: git
       source: https://gerrit.mcp.mirantis.com/salt-formulas/apache
+    - name: oslo_templates
+      repo: git
+      source: https://gerrit.mcp.mirantis.com/salt-formulas/oslo-templates
   state_top:
     base:
       "*":
@@ -33,8 +36,6 @@
           - linux_repo_openstack
           - panko
           - release
-  pillars-from-files:
-    linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%= ENV['OS_VERSION'] || 'pike' %>.sls
 
 verifier:
   name: inspec
@@ -56,24 +57,27 @@
       platform: ubuntu
 
 suites:
-
-  - name: server_cluster
+<% for os_version in ['pike','queens','rocky'] %>
+  - name: server_cluster_<%=os_version%>
     provisioner:
       pillars-from-files:
         panko.sls: tests/pillar/server_cluster.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
       pillars:
         release.sls:
           panko:
             server:
-              version: <%= ENV['OS_VERSION'] || 'pike' %>
+              version: <%=os_version%>
 
-  - name: server_single
+  - name: server_single_<%=os_version%>
     provisioner:
       pillars-from-files:
         panko.sls: tests/pillar/server_single.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
       pillars:
         release.sls:
           panko:
             server:
-              version: <%= ENV['OS_VERSION'] || 'pike' %>
+              version: <%=os_version%>
+<% end %>
 # vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/panko/files/rocky/panko.conf.Debian b/panko/files/rocky/panko.conf.Debian
new file mode 100644
index 0000000..15e6078
--- /dev/null
+++ b/panko/files/rocky/panko.conf.Debian
@@ -0,0 +1,91 @@
+{%- from "panko/map.jinja" import server with context -%}
+[DEFAULT]
+
+#
+# From panko
+#
+
+# Configuration file for WSGI definition of API. (string value)
+#api_paste_config = api_paste.ini
+
+{%- if server.logging is defined %}
+{%- set _data = server.logging %}
+{%- include "oslo_templates/files/rocky/oslo/_log.conf" %}
+{%- endif %}
+
+[api]
+
+#
+# From panko
+#
+
+# Default maximum number of items returned by API request. (integer value)
+# Minimum value: 1
+#default_api_return_limit = 100
+
+[cors]
+{%- if server.cors is defined %}
+{%- set _data = server.cors %}
+{%- include "oslo_templates/files/rocky/oslo/_cors.conf" %}
+{%- endif %}
+
+[database]
+
+#
+# From panko
+#
+
+# Number of seconds that events are kept in the database for (<= 0 means
+# forever). (integer value)
+#event_time_to_live = -1
+{%- if server.event_time_to_live is defined %}
+event_time_to_live = {{ server.event_time_to_live }}
+{%- endif %}
+
+# DEPRECATED: The connection string used to connect to the event database -
+# rather use ${database.connection} (string value)
+# This option is deprecated for removal.
+# Its value may be silently ignored in the future.
+#event_connection = <None>
+{%- set _data = server.database %}
+{%- if _data.ssl is defined and 'cacert_file' not in _data.get('ssl', {}).keys() %}{% do _data['ssl'].update({'cacert_file': server.cacert_file}) %}{% endif %}
+{%- include "oslo_templates/files/rocky/oslo/_database.conf" %}
+
+[oslo_middleware]
+{%- set _data = server %}
+{%- include "oslo_templates/files/rocky/oslo/_middleware.conf" %}
+
+[oslo_policy]
+{%- if server.policy is defined %}
+{%- set _data = server.policy %}
+{%- include "oslo_templates/files/rocky/oslo/_policy.conf" %}
+{%- endif %}
+
+[keystone_authtoken]
+{%- set _data = server.identity %}
+{%- if 'cacert_file' not in _data.keys() %}{% do _data.update({'cacert_file': server.cacert_file}) %}{% endif %}
+{%- set auth_type = _data.get('auth_type', 'password') %}
+{%- if server.get('cache',{}).members is defined and 'cache' not in _data.keys() %}
+{% do _data.update({'cache': server.cache}) %}
+{%- endif %}
+{%- include "oslo_templates/files/rocky/keystonemiddleware/_auth_token.conf" %}
+{%- include "oslo_templates/files/rocky/keystoneauth/_type_" + auth_type + ".conf" %}
+
+[storage]
+
+#
+# From panko
+#
+
+# Maximum number of connection retries during startup. Set to -1 to specify an
+# infinite retry count. (integer value)
+#max_retries = 10
+
+# Interval (in seconds) between retries of connection. (integer value)
+#retry_interval = 10
+
+# Enable HTTPS connection in the Elasticsearch connection (boolean value)
+#es_ssl_enabled = false
+
+# The name of the index in Elasticsearch (string value)
+#es_index_name = events
diff --git a/tests/pillar/repo_mcp_openstack_queens.sls b/tests/pillar/repo_mcp_openstack_queens.sls
new file mode 100644
index 0000000..a8c7e77
--- /dev/null
+++ b/tests/pillar/repo_mcp_openstack_queens.sls
@@ -0,0 +1,12 @@
+linux:
+  system:
+    enabled: true
+    repo:
+      mirantis_openstack_repo:
+        source: "deb http://mirror.mirantis.com/nightly/openstack-queens/{{ grains.get('oscodename') }} {{ grains.get('oscodename') }} main"
+        architectures: amd64
+        key_url: "http://mirror.mirantis.com/nightly/openstack-queens/{{ grains.get('oscodename') }}/archive-queens.key"
+        pin:
+        - pin: 'release l=queens'
+          priority: 1050
+          package: '*'
\ No newline at end of file
diff --git a/tests/pillar/repo_mcp_openstack_rocky.sls b/tests/pillar/repo_mcp_openstack_rocky.sls
new file mode 100644
index 0000000..026ac5c
--- /dev/null
+++ b/tests/pillar/repo_mcp_openstack_rocky.sls
@@ -0,0 +1,12 @@
+linux:
+  system:
+    enabled: true
+    repo:
+      mirantis_openstack_repo:
+        source: "deb http://mirror.mirantis.com/nightly/openstack-rocky/{{ grains.get('oscodename') }} {{ grains.get('oscodename') }} main"
+        architectures: amd64
+        key_url: "http://mirror.mirantis.com/nightly/openstack-rocky/{{ grains.get('oscodename') }}/archive-openstack-rocky.key"
+        pin:
+        - pin: 'release l=rocky'
+          priority: 1050
+          package: '*'
\ No newline at end of file