Merge "Use tempest.conf when running under tempest"

This commit is contained in:
Jenkins 2016-08-23 06:54:29 +00:00 committed by Gerrit Code Review
commit 9c8e321020
2 changed files with 11 additions and 5 deletions

View File

@ -16,6 +16,8 @@ from oslo_config import cfg
import heat_integrationtests
_CONF = None
service_available_group = cfg.OptGroup(name="service_available",
title="Available OpenStack Services")
@ -162,6 +164,9 @@ HeatGroup = [
def init_conf(read_conf=True):
global _CONF
if _CONF:
return _CONF
default_config_files = None
if read_conf:
@ -171,13 +176,13 @@ def init_conf(read_conf=True):
if os.path.isfile(confpath):
default_config_files = [confpath]
conf = cfg.ConfigOpts()
conf(args=[], project='heat_integrationtests',
default_config_files=default_config_files)
_CONF = cfg.ConfigOpts()
_CONF(args=[], project='heat_integrationtests',
default_config_files=default_config_files)
for group, opts in list_opts():
conf.register_opts(opts, group=group)
return conf
_CONF.register_opts(opts, group=group)
return _CONF
def list_opts():

View File

@ -33,6 +33,7 @@ class HeatTempestPlugin(plugins.TempestPlugin):
heat_config.ServiceAvailableGroup)
config.register_opt_group(conf, heat_config.heat_group,
heat_config.HeatGroup)
heat_config._CONF = config.CONF
def get_opt_lists(self):
return [(heat_config.heat_group.name,