Files
monasca-tempest-plugin/monasca_tempest_tests/clients/log_api.py
Doug Szumski 4e5cab3fb8 Improve configurability of Tempest tests
Adds basic support for configuring various parts of the tests to
make it easier to use them in environments which are configured
differently to DevStack. Specifically in this case the motivation
is to run the Monasca Tempest tests in Kolla CI.

This should be a NOOP change for existing environments.

Change-Id: If6be3a4d54a7b10c3ff40f9ed34045c50ffc3bae
2020-07-30 09:46:33 +00:00

39 lines
1.2 KiB
Python

# Copyright 2015-2016 FUJITSU LIMITED
#
# 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.
from tempest import clients
from tempest import config
from monasca_tempest_tests.services import elasticsearch_client
from monasca_tempest_tests.services import log_api_v3_client
CONF = config.CONF
class Manager(clients.Manager):
def __init__(self, credentials=None):
super(Manager, self).__init__(credentials)
self.log_api_client = log_api_v3_client.LogApiV3Client(
self.auth_provider,
CONF.monitoring.catalog_type_logs,
None
)
self.log_search_client = elasticsearch_client.ElasticsearchClient(
self.auth_provider,
CONF.monitoring.catalog_type_log_query,
None
)