deb-mistral/mistral/tests/integration/contrib/config.py
Sergey Murashov 6aff5394dc Add integration tests
Change-Id: I0873da3f0ddc73722f3d8506fde463da9d39cea9
2014-01-24 12:20:53 +04:00

41 lines
1.1 KiB
Python

import os
from oslo.config import cfg
mistral_group = cfg.OptGroup(name='mistral', title='mistral')
MistralGroup = [
cfg.StrOpt('auth_url',
default='http://127.0.0.1:5000/v2.0/',
help="keystone url"),
cfg.StrOpt('mistral_url',
default='http://127.0.0.1:8084',
help="mistral url"),
cfg.StrOpt('user',
default='admin',
help="keystone user"),
cfg.StrOpt('password',
default='password',
help="password for keystone user"),
cfg.StrOpt('tenant',
default='admin',
help='keystone tenant'),
cfg.BoolOpt('service_available',
default='True',
help='mistral available')
]
def register_config(config, config_group, config_opts):
config.register_group(config_group)
config.register_opts(config_opts, config_group)
path = os.path.join("%s/config.conf" % os.getcwd())
if os.path.exists(path):
cfg.CONF([], project='mistralintegration', default_config_files=[path])
register_config(cfg.CONF, mistral_group, MistralGroup)
mistral = cfg.CONF.mistral