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

View File

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

View File

@ -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_syslog').with(:value => false)
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_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)