Add logging_context_format_string parameter

Add logging_context_format_string so we can change log format in
tempest.

Change-Id: Ib09dbd4a800209175c065f591b7dc78ce88da709
This commit is contained in:
Emilien Macchi 2016-01-08 15:55:53 -05:00
parent e9692e3805
commit cb8000bdfa
2 changed files with 73 additions and 68 deletions
manifests
spec/classes

@ -49,6 +49,8 @@
# Defaults to false # Defaults to false
# [*log_file*] # [*log_file*]
# Defaults to undef # Defaults to undef
# [*logging_context_format_string*]
# Defaults to undef
# [*username*] # [*username*]
# Defaults to undef # Defaults to undef
# [*password*] # [*password*]
@ -139,97 +141,98 @@
# Defaults to undef # Defaults to undef
# #
class tempest( class tempest(
$install_from_source = true, $install_from_source = true,
$git_clone = true, $git_clone = true,
$tempest_config_file = '/var/lib/tempest/etc/tempest.conf', $tempest_config_file = '/var/lib/tempest/etc/tempest.conf',
# Clone config # Clone config
# #
$tempest_repo_uri = 'git://github.com/openstack/tempest.git', $tempest_repo_uri = 'git://github.com/openstack/tempest.git',
$tempest_repo_revision = undef, $tempest_repo_revision = undef,
$tempest_clone_path = '/var/lib/tempest', $tempest_clone_path = '/var/lib/tempest',
$tempest_clone_owner = 'root', $tempest_clone_owner = 'root',
$setup_venv = false, $setup_venv = false,
# Glance image config # Glance image config
# #
$configure_images = true, $configure_images = true,
$image_name = undef, $image_name = undef,
$image_name_alt = undef, $image_name_alt = undef,
# Neutron network config # Neutron network config
# #
$configure_networks = true, $configure_networks = true,
$public_network_name = undef, $public_network_name = undef,
# Horizon dashboard config # Horizon dashboard config
$login_url = undef, $login_url = undef,
$dashboard_url = undef, $dashboard_url = undef,
# tempest.conf parameters # tempest.conf parameters
# #
$identity_uri = undef, $identity_uri = undef,
$identity_uri_v3 = undef, $identity_uri_v3 = undef,
$cli_dir = undef, $cli_dir = undef,
$lock_path = '/var/lib/tempest', $lock_path = '/var/lib/tempest',
$debug = false, $debug = false,
$verbose = false, $verbose = false,
$use_stderr = true, $use_stderr = true,
$use_syslog = false, $use_syslog = false,
$log_file = undef, $log_file = undef,
$logging_context_format_string = undef,
# non admin user # non admin user
$username = undef, $username = undef,
$password = undef, $password = undef,
$tenant_name = undef, $tenant_name = undef,
# another non-admin user # another non-admin user
$alt_username = undef, $alt_username = undef,
$alt_password = undef, $alt_password = undef,
$alt_tenant_name = undef, $alt_tenant_name = undef,
# admin user # admin user
$admin_username = undef, $admin_username = undef,
$admin_password = undef, $admin_password = undef,
$admin_tenant_name = undef, $admin_tenant_name = undef,
$admin_role = undef, $admin_role = undef,
$admin_domain_name = undef, $admin_domain_name = undef,
# image information # image information
$image_ref = undef, $image_ref = undef,
$image_ref_alt = undef, $image_ref_alt = undef,
$image_ssh_user = undef, $image_ssh_user = undef,
$image_alt_ssh_user = undef, $image_alt_ssh_user = undef,
$flavor_ref = undef, $flavor_ref = undef,
$flavor_ref_alt = undef, $flavor_ref_alt = undef,
# whitebox # whitebox
$whitebox_db_uri = undef, $whitebox_db_uri = undef,
# testing features that are supported # testing features that are supported
$resize_available = undef, $resize_available = undef,
$change_password_available = undef, $change_password_available = undef,
$allow_tenant_isolation = undef, $allow_tenant_isolation = undef,
# neutron config # neutron config
$public_network_id = undef, $public_network_id = undef,
# Upstream has a bad default - set it to empty string. # Upstream has a bad defaul t - set it to empty string.
$public_router_id = '', $public_router_id = '',
# Service configuration # Service configuration
$cinder_available = true, $cinder_available = true,
$glance_available = true, $glance_available = true,
$heat_available = false, $heat_available = false,
$ceilometer_available = false, $ceilometer_available = false,
$aodh_available = false, $aodh_available = false,
$horizon_available = true, $horizon_available = true,
$neutron_available = false, $neutron_available = false,
$nova_available = true, $nova_available = true,
$murano_available = false, $murano_available = false,
$sahara_available = false, $sahara_available = false,
$swift_available = false, $swift_available = false,
$trove_available = false, $trove_available = false,
$ironic_available = false, $ironic_available = false,
$keystone_v2 = true, $keystone_v2 = true,
$keystone_v3 = true, $keystone_v3 = true,
$auth_version = 'v2', $auth_version = 'v2',
$run_service_broker_tests = false, $run_service_broker_tests = false,
# scenario options # scenario options
$img_dir = '/var/lib/tempest', $img_dir = '/var/lib/tempest',
$img_file = 'cirros-0.3.4-x86_64-disk.img', $img_file = 'cirros-0.3.4-x86_64-disk.img',
) { ) {
include '::tempest::params' include '::tempest::params'
@ -344,6 +347,7 @@ class tempest(
'DEFAULT/use_stderr': value => $use_stderr; 'DEFAULT/use_stderr': value => $use_stderr;
'DEFAULT/use_syslog': value => $use_syslog; 'DEFAULT/use_syslog': value => $use_syslog;
'DEFAULT/log_file': value => $log_file; 'DEFAULT/log_file': value => $log_file;
'DEFAULT/logging_context_format_string': value => $logging_context_format_string;
'scenario/img_dir': value => $img_dir; 'scenario/img_dir': value => $img_dir;
'scenario/img_file': value => $img_file; 'scenario/img_file': value => $img_file;
'service_broker/run_service_broker_tests': value => $run_service_broker_tests; 'service_broker/run_service_broker_tests': value => $run_service_broker_tests;

@ -202,6 +202,7 @@ describe 'tempest' do
is_expected.to contain_tempest_config('DEFAULT/use_stderr').with(:value => true) is_expected.to contain_tempest_config('DEFAULT/use_stderr').with(:value => true)
is_expected.to contain_tempest_config('DEFAULT/use_syslog').with(:value => false) is_expected.to contain_tempest_config('DEFAULT/use_syslog').with(:value => false)
is_expected.to contain_tempest_config('DEFAULT/log_file').with(:value => nil) is_expected.to contain_tempest_config('DEFAULT/log_file').with(:value => nil)
is_expected.to contain_tempest_config('DEFAULT/logging_context_format_string').with(:value => nil)
is_expected.to contain_tempest_config('scenario/img_dir').with(:value => '/var/lib/tempest') is_expected.to contain_tempest_config('scenario/img_dir').with(:value => '/var/lib/tempest')
is_expected.to contain_tempest_config('scenario/img_file').with(:value => 'cirros-0.3.4-x86_64-disk.img') is_expected.to contain_tempest_config('scenario/img_file').with(:value => 'cirros-0.3.4-x86_64-disk.img')
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)