Add support for [scenario] img_disk_format

... so that users can use image formats different from the default one
(qcow2).

Change-Id: I919054cf9b8fd3064d8dfdc727f88ba16aa2fd6b
This commit is contained in:
Takashi Kajinami
2022-06-06 18:15:32 +09:00
parent 255847d288
commit a9398a5489
3 changed files with 9 additions and 0 deletions

View File

@@ -193,6 +193,8 @@
# Defaults to 'v3' # Defaults to 'v3'
# [*img_file*] # [*img_file*]
# Defaults to '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img' # Defaults to '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img'
# [*img_disk_format*]
# Defaults to $::os_service_default
# [*login_url*] # [*login_url*]
# Defaults to undef # Defaults to undef
# [*dashboard_url*] # [*dashboard_url*]
@@ -375,6 +377,7 @@ class tempest(
$manage_tests_packages = false, $manage_tests_packages = false,
# scenario options # scenario options
$img_file = '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img', $img_file = '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img',
$img_disk_format = $::os_service_default,
# designate options # designate options
$designate_nameservers = undef, $designate_nameservers = undef,
# ironic options # ironic options
@@ -586,6 +589,7 @@ class tempest(
'whitebox/db_uri': value => $whitebox_db_uri; 'whitebox/db_uri': value => $whitebox_db_uri;
'cli/cli_dir': value => $cli_dir; 'cli/cli_dir': value => $cli_dir;
'scenario/img_file': value => $img_file; 'scenario/img_file': value => $img_file;
'scenario/img_disk_format': value => $img_disk_format;
'service_broker/run_service_broker_tests': value => $run_service_broker_tests; 'service_broker/run_service_broker_tests': value => $run_service_broker_tests;
'dns/nameservers': value => $designate_nameservers; 'dns/nameservers': value => $designate_nameservers;
'compute-feature-enabled/attach_encrypted_volume': value => $attach_encrypted_volume; 'compute-feature-enabled/attach_encrypted_volume': value => $attach_encrypted_volume;

View File

@@ -0,0 +1,4 @@
---
features:
- |
The new ``tempest::img_disk_format`` parameter has been added.

View File

@@ -285,6 +285,7 @@ describe 'tempest' do
:lock_path => '/var/lib/tempest' :lock_path => '/var/lib/tempest'
) )
is_expected.to contain_tempest_config('scenario/img_file').with(:value => '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img') is_expected.to contain_tempest_config('scenario/img_file').with(:value => '/var/lib/tempest/cirros-0.4.0-x86_64-disk.img')
is_expected.to contain_tempest_config('scenario/img_disk_format').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_tempest_config('service_broker/run_service_broker_tests').with(:value => false) is_expected.to contain_tempest_config('service_broker/run_service_broker_tests').with(:value => false)
is_expected.to contain_oslo__log('tempest_config').with( is_expected.to contain_oslo__log('tempest_config').with(
:debug => false, :debug => false,