Andrea Frittoli (andreaf) | 369391a | 2016-06-27 18:59:13 +0100 | [diff] [blame] | 1 | # Copyright (c) 2016 Hewlett-Packard Enterprise Development Company, L.P. |
| 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 |
| 16 | from tempest.lib.services import clients |
| 17 | |
| 18 | |
| 19 | CONF = config.CONF |
| 20 | |
| 21 | |
| 22 | class Clients(clients.ServiceClients): |
| 23 | """Tempest stable service clients and loaded plugins service clients""" |
| 24 | |
| 25 | def __init__(self, credentials, service=None): |
| 26 | """Emulate the interface of Tempest's clients.Manager""" |
| 27 | # Identity settings |
| 28 | if CONF.identity.auth_version == 'v2': |
| 29 | identity_uri = CONF.identity.uri |
| 30 | else: |
| 31 | identity_uri = CONF.identity.uri_v3 |
| 32 | super(Clients, self).__init__(credentials, identity_uri) |