blob: 6808da4df6df26d9d47cc20dc039a46043f35cbc [file] [log] [blame]
Marc Kodererc832c612016-12-12 11:49:10 +01001# Copyright (c) 2016 SAP SE
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15from tempest import config
dane-fichter5af45592017-02-08 17:29:53 -080016from tempest.lib.services import clients as cli
Marc Kodererc832c612016-12-12 11:49:10 +010017
18CONF = config.CONF
19
dane-fichter5af45592017-02-08 17:29:53 -080020
21class Clients(cli.ServiceClients):
Marc Kodererc832c612016-12-12 11:49:10 +010022 """Tempest stable service clients and loaded plugins service clients"""
23
24 def __init__(self, credentials, service=None):
25 """Emulate the interface of Tempest's clients.Manager"""
26 # Identity settings
27 if CONF.identity.auth_version == 'v2':
28 identity_uri = CONF.identity.uri
29 else:
30 identity_uri = CONF.identity.uri_v3
31 super(Clients, self).__init__(credentials, identity_uri)