Merge "Rename state to avoid conflicting SLS IDs"
diff --git a/README.rst b/README.rst
index 6d9c848..38b1b7b 100644
--- a/README.rst
+++ b/README.rst
@@ -265,6 +265,7 @@
         - hosts_with_ssd
         security_group: true
         resume_guests_state_on_host_boot: False
+        preallocate_images: space  # Default is 'none'
         my_ip: 10.1.0.16
         bind:
           vnc_address: 172.20.0.100
diff --git a/nova/files/pike/nova-compute.conf.Debian b/nova/files/pike/nova-compute.conf.Debian
index 5427ce6..4c51e6f 100644
--- a/nova/files/pike/nova-compute.conf.Debian
+++ b/nova/files/pike/nova-compute.conf.Debian
@@ -374,6 +374,9 @@
 #  (string value)
 # Allowed values: none, space
 #preallocate_images=none
+{%- if compute.preallocate_images is defined %}
+preallocate_images = {{ compute.preallocate_images }}
+{%- endif %}
 
 #
 # Enable use of copy-on-write (cow) images.
diff --git a/nova/files/queens/nova-compute.conf.Debian b/nova/files/queens/nova-compute.conf.Debian
index bf5f809..599c04d 100644
--- a/nova/files/queens/nova-compute.conf.Debian
+++ b/nova/files/queens/nova-compute.conf.Debian
@@ -376,6 +376,9 @@
 # none - <No description provided>
 # space - <No description provided>
 #preallocate_images = none
+{%- if compute.preallocate_images is defined %}
+preallocate_images = {{ compute.preallocate_images }}
+{%- endif %}
 
 #
 # Enable use of copy-on-write (cow) images.
@@ -4379,7 +4382,7 @@
 # * endpoint_template - Setting this option will override catalog_info
 #  (string value)
 #catalog_info = volumev3:cinderv3:publicURL
-catalog_info = volumev3:cinderv3:publicURL
+catalog_info = volumev3:cinderv3:internalURL
 
 #
 # If this option is set then it will override service catalog lookup
@@ -11101,6 +11104,7 @@
 
 [keystone_authtoken]
 {%- set _data = compute.identity %}
+{%- if 'cacert_file' not in _data.keys() %}{% do _data.update({'cacert_file': compute.cacert_file}) %}{% endif %}
 {%- set auth_type = _data.get('auth_type', 'password') %}
 {%- include "oslo_templates/files/queens/keystonemiddleware/_auth_token.conf" %}
 {%- include "oslo_templates/files/queens/keystoneauth/_type_" + auth_type + ".conf" %}
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 8883c82..b4d3ace 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -698,7 +698,7 @@
 #   the top-level directory for maintaining nova's state. (default) or
 #   Any string representing directory path.
 #  (string value)
-#instances_path = 
+#instances_path =
 
 #
 # This option enables periodic compute.instance.exists notifications.
@@ -4375,7 +4375,7 @@
 # * endpoint_template - Setting this option will override catalog_info
 #  (string value)
 #catalog_info = volumev3:cinderv3:publicURL
-catalog_info = volumev3:cinderv3:publicURL
+catalog_info = volumev3:cinderv3:internalURL
 
 #
 # If this option is set then it will override service catalog lookup
@@ -11007,6 +11007,7 @@
 
 [keystone_authtoken]
 {%- set _data = controller.identity %}
+{%- if 'cacert_file' not in _data.keys() %}{% do _data.update({'cacert_file': controller.cacert_file}) %}{% endif %}
 {%- set auth_type = _data.get('auth_type', 'password') %}
 {%- include "oslo_templates/files/queens/keystonemiddleware/_auth_token.conf" %}
 {%- include "oslo_templates/files/queens/keystoneauth/_type_" + auth_type + ".conf" %}
diff --git a/tests/pillar/compute_cluster.sls b/tests/pillar/compute_cluster.sls
index 28ded0c..4bbcfba 100644
--- a/tests/pillar/compute_cluster.sls
+++ b/tests/pillar/compute_cluster.sls
@@ -13,6 +13,7 @@
     report_interval: 60
     vnc_keymap: en-gb
     resume_guests_state_on_host_boot: True
+    preallocate_images: space
     bind:
       vnc_address: 127.0.0.1
       vnc_port: 6080
diff --git a/tests/pillar/compute_single.sls b/tests/pillar/compute_single.sls
index 08250ba..211a60e 100644
--- a/tests/pillar/compute_single.sls
+++ b/tests/pillar/compute_single.sls
@@ -7,6 +7,7 @@
     vncproxy_url: openstack:6080
     vnc_keymap: en-gb
     resume_guests_state_on_host_boot: False
+    preallocate_images: space
     cpu_mode: custom
     libvirt:
       cpu_model: IvyBridge
diff --git a/tests/pillar/compute_single_config_drive_options.sls b/tests/pillar/compute_single_config_drive_options.sls
index 75840b7..a3c03da 100644
--- a/tests/pillar/compute_single_config_drive_options.sls
+++ b/tests/pillar/compute_single_config_drive_options.sls
@@ -7,6 +7,7 @@
     vncproxy_url: openstack:6080
     vnc_keymap: en-gb
     resume_guests_state_on_host_boot: False
+    preallocate_images: space
     bind:
       vnc_address: 127.0.0.1
       vnc_port: 6080
@@ -60,4 +61,4 @@
     config_drive:
       cdrom: True
       format: iso9660
-      inject_password: True
\ No newline at end of file
+      inject_password: True