From 270bd7f8cea90078c334ede3b2e113248a558117 Mon Sep 17 00:00:00 2001 From: Jon Grimm Date: Tue, 5 Aug 2014 18:11:29 +0000 Subject: [PATCH] Move tempest to oslo-config-generator Also fixes tempest reported bug with old generator in oslo-incubator, when identical options are registered in different groups. Change-Id: I274f48503c1b61ca09cabc8d8c50245ba1059943 Closes-bug: 1282887 --- etc/tempest.conf.sample | 1528 +++++++++--------- openstack-common.conf | 1 - run_tests.sh | 2 - setup.cfg | 3 + tempest/common/generate_sample_tempest.py | 35 - tempest/config.py | 89 +- tempest/openstack/common/config/__init__.py | 0 tempest/openstack/common/config/generator.py | 313 ---- tools/config/check_uptodate.sh | 4 +- tools/config/config-generator.tempest.conf | 3 + tools/config/generate_sample.sh | 138 -- tools/config/oslo.config.generator.rc | 1 - tox.ini | 3 + 13 files changed, 796 insertions(+), 1324 deletions(-) delete mode 100644 tempest/common/generate_sample_tempest.py delete mode 100644 tempest/openstack/common/config/__init__.py delete mode 100644 tempest/openstack/common/config/generator.py create mode 100644 tools/config/config-generator.tempest.conf delete mode 100755 tools/config/generate_sample.sh delete mode 100644 tools/config/oslo.config.generator.rc diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample index 003a7f7c3e..1cccaccc3f 100644 --- a/etc/tempest.conf.sample +++ b/etc/tempest.conf.sample @@ -1,1178 +1,1114 @@ [DEFAULT] # -# Options defined in tempest.openstack.common.lockutils +# From tempest.config # # Whether to disable inter-process locks (boolean value) -#disable_process_locking=false +#disable_process_locking = false # Directory to use for lock files. (string value) -#lock_path= - +#lock_path = # -# Options defined in tempest.openstack.common.log +# From tempest.config # -# Print debugging output (set logging level to DEBUG instead -# of default WARNING level). (boolean value) -#debug=false +# Print debugging output (set logging level to DEBUG instead of +# default WARNING level). (boolean value) +#debug = false -# Print more verbose output (set logging level to INFO instead -# of default WARNING level). (boolean value) -#verbose=false +# Print more verbose output (set logging level to INFO instead of +# default WARNING level). (boolean value) +#verbose = false -# Log output to standard error. (boolean value) -#use_stderr=true +# +# From tempest.config +# -# Format string to use for log messages with context. (string -# value) -#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s - -# Format string to use for log messages without context. +# The name of a logging configuration file. This file is appended to +# any existing logging configuration files. For details about logging +# configuration files, see the Python logging module documentation. # (string value) -#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s - -# Data to append to log format when level is DEBUG. (string -# value) -#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d - -# Prefix each line of exception output with this format. -# (string value) -#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s - -# List of logger=LEVEL pairs. (list value) -#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN - -# Enables or disables publication of error events. (boolean -# value) -#publish_errors=false - -# Enables or disables fatal status of deprecations. (boolean -# value) -#fatal_deprecations=false - -# The format for an instance that is passed with the log -# message. (string value) -#instance_format="[instance: %(uuid)s] " - -# The format for an instance UUID that is passed with the log -# message. (string value) -#instance_uuid_format="[instance: %(uuid)s] " - -# The name of a logging configuration file. This file is -# appended to any existing logging configuration files. For -# details about logging configuration files, see the Python -# logging module documentation. (string value) # Deprecated group/name - [DEFAULT]/log_config -#log_config_append= +#log_config_append = -# DEPRECATED. A logging.Formatter log message format string -# which may use any of the available logging.LogRecord -# attributes. This option is deprecated. Please use -# logging_context_format_string and -# logging_default_format_string instead. (string value) -#log_format= +# Format string for %%(asctime)s in log records. Default: %(default)s +# . (string value) +#log_date_format = %Y-%m-%d %H:%M:%S -# Format string for %%(asctime)s in log records. Default: -# %(default)s . (string value) -#log_date_format=%Y-%m-%d %H:%M:%S - -# (Optional) Name of log file to output to. If no default is -# set, logging will go to stdout. (string value) -# Deprecated group/name - [DEFAULT]/logfile -#log_file= - -# (Optional) The base directory used for relative --log-file -# paths. (string value) +# (Optional) The base directory used for relative --log-file paths. +# (string value) # Deprecated group/name - [DEFAULT]/logdir -#log_dir= +#log_dir = -# Use syslog for logging. Existing syslog format is DEPRECATED -# during I, and will change in J to honor RFC5424. (boolean -# value) -#use_syslog=false +# (Optional) Name of log file to output to. If no default is set, +# logging will go to stdout. (string value) +# Deprecated group/name - [DEFAULT]/logfile +#log_file = -# (Optional) Enables or disables syslog rfc5424 format for -# logging. If enabled, prefixes the MSG part of the syslog -# message with APP-NAME (RFC5424). The format without the APP- -# NAME is deprecated in I, and will be removed in J. (boolean -# value) -#use_syslog_rfc_format=false +# DEPRECATED. A logging.Formatter log message format string which may +# use any of the available logging.LogRecord attributes. This option +# is deprecated. Please use logging_context_format_string and +# logging_default_format_string instead. (string value) +#log_format = # Syslog facility to receive log lines. (string value) -#syslog_log_facility=LOG_USER +#syslog_log_facility = LOG_USER + +# Use syslog for logging. Existing syslog format is DEPRECATED during +# I, and will change in J to honor RFC5424. (boolean value) +#use_syslog = false + +# (Optional) Enables or disables syslog rfc5424 format for logging. If +# enabled, prefixes the MSG part of the syslog message with APP-NAME +# (RFC5424). The format without the APP-NAME is deprecated in I, and +# will be removed in J. (boolean value) +#use_syslog_rfc_format = false + +# +# From tempest.config +# + +# Log output to standard error. (boolean value) +#use_stderr = true + +# +# From tempest.config +# + +# List of logger=LEVEL pairs. (list value) +#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN + +# Enables or disables fatal status of deprecations. (boolean value) +#fatal_deprecations = false + +# The format for an instance that is passed with the log message. +# (string value) +#instance_format = "[instance: %(uuid)s] " + +# The format for an instance UUID that is passed with the log message. +# (string value) +#instance_uuid_format = "[instance: %(uuid)s] " + +# Format string to use for log messages with context. (string value) +#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s + +# Data to append to log format when level is DEBUG. (string value) +#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d + +# Format string to use for log messages without context. (string +# value) +#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s + +# Prefix each line of exception output with this format. (string +# value) +#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s + +# Enables or disables publication of error events. (boolean value) +#publish_errors = false [auth] # -# Options defined in tempest.config +# From tempest.config # -# Path to the yaml file that contains the list of credentials -# to use for running tests (string value) -#test_accounts_file=etc/accounts.yaml - -# Allows test cases to create/destroy tenants and users. This -# option requires that OpenStack Identity API admin -# credentials are known. If false, isolated test cases and -# parallel execution, can still be achieved configuring a list -# of test accounts (boolean value) +# Allows test cases to create/destroy tenants and users. This option +# requires that OpenStack Identity API admin credentials are known. If +# false, isolated test cases and parallel execution, can still be +# achieved configuring a list of test accounts (boolean value) # Deprecated group/name - [compute]/allow_tenant_isolation # Deprecated group/name - [orchestration]/allow_tenant_isolation -#allow_tenant_isolation=false +#allow_tenant_isolation = false # If set to True it enables the Accounts provider, which locks -# credentials to allow for parallel execution with pre- -# provisioned accounts. It can only be used to run tests that -# ensure credentials cleanup happens. It requires at least `2 -# * CONC` distinct accounts configured in -# `test_accounts_file`, with CONC == the number of concurrent -# test processes. (boolean value) -#locking_credentials_provider=false +# credentials to allow for parallel execution with pre-provisioned +# accounts. It can only be used to run tests that ensure credentials +# cleanup happens. It requires at least `2 * CONC` distinct accounts +# configured in `test_accounts_file`, with CONC == the number of +# concurrent test processes. (boolean value) +#locking_credentials_provider = false + +# Path to the yaml file that contains the list of credentials to use +# for running tests (string value) +#test_accounts_file = etc/accounts.yaml [baremetal] # -# Options defined in tempest.config +# From tempest.config # -# Catalog type of the baremetal provisioning service (string -# value) -#catalog_type=baremetal +# Timeout for Ironic node to completely provision (integer value) +#active_timeout = 300 -# Whether the Ironic nova-compute driver is enabled (boolean +# Timeout for association of Nova instance and Ironic node (integer # value) -#driver_enabled=false +#association_timeout = 30 + +# Catalog type of the baremetal provisioning service (string value) +#catalog_type = baremetal # Driver name which Ironic uses (string value) -#driver=fake +#driver = fake -# The endpoint type to use for the baremetal provisioning -# service (string value) -#endpoint_type=publicURL +# Whether the Ironic nova-compute driver is enabled (boolean value) +#driver_enabled = false -# Timeout for Ironic node to completely provision (integer -# value) -#active_timeout=300 - -# Timeout for association of Nova instance and Ironic node -# (integer value) -#association_timeout=30 +# The endpoint type to use for the baremetal provisioning service +# (string value) +#endpoint_type = publicURL # Timeout for Ironic power transitions. (integer value) -#power_timeout=60 +#power_timeout = 60 # Timeout for unprovisioning an Ironic node. (integer value) -#unprovision_timeout=60 +#unprovision_timeout = 60 [boto] # -# Options defined in tempest.config +# From tempest.config # -# EC2 URL (string value) -#ec2_url=http://localhost:8773/services/Cloud - -# S3 URL (string value) -#s3_url=http://localhost:8080 - -# AWS Secret Key (string value) -#aws_secret= - -# AWS Access Key (string value) -#aws_access= - -# AWS Zone for EC2 tests (string value) -#aws_zone=nova - -# S3 Materials Path (string value) -#s3_materials_path=/opt/stack/devstack/files/images/s3-materials/cirros-0.3.0 - -# ARI Ramdisk Image manifest (string value) -#ari_manifest=cirros-0.3.0-x86_64-initrd.manifest.xml +# AKI Kernel Image manifest (string value) +#aki_manifest = cirros-0.3.0-x86_64-vmlinuz.manifest.xml # AMI Machine Image manifest (string value) -#ami_manifest=cirros-0.3.0-x86_64-blank.img.manifest.xml +#ami_manifest = cirros-0.3.0-x86_64-blank.img.manifest.xml -# AKI Kernel Image manifest (string value) -#aki_manifest=cirros-0.3.0-x86_64-vmlinuz.manifest.xml +# ARI Ramdisk Image manifest (string value) +#ari_manifest = cirros-0.3.0-x86_64-initrd.manifest.xml -# Instance type (string value) -#instance_type=m1.tiny +# AWS Access Key (string value) +#aws_access = -# boto Http socket timeout (integer value) -#http_socket_timeout=3 +# AWS Secret Key (string value) +#aws_secret = -# boto num_retries on error (integer value) -#num_retries=1 - -# Status Change Timeout (integer value) -#build_timeout=60 +# AWS Zone for EC2 tests (string value) +#aws_zone = nova # Status Change Test Interval (integer value) -#build_interval=1 +#build_interval = 1 + +# Status Change Timeout (integer value) +#build_timeout = 60 + +# EC2 URL (string value) +#ec2_url = http://localhost:8773/services/Cloud + +# boto Http socket timeout (integer value) +#http_socket_timeout = 3 + +# Instance type (string value) +#instance_type = m1.tiny + +# boto num_retries on error (integer value) +#num_retries = 1 + +# S3 Materials Path (string value) +#s3_materials_path = /opt/stack/devstack/files/images/s3-materials/cirros-0.3.0 + +# S3 URL (string value) +#s3_url = http://localhost:8080 [cli] # -# Options defined in tempest.config +# From tempest.config # -# enable cli tests (boolean value) -#enabled=true +# directory where python client binaries are located (string value) +#cli_dir = /usr/local/bin -# directory where python client binaries are located (string -# value) -#cli_dir=/usr/local/bin +# enable cli tests (boolean value) +#enabled = true # Whether the tempest run location has access to the *-manage -# commands. In a pure blackbox environment it will not. -# (boolean value) -#has_manage=true +# commands. In a pure blackbox environment it will not. (boolean +# value) +#has_manage = true # Number of seconds to wait on a CLI timeout (integer value) -#timeout=15 +#timeout = 15 [compute] # -# Options defined in tempest.config +# From tempest.config # +# Time in seconds between build status checks. (integer value) +#build_interval = 1 + +# Timeout in seconds to wait for an instance to build. (integer value) +#build_timeout = 300 + +# Catalog type of the Compute service. (string value) +#catalog_type = compute + +# Catalog type of the Compute v3 service. (string value) +#catalog_v3_type = computev3 + +# The endpoint type to use for the compute service. (string value) +#endpoint_type = publicURL + +# Visible fixed network name (string value) +#fixed_network_name = private + +# Valid primary flavor to use in tests. (string value) +#flavor_ref = 1 + +# Valid secondary flavor to be used in tests. (string value) +#flavor_ref_alt = 2 + +# Unallocated floating IP range, which will be used to test the +# floating IP bulk feature for CRUD operation. (string value) +#floating_ip_range = 10.0.0.0/29 + +# Password used to authenticate to an instance using the alternate +# image. (string value) +#image_alt_ssh_password = password + +# User name used to authenticate to an instance using the alternate +# image. (string value) +#image_alt_ssh_user = root + # Valid primary image reference to be used in tests. This is a # required option (string value) -#image_ref= +#image_ref = -# Valid secondary image reference to be used in tests. This is -# a required option, but if only one image is available -# duplicate the value of image_ref above (string value) -#image_ref_alt= - -# Valid primary flavor to use in tests. (string value) -#flavor_ref=1 - -# Valid secondary flavor to be used in tests. (string value) -#flavor_ref_alt=2 - -# User name used to authenticate to an instance. (string -# value) -#image_ssh_user=root +# Valid secondary image reference to be used in tests. This is a +# required option, but if only one image is available duplicate the +# value of image_ref above (string value) +#image_ref_alt = # Password used to authenticate to an instance. (string value) -#image_ssh_password=password +#image_ssh_password = password -# User name used to authenticate to an instance using the -# alternate image. (string value) -#image_alt_ssh_user=root - -# Password used to authenticate to an instance using the -# alternate image. (string value) -#image_alt_ssh_password=password - -# Time in seconds between build status checks. (integer value) -#build_interval=1 - -# Timeout in seconds to wait for an instance to build. -# (integer value) -#build_timeout=300 - -# Should the tests ssh to instances? (boolean value) -#run_ssh=false - -# Auth method used for authenticate to the instance. Valid -# choices are: keypair, configured, adminpass. keypair: start -# the servers with an ssh keypair. configured: use the -# configured user and password. adminpass: use the injected -# adminPass. disabled: avoid using ssh when it is an option. -# (string value) -#ssh_auth_method=keypair - -# How to connect to the instance? fixed: using the first ip -# belongs the fixed network floating: creating and using a -# floating ip (string value) -#ssh_connect_method=fixed - -# User name used to authenticate to an instance. (string -# value) -#ssh_user=root - -# Timeout in seconds to wait for ping to succeed. (integer -# value) -#ping_timeout=120 - -# Timeout in seconds to wait for authentication to succeed. -# (integer value) -#ssh_timeout=300 - -# Additional wait time for clean state, when there is no OS- -# EXT-STS extension available (integer value) -#ready_wait=0 - -# Timeout in seconds to wait for output from ssh channel. -# (integer value) -#ssh_channel_timeout=60 - -# Visible fixed network name (string value) -#fixed_network_name=private - -# Network used for SSH connections. (string value) -#network_for_ssh=public +# User name used to authenticate to an instance. (string value) +#image_ssh_user = root # IP version used for SSH connections. (integer value) -#ip_version_for_ssh=4 +#ip_version_for_ssh = 4 -# Does SSH use Floating IPs? (boolean value) -#use_floatingip_for_ssh=true +# Network used for SSH connections. (string value) +#network_for_ssh = public -# Catalog type of the Compute service. (string value) -#catalog_type=compute +# Path to a private key file for SSH access to remote hosts (string +# value) +#path_to_private_key = + +# Timeout in seconds to wait for ping to succeed. (integer value) +#ping_timeout = 120 + +# Additional wait time for clean state, when there is no OS-EXT-STS +# extension available (integer value) +#ready_wait = 0 # The compute region name to use. If empty, the value of -# identity.region is used instead. If no such region is found -# in the service catalog, the first found one is used. (string +# identity.region is used instead. If no such region is found in the +# service catalog, the first found one is used. (string value) +#region = + +# Should the tests ssh to instances? (boolean value) +#run_ssh = false + +# Time in seconds before a shelved instance is eligible for removing +# from a host. -1 never offload, 0 offload when shelved. This time +# should be the same as the time of nova.conf, and some tests will run +# for as long as the time. (integer value) +#shelved_offload_time = 0 + +# Auth method used for authenticate to the instance. Valid choices +# are: keypair, configured, adminpass. keypair: start the servers with +# an ssh keypair. configured: use the configured user and password. +# adminpass: use the injected adminPass. disabled: avoid using ssh +# when it is an option. (string value) +#ssh_auth_method = keypair + +# Timeout in seconds to wait for output from ssh channel. (integer # value) -#region= +#ssh_channel_timeout = 60 -# The endpoint type to use for the compute service. (string +# How to connect to the instance? fixed: using the first ip belongs +# the fixed network floating: creating and using a floating ip (string # value) -#endpoint_type=publicURL +#ssh_connect_method = fixed -# Catalog type of the Compute v3 service. (string value) -#catalog_v3_type=computev3 +# Timeout in seconds to wait for authentication to succeed. (integer +# value) +#ssh_timeout = 300 -# Path to a private key file for SSH access to remote hosts +# User name used to authenticate to an instance. (string value) +#ssh_user = root + +# Does SSH use Floating IPs? (boolean value) +#use_floatingip_for_ssh = true + +# Expected device name when a volume is attached to an instance # (string value) -#path_to_private_key= - -# Expected device name when a volume is attached to an -# instance (string value) -#volume_device_name=vdb - -# Time in seconds before a shelved instance is eligible for -# removing from a host. -1 never offload, 0 offload when -# shelved. This time should be the same as the time of -# nova.conf, and some tests will run for as long as the time. -# (integer value) -#shelved_offload_time=0 - -# Unallocated floating IP range, which will be used to test -# the floating IP bulk feature for CRUD operation. (string -# value) -#floating_ip_range=10.0.0.0/29 - -# Time in seconds between build status checks. (integer value) -#build_interval=1 +#volume_device_name = vdb [compute-admin] # -# Options defined in tempest.config +# From tempest.config # -# Administrative Username to use for Nova API requests. -# (string value) -#username= - -# Administrative Tenant name to use for Nova API requests. -# (string value) -#tenant_name= +# Domain name for authentication as admin (Keystone V3).The same +# domain applies to user and project (string value) +#domain_name = # API key to use when authenticating as admin. (string value) -#password= +#password = -# Domain name for authentication as admin (Keystone V3).The -# same domain applies to user and project (string value) -#domain_name= +# Administrative Tenant name to use for Nova API requests. (string +# value) +#tenant_name = + +# Administrative Username to use for Nova API requests. (string value) +#username = [compute-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # -# If false, skip all nova v3 tests. (boolean value) -#api_v3=false +# A list of enabled compute extensions with a special entry all which +# indicates every extension is enabled. Each extension should be +# specified with alias name. Empty list indicates all extensions are +# disabled (list value) +#api_extensions = all -# If false skip all v2 api tests with xml (boolean value) -#xml_api_v2=true +# If false, skip all nova v3 tests. (boolean value) +#api_v3 = false + +# A list of enabled v3 extensions with a special entry all which +# indicates every extension is enabled. Each extension should be +# specified with alias name. Empty list indicates all extensions are +# disabled (list value) +#api_v3_extensions = all + +# Does the test environment block migration support cinder iSCSI +# volumes (boolean value) +#block_migrate_cinder_iscsi = false + +# Does the test environment use block devices for live migration +# (boolean value) +#block_migration_for_live_migration = false + +# Does the test environment support changing the admin password? +# (boolean value) +#change_password = false + +# Does the test environment support obtaining instance serial console +# output? (boolean value) +#console_output = true # If false, skip disk config tests (boolean value) -#disk_config=true +#disk_config = true -# A list of enabled compute extensions with a special entry -# all which indicates every extension is enabled. Each -# extension should be specified with alias name. Empty list -# indicates all extensions are disabled (list value) -#api_extensions=all - -# A list of enabled v3 extensions with a special entry all -# which indicates every extension is enabled. Each extension -# should be specified with alias name. Empty list indicates -# all extensions are disabled (list value) -#api_v3_extensions=all - -# Does the test environment support changing the admin -# password? (boolean value) -#change_password=false - -# Does the test environment support obtaining instance serial -# console output? (boolean value) -#console_output=true - -# Does the test environment support resizing? (boolean value) -#resize=false - -# Does the test environment support pausing? (boolean value) -#pause=true - -# Does the test environment support shelving/unshelving? -# (boolean value) -#shelve=true - -# Does the test environment support suspend/resume? (boolean -# value) -#suspend=true - -# Does the test environment support live migration available? -# (boolean value) -#live_migration=false - -# Does the test environment use block devices for live -# migration (boolean value) -#block_migration_for_live_migration=false - -# Does the test environment block migration support cinder -# iSCSI volumes (boolean value) -#block_migrate_cinder_iscsi=false - -# Enable VNC console. This configuration value should be same -# as [nova.vnc]->vnc_enabled in nova.conf (boolean value) -#vnc_console=false - -# Enable Spice console. This configuration value should be -# same as [nova.spice]->enabled in nova.conf (boolean value) -#spice_console=false - -# Enable RDP console. This configuration value should be same -# as [nova.rdp]->enabled in nova.conf (boolean value) -#rdp_console=false - -# Does the test environment support instance rescue mode? -# (boolean value) -#rescue=true - -# Enables returning of the instance password by the relevant -# server API calls such as create, rebuild or rescue. (boolean -# value) -#enable_instance_password=true +# Enables returning of the instance password by the relevant server +# API calls such as create, rebuild or rescue. (boolean value) +#enable_instance_password = true # Does the test environment support dynamic network interface # attachment? (boolean value) -#interface_attach=true +#interface_attach = true -# Does the test environment support creating snapshot images -# of running instances? (boolean value) -#snapshot=true +# Does the test environment support live migration available? (boolean +# value) +#live_migration = false + +# Does the test environment support pausing? (boolean value) +#pause = true + +# Enable RDP console. This configuration value should be same as +# [nova.rdp]->enabled in nova.conf (boolean value) +#rdp_console = false + +# Does the test environment support instance rescue mode? (boolean +# value) +#rescue = true + +# Does the test environment support resizing? (boolean value) +#resize = false + +# Does the test environment support shelving/unshelving? (boolean +# value) +#shelve = true + +# Does the test environment support creating snapshot images of +# running instances? (boolean value) +#snapshot = true + +# Enable Spice console. This configuration value should be same as +# [nova.spice]->enabled in nova.conf (boolean value) +#spice_console = false + +# Does the test environment support suspend/resume? (boolean value) +#suspend = true + +# Enable VNC console. This configuration value should be same as +# [nova.vnc]->vnc_enabled in nova.conf (boolean value) +#vnc_console = false + +# If false skip all v2 api tests with xml (boolean value) +#xml_api_v2 = true [dashboard] # -# Options defined in tempest.config +# From tempest.config # # Where the dashboard can be found (string value) -#dashboard_url=http://localhost/ +#dashboard_url = http://localhost/ # Login page for the dashboard (string value) -#login_url=http://localhost/auth/login/ +#login_url = http://localhost/auth/login/ [data_processing] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the data processing service. (string value) -#catalog_type=data_processing +#catalog_type = data_processing -# The endpoint type to use for the data processing service. -# (string value) -#endpoint_type=publicURL +# The endpoint type to use for the data processing service. (string +# value) +#endpoint_type = publicURL [database] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the Database service. (string value) -#catalog_type=database +#catalog_type = database -# Valid primary flavor to use in database tests. (string -# value) -#db_flavor_ref=1 +# Current database version to use in database tests. (string value) +#db_current_version = v1.0 -# Current database version to use in database tests. (string -# value) -#db_current_version=v1.0 +# Valid primary flavor to use in database tests. (string value) +#db_flavor_ref = 1 [debug] # -# Options defined in tempest.config +# From tempest.config # # Enable diagnostic commands (boolean value) -#enable=true +#enable = true -# A regex to determine which requests should be traced. This -# is a regex to match the caller for rest client requests to -# be able to selectively trace calls out of specific classes -# and methods. It largely exists for test development, and is -# not expected to be used in a real deploy of tempest. This -# will be matched against the discovered ClassName:method in -# the test environment. Expected values for this field are: -# * ClassName:test_method_name - traces one test_method * -# ClassName:setUp(Class) - traces specific setup functions * -# ClassName:tearDown(Class) - traces specific teardown -# functions * ClassName:_run_cleanups - traces the cleanup -# functions If nothing is specified, this feature is not -# enabled. To trace everything specify .* as the regex. -# (string value) -#trace_requests= +# A regex to determine which requests should be traced. This is a +# regex to match the caller for rest client requests to be able to +# selectively trace calls out of specific classes and methods. It +# largely exists for test development, and is not expected to be used +# in a real deploy of tempest. This will be matched against the +# discovered ClassName:method in the test environment. Expected +# values for this field are: * ClassName:test_method_name - traces +# one test_method * ClassName:setUp(Class) - traces specific setup +# functions * ClassName:tearDown(Class) - traces specific teardown +# functions * ClassName:_run_cleanups - traces the cleanup functions +# If nothing is specified, this feature is not enabled. To trace +# everything specify .* as the regex. (string value) +#trace_requests = [identity] # -# Options defined in tempest.config +# From tempest.config # -# Catalog type of the Identity service. (string value) -#catalog_type=identity - -# Set to True if using self-signed SSL certificates. (boolean -# value) -#disable_ssl_certificate_validation=false - -# Full URI of the OpenStack Identity API (Keystone), v2 -# (string value) -#uri= - -# Full URI of the OpenStack Identity API (Keystone), v3 -# (string value) -#uri_v3= - -# Identity API version to be used for authentication for API -# tests. (string value) -#auth_version=v2 - -# The identity region name to use. Also used as the other -# services' region name unless they are set explicitly. If no -# such region is found in the service catalog, the first found -# one is used. (string value) -#region=RegionOne - -# The endpoint type to use for the identity service. (string -# value) -#endpoint_type=publicURL - -# Username to use for Nova API requests. (string value) -#username= - -# Tenant name to use for Nova API requests. (string value) -#tenant_name= - -# Role required to administrate keystone. (string value) -#admin_role=admin - -# API key to use when authenticating. (string value) -#password= - -# Domain name for authentication (Keystone V3).The same domain +# Admin domain name for authentication (Keystone V3).The same domain # applies to user and project (string value) -#domain_name= - -# Username of alternate user to use for Nova API requests. -# (string value) -#alt_username= - -# Alternate user's Tenant name to use for Nova API requests. -# (string value) -#alt_tenant_name= - -# API key to use when authenticating as alternate user. -# (string value) -#alt_password= - -# Alternate domain name for authentication (Keystone V3).The -# same domain applies to user and project (string value) -#alt_domain_name= - -# Administrative Username to use for Keystone API requests. -# (string value) -#admin_username= - -# Administrative Tenant name to use for Keystone API requests. -# (string value) -#admin_tenant_name= +#admin_domain_name = # API key to use when authenticating as admin. (string value) -#admin_password= +#admin_password = -# Admin domain name for authentication (Keystone V3).The same +# Role required to administrate keystone. (string value) +#admin_role = admin + +# Administrative Tenant name to use for Keystone API requests. (string +# value) +#admin_tenant_name = + +# Administrative Username to use for Keystone API requests. (string +# value) +#admin_username = + +# Alternate domain name for authentication (Keystone V3).The same # domain applies to user and project (string value) -#admin_domain_name= +#alt_domain_name = + +# API key to use when authenticating as alternate user. (string value) +#alt_password = + +# Alternate user's Tenant name to use for Nova API requests. (string +# value) +#alt_tenant_name = + +# Username of alternate user to use for Nova API requests. (string +# value) +#alt_username = + +# Identity API version to be used for authentication for API tests. +# (string value) +#auth_version = v2 + +# Catalog type of the Identity service. (string value) +#catalog_type = identity + +# Set to True if using self-signed SSL certificates. (boolean value) +#disable_ssl_certificate_validation = false + +# Domain name for authentication (Keystone V3).The same domain applies +# to user and project (string value) +#domain_name = + +# The endpoint type to use for the identity service. (string value) +#endpoint_type = publicURL + +# API key to use when authenticating. (string value) +#password = + +# The identity region name to use. Also used as the other services' +# region name unless they are set explicitly. If no such region is +# found in the service catalog, the first found one is used. (string +# value) +#region = RegionOne + +# Tenant name to use for Nova API requests. (string value) +#tenant_name = + +# Full URI of the OpenStack Identity API (Keystone), v2 (string value) +#uri = + +# Full URI of the OpenStack Identity API (Keystone), v3 (string value) +#uri_v3 = + +# Username to use for Nova API requests. (string value) +#username = [identity-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # -# Does the identity service have delegation and impersonation -# enabled (boolean value) -#trust=true - # Is the v2 identity API enabled (boolean value) -#api_v2=true +#api_v2 = true # Is the v3 identity API enabled (boolean value) -#api_v3=true +#api_v3 = true + +# Does the identity service have delegation and impersonation enabled +# (boolean value) +#trust = true [image] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the Image service. (string value) -#catalog_type=image +#catalog_type = image -# The image region name to use. If empty, the value of -# identity.region is used instead. If no such region is found -# in the service catalog, the first found one is used. (string -# value) -#region= - -# The endpoint type to use for the image service. (string -# value) -#endpoint_type=publicURL +# The endpoint type to use for the image service. (string value) +#endpoint_type = publicURL # http accessible image (string value) -#http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz +#http_image = http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz + +# The image region name to use. If empty, the value of identity.region +# is used instead. If no such region is found in the service catalog, +# the first found one is used. (string value) +#region = [image-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # -# Is the v2 image API enabled (boolean value) -#api_v2=true - # Is the v1 image API enabled (boolean value) -#api_v1=true +#api_v1 = true + +# Is the v2 image API enabled (boolean value) +#api_v2 = true [input-scenario] # -# Options defined in tempest.config +# From tempest.config # -# Matching images become parameters for scenario tests (string +# Matching flavors become parameters for scenario tests (string value) +#flavor_regex = ^m1.nano$ + +# Matching images become parameters for scenario tests (string value) +#image_regex = ^cirros-0.3.1-x86_64-uec$ + +# SSH verification in tests is skippedfor matching images (string # value) -#image_regex=^cirros-0.3.1-x86_64-uec$ +#non_ssh_image_regex = ^.*[Ww]in.*$ -# Matching flavors become parameters for scenario tests -# (string value) -#flavor_regex=^m1.nano$ - -# SSH verification in tests is skippedfor matching images -# (string value) -#non_ssh_image_regex=^.*[Ww]in.*$ - -# List of user mapped to regex to matching image names. -# (string value) -#ssh_user_regex=[["^.*[Cc]irros.*$", "root"]] +# List of user mapped to regex to matching image names. (string value) +#ssh_user_regex = [["^.*[Cc]irros.*$", "root"]] [messaging] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the Messaging service. (string value) -#catalog_type=messaging - -# The maximum number of queue records per page when listing -# queues (integer value) -#max_queues_per_page=20 - -# The maximum metadata size for a queue (integer value) -#max_queue_metadata=65536 - -# The maximum number of queue message per page when listing -# (or) posting messages (integer value) -#max_messages_per_page=20 - -# The maximum size of a message body (integer value) -#max_message_size=262144 - -# The maximum number of messages per claim (integer value) -#max_messages_per_claim=20 - -# The maximum ttl for a message (integer value) -#max_message_ttl=1209600 - -# The maximum ttl for a claim (integer value) -#max_claim_ttl=43200 +#catalog_type = messaging # The maximum grace period for a claim (integer value) -#max_claim_grace=43200 +#max_claim_grace = 43200 + +# The maximum ttl for a claim (integer value) +#max_claim_ttl = 43200 + +# The maximum size of a message body (integer value) +#max_message_size = 262144 + +# The maximum ttl for a message (integer value) +#max_message_ttl = 1209600 + +# The maximum number of messages per claim (integer value) +#max_messages_per_claim = 20 + +# The maximum number of queue message per page when listing (or) +# posting messages (integer value) +#max_messages_per_page = 20 + +# The maximum metadata size for a queue (integer value) +#max_queue_metadata = 65536 + +# The maximum number of queue records per page when listing queues +# (integer value) +#max_queues_per_page = 20 [negative] # -# Options defined in tempest.config +# From tempest.config # # Test generator class for all negative tests (string value) -#test_generator=tempest.common.generator.negative_generator.NegativeTestGenerator +#test_generator = tempest.common.generator.negative_generator.NegativeTestGenerator [network] # -# Options defined in tempest.config +# From tempest.config # +# Time in seconds between network operation status checks. (integer +# value) +#build_interval = 1 + +# Timeout in seconds to wait for network operation to complete. +# (integer value) +#build_timeout = 300 + # Catalog type of the Neutron service. (string value) -#catalog_type=network +#catalog_type = network + +# List of dns servers whichs hould be used for subnet creation (list +# value) +#dns_servers = 8.8.8.8,8.8.4.4 + +# The endpoint type to use for the network service. (string value) +#endpoint_type = publicURL + +# Id of the public network that provides external connectivity (string +# value) +#public_network_id = + +# Id of the public router that provides external connectivity (string +# value) +#public_router_id = # The network region name to use. If empty, the value of -# identity.region is used instead. If no such region is found -# in the service catalog, the first found one is used. (string -# value) -#region= +# identity.region is used instead. If no such region is found in the +# service catalog, the first found one is used. (string value) +#region = -# The endpoint type to use for the network service. (string -# value) -#endpoint_type=publicURL - -# The cidr block to allocate tenant ipv4 subnets from (string -# value) -#tenant_network_cidr=10.100.0.0/16 +# The cidr block to allocate tenant ipv4 subnets from (string value) +#tenant_network_cidr = 10.100.0.0/16 # The mask bits for tenant ipv4 subnets (integer value) -#tenant_network_mask_bits=28 +#tenant_network_mask_bits = 28 -# The cidr block to allocate tenant ipv6 subnets from (string -# value) -#tenant_network_v6_cidr=2003::/48 +# The cidr block to allocate tenant ipv6 subnets from (string value) +#tenant_network_v6_cidr = 2003::/48 # The mask bits for tenant ipv6 subnets (integer value) -#tenant_network_v6_mask_bits=64 +#tenant_network_v6_mask_bits = 64 -# Whether tenant network connectivity should be evaluated -# directly (boolean value) -#tenant_networks_reachable=false - -# Id of the public network that provides external connectivity -# (string value) -#public_network_id= - -# Id of the public router that provides external connectivity -# (string value) -#public_router_id= - -# Timeout in seconds to wait for network operation to -# complete. (integer value) -#build_timeout=300 - -# Time in seconds between network operation status checks. -# (integer value) -#build_interval=1 - -# List of dns servers whichs hould be used for subnet creation -# (list value) -#dns_servers=8.8.8.8,8.8.4.4 +# Whether tenant network connectivity should be evaluated directly +# (boolean value) +#tenant_networks_reachable = false [network-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # +# A list of enabled network extensions with a special entry all which +# indicates every extension is enabled. Empty list indicates all +# extensions are disabled (list value) +#api_extensions = all + # Allow the execution of IPv6 tests (boolean value) -#ipv6=true +#ipv6 = true -# A list of enabled network extensions with a special entry -# all which indicates every extension is enabled. Empty list -# indicates all extensions are disabled (list value) -#api_extensions=all - -# Allow the execution of IPv6 subnet tests that use the -# extended IPv6 attributes ipv6_ra_mode and ipv6_address_mode -# (boolean value) -#ipv6_subnet_attributes=false +# Allow the execution of IPv6 subnet tests that use the extended IPv6 +# attributes ipv6_ra_mode and ipv6_address_mode (boolean value) +#ipv6_subnet_attributes = false [object-storage] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the Object-Storage service. (string value) -#catalog_type=object-store +#catalog_type = object-store -# The object-storage region name to use. If empty, the value -# of identity.region is used instead. If no such region is -# found in the service catalog, the first found one is used. -# (string value) -#region= +# Number of seconds to wait while looping to check the status of a +# container to container synchronization (integer value) +#container_sync_interval = 5 -# The endpoint type to use for the object-store service. -# (string value) -#endpoint_type=publicURL +# Number of seconds to time on waiting for a container to container +# synchronization complete. (integer value) +#container_sync_timeout = 120 -# Number of seconds to time on waiting for a container to -# container synchronization complete. (integer value) -#container_sync_timeout=120 +# The endpoint type to use for the object-store service. (string +# value) +#endpoint_type = publicURL -# Number of seconds to wait while looping to check the status -# of a container to container synchronization (integer value) -#container_sync_interval=5 +# Role to add to users created for swift tests to enable creating +# containers (string value) +#operator_role = Member -# Role to add to users created for swift tests to enable -# creating containers (string value) -#operator_role=Member +# The object-storage region name to use. If empty, the value of +# identity.region is used instead. If no such region is found in the +# service catalog, the first found one is used. (string value) +#region = # User role that has reseller admin (string value) -#reseller_admin_role=ResellerAdmin +#reseller_admin_role = ResellerAdmin [object-storage-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # -# A list of the enabled optional discoverable apis. A single -# entry, all, indicates that all of these features are -# expected to be enabled (list value) -#discoverable_apis=all - # Execute (old style) container-sync tests (boolean value) -#container_sync=true - -# Execute object-versioning tests (boolean value) -#object_versioning=true +#container_sync = true # Execute discoverability tests (boolean value) -#discoverability=true +#discoverability = true + +# A list of the enabled optional discoverable apis. A single entry, +# all, indicates that all of these features are expected to be enabled +# (list value) +#discoverable_apis = all + +# Execute object-versioning tests (boolean value) +#object_versioning = true [orchestration] # -# Options defined in tempest.config +# From tempest.config # +# Time in seconds between build status checks. (integer value) +#build_interval = 1 + +# Timeout in seconds to wait for a stack to build. (integer value) +#build_timeout = 1200 + # Catalog type of the Orchestration service. (string value) -#catalog_type=orchestration +#catalog_type = orchestration + +# The endpoint type to use for the orchestration service. (string +# value) +#endpoint_type = publicURL + +# Name of heat-cfntools enabled image to use when launching test +# instances. (string value) +#image_ref = + +# Instance type for tests. Needs to be big enough for a full OS plus +# the test workload (string value) +#instance_type = m1.micro + +# Name of existing keypair to launch servers with. (string value) +#keypair_name = + +# Value must match heat configuration of the same name. (integer +# value) +#max_resources_per_stack = 1000 + +# Value must match heat configuration of the same name. (integer +# value) +#max_template_size = 524288 # The orchestration region name to use. If empty, the value of -# identity.region is used instead. If no such region is found -# in the service catalog, the first found one is used. (string -# value) -#region= - -# The endpoint type to use for the orchestration service. -# (string value) -#endpoint_type=publicURL - -# Timeout in seconds to wait for a stack to build. (integer -# value) -#build_timeout=1200 - -# Instance type for tests. Needs to be big enough for a full -# OS plus the test workload (string value) -#instance_type=m1.micro - -# Name of heat-cfntools enabled image to use when launching -# test instances. (string value) -#image_ref= - -# Name of existing keypair to launch servers with. (string -# value) -#keypair_name= - -# Value must match heat configuration of the same name. -# (integer value) -#max_template_size=524288 - -# Value must match heat configuration of the same name. -# (integer value) -#max_resources_per_stack=1000 +# identity.region is used instead. If no such region is found in the +# service catalog, the first found one is used. (string value) +#region = [scenario] # -# Options defined in tempest.config +# From tempest.config # +# AKI image file name (string value) +#aki_img_file = cirros-0.3.1-x86_64-vmlinuz + +# AMI image file name (string value) +#ami_img_file = cirros-0.3.1-x86_64-blank.img + +# ARI image file name (string value) +#ari_img_file = cirros-0.3.1-x86_64-initrd + +# Image container format (string value) +#img_container_format = bare + # Directory containing image files (string value) -#img_dir=/opt/stack/new/devstack/files/images/cirros-0.3.1-x86_64-uec +#img_dir = /opt/stack/new/devstack/files/images/cirros-0.3.1-x86_64-uec + +# Image disk format (string value) +#img_disk_format = qcow2 # Image file name (string value) # Deprecated group/name - [DEFAULT]/qcow2_img_file -#img_file=cirros-0.3.1-x86_64-disk.img +#img_file = cirros-0.3.1-x86_64-disk.img -# Image disk format (string value) -#img_disk_format=qcow2 - -# Image container format (string value) -#img_container_format=bare - -# AMI image file name (string value) -#ami_img_file=cirros-0.3.1-x86_64-blank.img - -# ARI image file name (string value) -#ari_img_file=cirros-0.3.1-x86_64-initrd - -# AKI image file name (string value) -#aki_img_file=cirros-0.3.1-x86_64-vmlinuz +# specifies how many resources to request at once. Used for large +# operations testing. (integer value) +#large_ops_number = 0 # ssh username for the image file (string value) -#ssh_user=cirros - -# specifies how many resources to request at once. Used for -# large operations testing. (integer value) -#large_ops_number=0 +#ssh_user = cirros [service_available] # -# Options defined in tempest.config +# From tempest.config # -# Whether or not cinder is expected to be available (boolean +# Whether or not Ceilometer is expected to be available (boolean # value) -#cinder=true +#ceilometer = true -# Whether or not neutron is expected to be available (boolean -# value) -#neutron=false +# Whether or not cinder is expected to be available (boolean value) +#cinder = true -# Whether or not glance is expected to be available (boolean -# value) -#glance=true +# Whether or not glance is expected to be available (boolean value) +#glance = true -# Whether or not swift is expected to be available (boolean -# value) -#swift=true +# Whether or not Heat is expected to be available (boolean value) +#heat = false -# Whether or not nova is expected to be available (boolean -# value) -#nova=true +# Whether or not Horizon is expected to be available (boolean value) +#horizon = true -# Whether or not Heat is expected to be available (boolean -# value) -#heat=false +# Whether or not Ironic is expected to be available (boolean value) +#ironic = false -# Whether or not Ceilometer is expected to be available -# (boolean value) -#ceilometer=true +# Whether or not neutron is expected to be available (boolean value) +#neutron = false -# Whether or not Horizon is expected to be available (boolean -# value) -#horizon=true +# Whether or not nova is expected to be available (boolean value) +#nova = true -# Whether or not Sahara is expected to be available (boolean -# value) -#sahara=false +# Whether or not Sahara is expected to be available (boolean value) +#sahara = false -# Whether or not Ironic is expected to be available (boolean -# value) -#ironic=false +# Whether or not swift is expected to be available (boolean value) +#swift = true -# Whether or not Trove is expected to be available (boolean -# value) -#trove=false +# Whether or not Trove is expected to be available (boolean value) +#trove = false -# Whether or not Zaqar is expected to be available (boolean -# value) -#zaqar=false +# Whether or not Zaqar is expected to be available (boolean value) +#zaqar = false [stress] # -# Options defined in tempest.config +# From tempest.config # -# Directory containing log files on the compute nodes (string -# value) -#nova_logdir= +# Controller host. (string value) +#controller = -# Maximum number of instances to create during test. (integer -# value) -#max_instances=16 +# The number of threads created while stress test. (integer value) +#default_thread_number_per_action = 4 + +# Allows a full cleaning process after a stress test. Caution : this +# cleanup will remove every objects of every tenant. (boolean value) +#full_clean_stack = false + +# Prevent the cleaning (tearDownClass()) between each stress test run +# if an exception occurs during this run. (boolean value) +#leave_dirty_stack = false + +# time (in seconds) between log file error checks. (integer value) +#log_check_interval = 60 + +# Maximum number of instances to create during test. (integer value) +#max_instances = 16 + +# Directory containing log files on the compute nodes (string value) +#nova_logdir = # Controller host. (string value) -#controller= - -# Controller host. (string value) -#target_controller= - -# ssh user. (string value) -#target_ssh_user= - -# Path to private key. (string value) -#target_private_key_path= +#target_controller = # regexp for list of log files. (string value) -#target_logfiles= +#target_logfiles = -# time (in seconds) between log file error checks. (integer -# value) -#log_check_interval=60 +# Path to private key. (string value) +#target_private_key_path = -# The number of threads created while stress test. (integer -# value) -#default_thread_number_per_action=4 - -# Prevent the cleaning (tearDownClass()) between each stress -# test run if an exception occurs during this run. (boolean -# value) -#leave_dirty_stack=false - -# Allows a full cleaning process after a stress test. Caution -# : this cleanup will remove every objects of every tenant. -# (boolean value) -#full_clean_stack=false +# ssh user. (string value) +#target_ssh_user = [telemetry] # -# Options defined in tempest.config +# From tempest.config # # Catalog type of the Telemetry service. (string value) -#catalog_type=metering +#catalog_type = metering -# The endpoint type to use for the telemetry service. (string +# The endpoint type to use for the telemetry service. (string value) +#endpoint_type = publicURL + +# This variable is used as flag to enable notification tests (boolean # value) -#endpoint_type=publicURL - -# This variable is used as flag to enable notification tests -# (boolean value) -#too_slow_to_test=true +#too_slow_to_test = true [volume] # -# Options defined in tempest.config +# From tempest.config # -# Time in seconds between volume availability checks. (integer +# Name of the backend1 (must be declared in cinder.conf) (string # value) -#build_interval=1 +#backend1_name = BACKEND_1 + +# Name of the backend2 (must be declared in cinder.conf) (string +# value) +#backend2_name = BACKEND_2 + +# Time in seconds between volume availability checks. (integer value) +#build_interval = 1 # Timeout in seconds to wait for a volume to become available. # (integer value) -#build_timeout=300 +#build_timeout = 300 # Catalog type of the Volume Service (string value) -#catalog_type=volume +#catalog_type = volume + +# Disk format to use when copying a volume to image (string value) +#disk_format = raw + +# The endpoint type to use for the volume service. (string value) +#endpoint_type = publicURL # The volume region name to use. If empty, the value of -# identity.region is used instead. If no such region is found -# in the service catalog, the first found one is used. (string +# identity.region is used instead. If no such region is found in the +# service catalog, the first found one is used. (string value) +#region = + +# Backend protocol to target when creating volume types (string value) +#storage_protocol = iSCSI + +# Backend vendor to target when creating volume types (string value) +#vendor_name = Open Source + +# Default size in GB for volumes created by volumes tests (integer # value) -#region= - -# The endpoint type to use for the volume service. (string -# value) -#endpoint_type=publicURL - -# Name of the backend1 (must be declared in cinder.conf) -# (string value) -#backend1_name=BACKEND_1 - -# Name of the backend2 (must be declared in cinder.conf) -# (string value) -#backend2_name=BACKEND_2 - -# Backend protocol to target when creating volume types -# (string value) -#storage_protocol=iSCSI - -# Backend vendor to target when creating volume types (string -# value) -#vendor_name=Open Source - -# Disk format to use when copying a volume to image (string -# value) -#disk_format=raw - -# Default size in GB for volumes created by volumes tests -# (integer value) -#volume_size=1 +#volume_size = 1 [volume-feature-enabled] # -# Options defined in tempest.config +# From tempest.config # -# Runs Cinder multi-backend test (requires 2 backends) -# (boolean value) -#multi_backend=false - -# Runs Cinder volumes backup test (boolean value) -#backup=true - -# Runs Cinder volume snapshot test (boolean value) -#snapshot=true - -# A list of enabled volume extensions with a special entry all -# which indicates every extension is enabled. Empty list -# indicates all extensions are disabled (list value) -#api_extensions=all +# A list of enabled volume extensions with a special entry all which +# indicates every extension is enabled. Empty list indicates all +# extensions are disabled (list value) +#api_extensions = all # Is the v1 volume API enabled (boolean value) -#api_v1=true +#api_v1 = true # Is the v2 volume API enabled (boolean value) -#api_v2=true +#api_v2 = true +# Runs Cinder volumes backup test (boolean value) +#backup = true +# Runs Cinder multi-backend test (requires 2 backends) (boolean value) +#multi_backend = false + +# Runs Cinder volume snapshot test (boolean value) +#snapshot = true diff --git a/openstack-common.conf b/openstack-common.conf index a9a6b0b4ec..5ae2089366 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -1,7 +1,6 @@ [DEFAULT] # The list of modules to copy from openstack-common -module=config module=install_venv_common module=lockutils module=log diff --git a/run_tests.sh b/run_tests.sh index a12bf468af..971f89bd37 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -103,8 +103,6 @@ function run_pep8 { echo "Running flake8 without virtual env may miss OpenStack HACKING detection" >&2 fi ${wrapper} flake8 - export MODULEPATH=tempest.common.generate_sample_tempest - ${wrapper} tools/config/check_uptodate.sh } if [ $never_venv -eq 0 ] diff --git a/setup.cfg b/setup.cfg index 2e25aceb4b..d010ccc7be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,9 @@ console_scripts = run-tempest-stress = tempest.cmd.run_stress:main tempest-cleanup = tempest.cmd.cleanup:main +oslo.config.opts = + tempest.config = tempest.config:list_opts + [build_sphinx] all_files = 1 build-dir = doc/build diff --git a/tempest/common/generate_sample_tempest.py b/tempest/common/generate_sample_tempest.py deleted file mode 100644 index ceb3394b23..0000000000 --- a/tempest/common/generate_sample_tempest.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2013 IBM Corp. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -import sys - -import tempest.config -from tempest.openstack.common.config import generator - -# NOTE(mtreinish): This hack is needed because of how oslo config is used in -# tempest. Tempest is run from inside a test runner and so we can't rely on the -# global CONF object being fully populated when we run a test. (test runners -# don't init every file for running a test) So to get around that we manually -# load the config file in tempest for each test class to ensure that every -# config option is set. However, the tool expects the CONF object to be fully -# populated when it inits all the files in the project. This just works around -# the issue by manually loading the config file (which may or may not exist) -# which will populate all the options before running the generator. - - -if __name__ == "__main__": - tempest.config.register_opts() - generator.generate(sys.argv[1:]) diff --git a/tempest/config.py b/tempest/config.py index 6a41f247a4..d8f22d4465 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -20,6 +20,7 @@ import os from oslo.config import cfg +from tempest.openstack.common import lockutils from tempest.openstack.common import log as logging @@ -1027,44 +1028,60 @@ NegativeGroup = [ help="Test generator class for all negative tests"), ] +_opts = [ + (auth_group, AuthGroup), + (compute_group, ComputeGroup), + (compute_features_group, ComputeFeaturesGroup), + (identity_group, IdentityGroup), + (identity_feature_group, IdentityFeatureGroup), + (image_group, ImageGroup), + (image_feature_group, ImageFeaturesGroup), + (network_group, NetworkGroup), + (network_feature_group, NetworkFeaturesGroup), + (messaging_group, MessagingGroup), + (volume_group, VolumeGroup), + (volume_feature_group, VolumeFeaturesGroup), + (object_storage_group, ObjectStoreGroup), + (object_storage_feature_group, ObjectStoreFeaturesGroup), + (database_group, DatabaseGroup), + (orchestration_group, OrchestrationGroup), + (telemetry_group, TelemetryGroup), + (dashboard_group, DashboardGroup), + (data_processing_group, DataProcessingGroup), + (boto_group, BotoGroup), + (compute_admin_group, ComputeAdminGroup), + (stress_group, StressGroup), + (scenario_group, ScenarioGroup), + (service_available_group, ServiceAvailableGroup), + (debug_group, DebugGroup), + (baremetal_group, BaremetalGroup), + (input_scenario_group, InputScenarioGroup), + (cli_group, CLIGroup), + (negative_group, NegativeGroup) +] + def register_opts(): - register_opt_group(cfg.CONF, auth_group, AuthGroup) - register_opt_group(cfg.CONF, compute_group, ComputeGroup) - register_opt_group(cfg.CONF, compute_features_group, - ComputeFeaturesGroup) - register_opt_group(cfg.CONF, identity_group, IdentityGroup) - register_opt_group(cfg.CONF, identity_feature_group, - IdentityFeatureGroup) - register_opt_group(cfg.CONF, image_group, ImageGroup) - register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup) - register_opt_group(cfg.CONF, network_group, NetworkGroup) - register_opt_group(cfg.CONF, network_feature_group, - NetworkFeaturesGroup) - register_opt_group(cfg.CONF, messaging_group, MessagingGroup) - register_opt_group(cfg.CONF, volume_group, VolumeGroup) - register_opt_group(cfg.CONF, volume_feature_group, - VolumeFeaturesGroup) - register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup) - register_opt_group(cfg.CONF, object_storage_feature_group, - ObjectStoreFeaturesGroup) - register_opt_group(cfg.CONF, database_group, DatabaseGroup) - register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup) - register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup) - register_opt_group(cfg.CONF, dashboard_group, DashboardGroup) - register_opt_group(cfg.CONF, data_processing_group, - DataProcessingGroup) - register_opt_group(cfg.CONF, boto_group, BotoGroup) - register_opt_group(cfg.CONF, compute_admin_group, ComputeAdminGroup) - register_opt_group(cfg.CONF, stress_group, StressGroup) - register_opt_group(cfg.CONF, scenario_group, ScenarioGroup) - register_opt_group(cfg.CONF, service_available_group, - ServiceAvailableGroup) - register_opt_group(cfg.CONF, debug_group, DebugGroup) - register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup) - register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup) - register_opt_group(cfg.CONF, cli_group, CLIGroup) - register_opt_group(cfg.CONF, negative_group, NegativeGroup) + for g, o in _opts: + register_opt_group(cfg.CONF, g, o) + + +def list_opts(): + """Return a list of oslo.config options available. + + The purpose of this is to allow tools like the Oslo sample config file + generator to discover the options exposed to users. + """ + optlist = [(g.name, o) for g, o in _opts] + + # NOTE(jgrimm): Can be removed once oslo-incubator/oslo changes happen. + optlist.append((None, lockutils.util_opts)) + optlist.append((None, logging.common_cli_opts)) + optlist.append((None, logging.logging_cli_opts)) + optlist.append((None, logging.generic_log_opts)) + optlist.append((None, logging.log_opts)) + + return optlist # this should never be called outside of this class diff --git a/tempest/openstack/common/config/__init__.py b/tempest/openstack/common/config/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tempest/openstack/common/config/generator.py b/tempest/openstack/common/config/generator.py deleted file mode 100644 index 664200e241..0000000000 --- a/tempest/openstack/common/config/generator.py +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 2012 SINA Corporation -# Copyright 2014 Cisco Systems, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -"""Extracts OpenStack config option info from module(s).""" - -from __future__ import print_function - -import argparse -import imp -import os -import re -import socket -import sys -import textwrap - -from oslo.config import cfg -import six -import stevedore.named - -from tempest.openstack.common import gettextutils -from tempest.openstack.common import importutils - -gettextutils.install('tempest') - -STROPT = "StrOpt" -BOOLOPT = "BoolOpt" -INTOPT = "IntOpt" -FLOATOPT = "FloatOpt" -LISTOPT = "ListOpt" -DICTOPT = "DictOpt" -MULTISTROPT = "MultiStrOpt" - -OPT_TYPES = { - STROPT: 'string value', - BOOLOPT: 'boolean value', - INTOPT: 'integer value', - FLOATOPT: 'floating point value', - LISTOPT: 'list value', - DICTOPT: 'dict value', - MULTISTROPT: 'multi valued', -} - -OPTION_REGEX = re.compile(r"(%s)" % "|".join([STROPT, BOOLOPT, INTOPT, - FLOATOPT, LISTOPT, DICTOPT, - MULTISTROPT])) - -PY_EXT = ".py" -BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), - "../../../../")) -WORDWRAP_WIDTH = 60 - - -def raise_extension_exception(extmanager, ep, err): - raise - - -def generate(argv): - parser = argparse.ArgumentParser( - description='generate sample configuration file', - ) - parser.add_argument('-m', dest='modules', action='append') - parser.add_argument('-l', dest='libraries', action='append') - parser.add_argument('srcfiles', nargs='*') - parsed_args = parser.parse_args(argv) - - mods_by_pkg = dict() - for filepath in parsed_args.srcfiles: - pkg_name = filepath.split(os.sep)[1] - mod_str = '.'.join(['.'.join(filepath.split(os.sep)[:-1]), - os.path.basename(filepath).split('.')[0]]) - mods_by_pkg.setdefault(pkg_name, list()).append(mod_str) - # NOTE(lzyeval): place top level modules before packages - pkg_names = sorted(pkg for pkg in mods_by_pkg if pkg.endswith(PY_EXT)) - ext_names = sorted(pkg for pkg in mods_by_pkg if pkg not in pkg_names) - pkg_names.extend(ext_names) - - # opts_by_group is a mapping of group name to an options list - # The options list is a list of (module, options) tuples - opts_by_group = {'DEFAULT': []} - - if parsed_args.modules: - for module_name in parsed_args.modules: - module = _import_module(module_name) - if module: - for group, opts in _list_opts(module): - opts_by_group.setdefault(group, []).append((module_name, - opts)) - - # Look for entry points defined in libraries (or applications) for - # option discovery, and include their return values in the output. - # - # Each entry point should be a function returning an iterable - # of pairs with the group name (or None for the default group) - # and the list of Opt instances for that group. - if parsed_args.libraries: - loader = stevedore.named.NamedExtensionManager( - 'oslo.config.opts', - names=list(set(parsed_args.libraries)), - invoke_on_load=False, - on_load_failure_callback=raise_extension_exception - ) - for ext in loader: - for group, opts in ext.plugin(): - opt_list = opts_by_group.setdefault(group or 'DEFAULT', []) - opt_list.append((ext.name, opts)) - - for pkg_name in pkg_names: - mods = mods_by_pkg.get(pkg_name) - mods.sort() - for mod_str in mods: - if mod_str.endswith('.__init__'): - mod_str = mod_str[:mod_str.rfind(".")] - - mod_obj = _import_module(mod_str) - if not mod_obj: - raise RuntimeError("Unable to import module %s" % mod_str) - - for group, opts in _list_opts(mod_obj): - opts_by_group.setdefault(group, []).append((mod_str, opts)) - - print_group_opts('DEFAULT', opts_by_group.pop('DEFAULT', [])) - for group in sorted(opts_by_group.keys()): - print_group_opts(group, opts_by_group[group]) - - -def _import_module(mod_str): - try: - if mod_str.startswith('bin.'): - imp.load_source(mod_str[4:], os.path.join('bin', mod_str[4:])) - return sys.modules[mod_str[4:]] - else: - return importutils.import_module(mod_str) - except Exception as e: - sys.stderr.write("Error importing module %s: %s\n" % (mod_str, str(e))) - return None - - -def _is_in_group(opt, group): - """Check if opt is in group.""" - for value in group._opts.values(): - # NOTE(llu): Temporary workaround for bug #1262148, wait until - # newly released oslo.config support '==' operator. - if not(value['opt'] != opt): - return True - return False - - -def _guess_groups(opt): - # is it in the DEFAULT group? - if _is_in_group(opt, cfg.CONF): - return 'DEFAULT' - - # what other groups is it in? - for value in cfg.CONF.values(): - if isinstance(value, cfg.CONF.GroupAttr): - if _is_in_group(opt, value._group): - return value._group.name - - raise RuntimeError( - "Unable to find group for option %s, " - "maybe it's defined twice in the same group?" - % opt.name - ) - - -def _list_opts(obj): - def is_opt(o): - return (isinstance(o, cfg.Opt) and - not isinstance(o, cfg.SubCommandOpt)) - - opts = list() - for attr_str in dir(obj): - attr_obj = getattr(obj, attr_str) - if is_opt(attr_obj): - opts.append(attr_obj) - elif (isinstance(attr_obj, list) and - all(map(lambda x: is_opt(x), attr_obj))): - opts.extend(attr_obj) - - ret = {} - for opt in opts: - ret.setdefault(_guess_groups(opt), []).append(opt) - return ret.items() - - -def print_group_opts(group, opts_by_module): - print("[%s]" % group) - print('') - for mod, opts in opts_by_module: - print('#') - print('# Options defined in %s' % mod) - print('#') - print('') - for opt in opts: - _print_opt(opt) - print('') - - -def _get_my_ip(): - try: - csock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - csock.connect(('8.8.8.8', 80)) - (addr, port) = csock.getsockname() - csock.close() - return addr - except socket.error: - return None - - -def _sanitize_default(name, value): - """Set up a reasonably sensible default for pybasedir, my_ip and host.""" - hostname = socket.gethostname() - fqdn = socket.getfqdn() - if value.startswith(sys.prefix): - # NOTE(jd) Don't use os.path.join, because it is likely to think the - # second part is an absolute pathname and therefore drop the first - # part. - value = os.path.normpath("/usr/" + value[len(sys.prefix):]) - elif value.startswith(BASEDIR): - return value.replace(BASEDIR, '/usr/lib/python/site-packages') - elif BASEDIR in value: - return value.replace(BASEDIR, '') - elif value == _get_my_ip(): - return '10.0.0.1' - elif value in (hostname, fqdn): - if 'host' in name: - return 'tempest' - elif value.endswith(hostname): - return value.replace(hostname, 'tempest') - elif value.endswith(fqdn): - return value.replace(fqdn, 'tempest') - elif value.strip() != value: - return '"%s"' % value - return value - - -def _print_opt(opt): - opt_name, opt_default, opt_help = opt.dest, opt.default, opt.help - if not opt_help: - sys.stderr.write('WARNING: "%s" is missing help string.\n' % opt_name) - opt_help = "" - try: - opt_type = OPTION_REGEX.search(str(type(opt))).group(0) - except (ValueError, AttributeError) as err: - sys.stderr.write("%s\n" % str(err)) - sys.exit(1) - opt_help = u'%s (%s)' % (opt_help, - OPT_TYPES[opt_type]) - print('#', "\n# ".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH))) - if opt.deprecated_opts: - for deprecated_opt in opt.deprecated_opts: - if deprecated_opt.name: - deprecated_group = (deprecated_opt.group if - deprecated_opt.group else "DEFAULT") - print('# Deprecated group/name - [%s]/%s' % - (deprecated_group, - deprecated_opt.name)) - try: - if opt_default is None: - print('#%s=' % opt_name) - elif opt_type == STROPT: - assert(isinstance(opt_default, six.string_types)) - print('#%s=%s' % (opt_name, _sanitize_default(opt_name, - opt_default))) - elif opt_type == BOOLOPT: - assert(isinstance(opt_default, bool)) - print('#%s=%s' % (opt_name, str(opt_default).lower())) - elif opt_type == INTOPT: - assert(isinstance(opt_default, int) and - not isinstance(opt_default, bool)) - print('#%s=%s' % (opt_name, opt_default)) - elif opt_type == FLOATOPT: - assert(isinstance(opt_default, float)) - print('#%s=%s' % (opt_name, opt_default)) - elif opt_type == LISTOPT: - assert(isinstance(opt_default, list)) - print('#%s=%s' % (opt_name, ','.join(opt_default))) - elif opt_type == DICTOPT: - assert(isinstance(opt_default, dict)) - opt_default_strlist = [str(key) + ':' + str(value) - for (key, value) in opt_default.items()] - print('#%s=%s' % (opt_name, ','.join(opt_default_strlist))) - elif opt_type == MULTISTROPT: - assert(isinstance(opt_default, list)) - if not opt_default: - opt_default = [''] - for default in opt_default: - print('#%s=%s' % (opt_name, default)) - print('') - except Exception: - sys.stderr.write('Error in option "%s"\n' % opt_name) - sys.exit(1) - - -def main(): - generate(sys.argv[1:]) - -if __name__ == '__main__': - main() diff --git a/tools/config/check_uptodate.sh b/tools/config/check_uptodate.sh index 0f0d77ef66..7b08695c8f 100755 --- a/tools/config/check_uptodate.sh +++ b/tools/config/check_uptodate.sh @@ -15,7 +15,7 @@ fi TEMPDIR=`mktemp -d /tmp/${PROJECT_NAME}.XXXXXX` trap "rm -rf $TEMPDIR" EXIT -tools/config/generate_sample.sh -b ./ -p ${PROJECT_NAME} -o ${TEMPDIR} +oslo-config-generator --config-file tools/config/config-generator.tempest.conf --output-file ${TEMPDIR}/${CFGFILE_NAME} if [ $? != 0 ] then exit 1 @@ -24,6 +24,6 @@ fi if ! diff -u ${TEMPDIR}/${CFGFILE_NAME} ${CFGFILE} then echo "${0##*/}: ${PROJECT_NAME}.conf.sample is not up to date." - echo "${0##*/}: Please run ${0%%${0##*/}}generate_sample.sh." + echo "${0##*/}: Please run tox -egenconfig." exit 1 fi diff --git a/tools/config/config-generator.tempest.conf b/tools/config/config-generator.tempest.conf new file mode 100644 index 0000000000..e5a02f85f0 --- /dev/null +++ b/tools/config/config-generator.tempest.conf @@ -0,0 +1,3 @@ +[DEFAULT] +output_file = etc/tempest.conf.sample +namespace = tempest.config diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh deleted file mode 100755 index d22b2f0cd0..0000000000 --- a/tools/config/generate_sample.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env bash - -# Generate sample configuration for your project. -# -# Aside from the command line flags, it also respects a config file which -# should be named oslo.config.generator.rc and be placed in the same directory. -# -# You can then export the following variables: -# TEMPEST_CONFIG_GENERATOR_EXTRA_MODULES: list of modules to interrogate for options. -# TEMPEST_CONFIG_GENERATOR_EXTRA_LIBRARIES: list of libraries to discover. -# TEMPEST_CONFIG_GENERATOR_EXCLUDED_FILES: list of files to remove from automatic listing. - -print_hint() { - echo "Try \`${0##*/} --help' for more information." >&2 -} - -PARSED_OPTIONS=$(getopt -n "${0##*/}" -o hb:p:m:l:o: \ - --long help,base-dir:,package-name:,output-dir:,module:,library: -- "$@") - -if [ $? != 0 ] ; then print_hint ; exit 1 ; fi - -eval set -- "$PARSED_OPTIONS" - -while true; do - case "$1" in - -h|--help) - echo "${0##*/} [options]" - echo "" - echo "options:" - echo "-h, --help show brief help" - echo "-b, --base-dir=DIR project base directory" - echo "-p, --package-name=NAME project package name" - echo "-o, --output-dir=DIR file output directory" - echo "-m, --module=MOD extra python module to interrogate for options" - echo "-l, --library=LIB extra library that registers options for discovery" - exit 0 - ;; - -b|--base-dir) - shift - BASEDIR=`echo $1 | sed -e 's/\/*$//g'` - shift - ;; - -p|--package-name) - shift - PACKAGENAME=`echo $1` - shift - ;; - -o|--output-dir) - shift - OUTPUTDIR=`echo $1 | sed -e 's/\/*$//g'` - shift - ;; - -m|--module) - shift - MODULES="$MODULES -m $1" - shift - ;; - -l|--library) - shift - LIBRARIES="$LIBRARIES -l $1" - shift - ;; - --) - break - ;; - esac -done - -BASEDIR=${BASEDIR:-`pwd`} -if ! [ -d $BASEDIR ] -then - echo "${0##*/}: missing project base directory" >&2 ; print_hint ; exit 1 -elif [[ $BASEDIR != /* ]] -then - BASEDIR=$(cd "$BASEDIR" && pwd) -fi - -PACKAGENAME=${PACKAGENAME:-$(python setup.py --name)} -TARGETDIR=$BASEDIR/$PACKAGENAME -if ! [ -d $TARGETDIR ] -then - echo "${0##*/}: invalid project package name" >&2 ; print_hint ; exit 1 -fi - -OUTPUTDIR=${OUTPUTDIR:-$BASEDIR/etc} -# NOTE(bnemec): Some projects put their sample config in etc/, -# some in etc/$PACKAGENAME/ -if [ -d $OUTPUTDIR/$PACKAGENAME ] -then - OUTPUTDIR=$OUTPUTDIR/$PACKAGENAME -elif ! [ -d $OUTPUTDIR ] -then - echo "${0##*/}: cannot access \`$OUTPUTDIR': No such file or directory" >&2 - exit 1 -fi - -BASEDIRESC=`echo $BASEDIR | sed -e 's/\//\\\\\//g'` -find $TARGETDIR -type f -name "*.pyc" -delete -FILES=$(find $TARGETDIR -type f -name "*.py" ! -path "*/tests/*" \ - -exec grep -l "Opt(" {} + | sed -e "s/^$BASEDIRESC\///g" | sort -u) - -RC_FILE="`dirname $0`/oslo.config.generator.rc" -if test -r "$RC_FILE" -then - source "$RC_FILE" -fi - -for filename in ${TEMPEST_CONFIG_GENERATOR_EXCLUDED_FILES}; do - FILES="${FILES[@]/$filename/}" -done - -for mod in ${TEMPEST_CONFIG_GENERATOR_EXTRA_MODULES}; do - MODULES="$MODULES -m $mod" -done - -for lib in ${TEMPEST_CONFIG_GENERATOR_EXTRA_LIBRARIES}; do - LIBRARIES="$LIBRARIES -l $lib" -done - -export EVENTLET_NO_GREENDNS=yes - -OS_VARS=$(set | sed -n '/^OS_/s/=[^=]*$//gp' | xargs) -[ "$OS_VARS" ] && eval "unset \$OS_VARS" -DEFAULT_MODULEPATH=tempest.openstack.common.config.generator -MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH} -OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample -python -m $MODULEPATH $MODULES $LIBRARIES $FILES > $OUTPUTFILE -if [ $? != 0 ] -then - echo "Can not generate $OUTPUTFILE" - exit 1 -fi - -# Hook to allow projects to append custom config file snippets -CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null) -for CONCAT_FILE in $CONCAT_FILES; do - cat $CONCAT_FILE >> $OUTPUTFILE -done diff --git a/tools/config/oslo.config.generator.rc b/tools/config/oslo.config.generator.rc deleted file mode 100644 index 303e1561c7..0000000000 --- a/tools/config/oslo.config.generator.rc +++ /dev/null @@ -1 +0,0 @@ -MODULEPATH=tempest.common.generate_sample_tempest diff --git a/tox.ini b/tox.ini index 262a27e588..c07dbbf963 100644 --- a/tox.ini +++ b/tox.ini @@ -19,6 +19,9 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = bash tools/pretty_tox.sh '{posargs}' +[testenv:genconfig] +commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf + [testenv:cover] setenv = OS_TEST_PATH=./tempest/tests commands = python setup.py testr --coverage --testr-arg='tempest\.tests {posargs}'