Merge "add config_drive_format option to nova_compute"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user