Add dashboard override

This commit is contained in:
Mohammed Naser 2020-08-16 14:16:20 -04:00
parent 19ed2eae31
commit 7c359241f2
3 changed files with 17 additions and 3 deletions

View File

@ -16,5 +16,8 @@ Usage
You can use the Docker container which is published to ``vexxhost/tempest-pushgateway``
and provide your OpenStack creentials in the environment, alternatively you can
simply install this locally and call ``tempest-pushgateway`` directly. The
only requirement is to set ``TEMPEST_PROMETHEUS`` environment variable to point
towards your Prometheus Pushgateway.
tool is entirely configured using environment variables:
- ``TEMPEST_PROMETHEUS`` (required): Prometheus Pushgateway address
- ``TEMPEST_HORIZON_URL``: URL for Horizon if ``python-tempestconf`` fails to
detect it.

View File

@ -97,11 +97,21 @@ def main():
tempest_conf = tempfile.NamedTemporaryFile(mode='w+')
accounts_file = tempfile.NamedTemporaryFile(mode='w+')
overrides = [
('validation', 'connect_method', 'fixed'),
]
if os.getenv('TEMPEST_HORIZON_URL'):
url = os.getenv('TEMPEST_HORIZON_URL')
overrides.append(('service_available', 'horizon', 'True'))
overrides.append(('dashboard', 'dashboard_url', url))
overrides.append(('dashboard', 'login_url', url + '/auth/login/'))
cloud_creds = tempestconf.get_cloud_creds(args)
tempestconf.config_tempest(
cloud_creds=cloud_creds, convert_to_raw=True,
create_accounts_file=accounts_file.name, debug=True, non_admin=True,
out=tempest_conf.name, remove=[
out=tempest_conf.name, overrides=overrides, remove=[
'network.floating_network_name'
]
)

View File

@ -2,6 +2,7 @@
usedevelop = True
passenv =
OS_*
TEMPEST_*
deps =
-rtest-requirements.txt
-rrequirements.txt