Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 1 | # Copyright 2014 Mirantis Inc. |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | from tempest import clients |
| 17 | from tempest.common import cred_provider |
| 18 | |
| 19 | from manila_tempest_tests.services.share.json import shares_client |
Clinton Knight | e5c8f09 | 2015-08-27 15:00:23 -0400 | [diff] [blame^] | 20 | from manila_tempest_tests.services.share.v2.json import shares_client \ |
| 21 | as shares_v2_client |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 22 | |
| 23 | |
| 24 | class Manager(clients.Manager): |
| 25 | def __init__(self, credentials=None, service=None): |
| 26 | super(Manager, self).__init__(credentials, service) |
| 27 | self.shares_client = shares_client.SharesClient(self.auth_provider) |
Clinton Knight | e5c8f09 | 2015-08-27 15:00:23 -0400 | [diff] [blame^] | 28 | self.shares_v2_client = shares_v2_client.SharesV2Client( |
| 29 | self.auth_provider) |
Marc Koderer | 0abc93b | 2015-07-15 09:18:35 +0200 | [diff] [blame] | 30 | |
| 31 | |
| 32 | class AltManager(Manager): |
| 33 | def __init__(self, service=None): |
| 34 | super(AltManager, self).__init__( |
| 35 | cred_provider.get_configured_credentials('alt_user'), service) |
| 36 | |
| 37 | |
| 38 | class AdminManager(Manager): |
| 39 | def __init__(self, service=None): |
| 40 | super(AdminManager, self).__init__( |
| 41 | cred_provider.get_configured_credentials('identity_admin'), |
| 42 | service) |