Marc Koderer | c832c61 | 2016-12-12 11:49:10 +0100 | [diff] [blame] | 1 | # 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 | |
| 15 | from tempest import config |
dane-fichter | 5af4559 | 2017-02-08 17:29:53 -0800 | [diff] [blame] | 16 | from tempest.lib.services import clients as cli |
Marc Koderer | c832c61 | 2016-12-12 11:49:10 +0100 | [diff] [blame] | 17 | |
| 18 | CONF = config.CONF |
| 19 | |
dane-fichter | 5af4559 | 2017-02-08 17:29:53 -0800 | [diff] [blame] | 20 | |
| 21 | class Clients(cli.ServiceClients): |
Marc Koderer | c832c61 | 2016-12-12 11:49:10 +0100 | [diff] [blame] | 22 | """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) |