Merge remote-tracking branch 'target/master'
diff --git a/README.rst b/README.rst
index db620b6..5b601e4 100644
--- a/README.rst
+++ b/README.rst
@@ -459,6 +459,21 @@
       workaround:
         disable_libvirt_livesnapshot: False
 
+Config drive options
+--------------------
+
+See example below on how to configure the options for the config drive.
+
+.. code-block:: yaml
+
+  nova:
+    compute:
+      config_drive:
+        forced: True  # Default: True
+        cdrom: True  # Default: False
+        format: iso9660  # Default: vfat
+        inject_password: False  # Default: False
+
 
 Documentation and Bugs
 ======================
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index 94b8f18..ba31a2e 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -11,8 +11,10 @@
 compute_manager=nova.compute.manager.ComputeManager
 network_device_mtu=65000
 use_neutron = True
-config_drive_format=vfat
-force_config_drive=True
+config_drive_format={{ compute.get('config_drive_format', compute.get('config_drive', {}).get('format', 'vfat')) }}
+config_drive_cdrom={{ compute.get('config_drive', {}).get('cdrom', False)|lower }}
+force_config_drive={{ compute.get('config_drive', {}).get('forced', True)|lower }}
+config_drive_inject_password={{ compute.get('config_drive', {}).get('inject_password', False)|lower }}
 security_group_api=neutron
 vif_plugging_is_fatal=True
 vif_plugging_timeout=300
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 464e346..30667de 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -11,8 +11,10 @@
 compute_manager=nova.compute.manager.ComputeManager
 network_device_mtu=65000
 use_neutron = True
-config_drive_format={{ compute.get('config_drive_format', 'vfat') }}
-force_config_drive=True
+config_drive_format={{ compute.get('config_drive_format', compute.get('config_drive', {}).get('format', 'vfat')) }}
+config_drive_cdrom={{ compute.get('config_drive', {}).get('cdrom', False)|lower }}
+force_config_drive={{ compute.get('config_drive', {}).get('forced', True)|lower }}
+config_drive_inject_password={{ compute.get('config_drive', {}).get('inject_password', False)|lower }}
 force_raw_images=True
 notify_api_faults=False
 security_group_api=neutron
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 08e7d77..ae358f6 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -1258,7 +1258,7 @@
 #  (string value)
 # Allowed values: iso9660, vfat
 #config_drive_format=iso9660
-config_drive_format={{ compute.get('config_drive_format', 'vfat') }}
+config_drive_format={{ compute.get('config_drive_format', compute.get('config_drive', {}).get('format', 'vfat')) }}
 
 #
 # Force injection to take place on a config drive
@@ -1286,7 +1286,7 @@
 #   installation.
 #  (boolean value)
 #force_config_drive=false
-force_config_drive=true
+force_config_drive={{ compute.get('config_drive', {}).get('forced', True)|lower }}
 
 #
 # Name or path of the tool used for ISO image creation
@@ -5347,6 +5347,7 @@
 #   drive by setting the force_config_drive option to 'True'.
 #  (boolean value)
 #config_drive_cdrom=false
+config_drive_cdrom={{ compute.get('config_drive', {}).get('cdrom', False)|lower }}
 
 #
 # Configuration drive inject password
@@ -5360,6 +5361,7 @@
 # * Currently, the only accepted config_drive_format is 'iso9660'.
 #  (boolean value)
 #config_drive_inject_password=false
+config_drive_inject_password={{ compute.get('config_drive', {}).get('inject_password', False)|lower }}
 
 #
 # Volume attach retry count
@@ -10521,6 +10523,9 @@
 # Time in secs to wait for a block device to be created (integer value)
 # Minimum value: 1
 #block_device_creation_timeout=10
+{%- if compute.block_device_creation_timeout is defined %}
+block_device_creation_timeout = {{ compute.block_device_creation_timeout }}
+{%- endif  %}
 
 #
 # Maximum size in bytes of kernel or ramdisk images.
diff --git a/nova/files/ocata/nova-controller.conf.Debian b/nova/files/ocata/nova-controller.conf.Debian
index b002bfa..64cc4b8 100644
--- a/nova/files/ocata/nova-controller.conf.Debian
+++ b/nova/files/ocata/nova-controller.conf.Debian
@@ -10527,6 +10527,9 @@
 # Time in secs to wait for a block device to be created (integer value)
 # Minimum value: 1
 #block_device_creation_timeout=10
+{%- if controller.block_device_creation_timeout is defined %}
+block_device_creation_timeout = {{ controller.block_device_creation_timeout }}
+{%- endif  %}
 
 #
 # Maximum size in bytes of kernel or ramdisk images.
diff --git a/tests/pillar/compute_single_config_drive_options.sls b/tests/pillar/compute_single_config_drive_options.sls
new file mode 100644
index 0000000..a181f8b
--- /dev/null
+++ b/tests/pillar/compute_single_config_drive_options.sls
@@ -0,0 +1,54 @@
+nova:
+  compute:
+    version: mitaka
+    enabled: true
+    virtualization: kvm
+    heal_instance_info_cache_interval: 60
+    vncproxy_url: openstack:6080
+    vnc_keymap: en-gb
+    resume_guests_state_on_host_boot: False
+    bind:
+      vnc_address: 127.0.0.1
+      vnc_port: 6080
+      vnc_name: 0.0.0.0
+    database:
+      engine: mysql
+      host: 127.0.0.1
+      port: 3306
+      name: nova
+      user: nova
+      password: password
+    identity:
+      engine: keystone
+      region: RegionOne
+      host: 127.0.0.1
+      port: 35357
+      user: nova
+      password: password
+      tenant: service
+    message_queue:
+      engine: rabbitmq
+      host: 127.0.0.1
+      port: 5672
+      user: openstack
+      password: password
+      virtual_host: '/openstack'
+    image:
+      engine: glance
+      host: 127.0.0.1
+      port: 9292
+    network:
+      engine: neutron
+      region: RegionOne
+      host: 127.0.0.1
+      port: 9696
+      password: password
+    cache:
+      engine: memcached
+      members:
+      - host: 127.0.0.1
+        port: 11211
+    config_drive:
+      cdrom: True
+      format: iso9660
+      inject_password: True
\ No newline at end of file