diff --git a/manifests/compute.pp b/manifests/compute.pp index beea4e8c5..a1901e9e3 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -111,6 +111,10 @@ # "[ { 'vendor_id':'1234','product_id':'5678' }, # { 'vendor_id':'4321','product_id':'8765','physical_network':'default' } ] " # +# [*config_drive_format*] +# (optional) Config drive format. One of iso9660 (default) or vfat +# Defaults to undef +# class nova::compute ( $enabled = true, $manage_service = true, @@ -137,6 +141,7 @@ class nova::compute ( $internal_service_availability_zone = 'internal', $heal_instance_info_cache_interval = '60', $pci_passthrough = undef, + $config_drive_format = undef, ) { include ::nova::params @@ -231,4 +236,10 @@ class nova::compute ( 'DEFAULT/pci_passthrough_whitelist': value => check_array_of_hash($pci_passthrough); } } + + if ($config_drive_format) { + nova_config { + 'DEFAULT/config_drive_format': value => $config_drive_format; + } + } } diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index 01a4d484b..89e0d3bc6 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -59,7 +59,8 @@ describe 'nova::compute' do :default_schedule_zone => 'az2', :internal_service_availability_zone => 'az_int1', :heal_instance_info_cache_interval => '120', - :pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]" + :pci_passthrough => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]", + :config_drive_format => 'vfat' } end @@ -110,6 +111,9 @@ describe 'nova::compute' do 'value' => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"physical_network\":\"physnet1\"}]" ) end + it 'configures nova config_drive_format to vfat' do + is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('vfat') + end end context 'with neutron_enabled set to false' do