blob: 023aa607cd06c43d06707c54f23ea04a4928e831 [file] [log] [blame]
Marc Koderer0abc93b2015-07-15 09:18:35 +02001# 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
16from tempest import clients
Sam Wanc7b7f1f2015-11-25 00:22:28 -050017from tempest.common import credentials_factory as common_creds
Marc Koderer0abc93b2015-07-15 09:18:35 +020018
19from manila_tempest_tests.services.share.json import shares_client
Clinton Knighte5c8f092015-08-27 15:00:23 -040020from manila_tempest_tests.services.share.v2.json import shares_client \
21 as shares_v2_client
Marc Koderer0abc93b2015-07-15 09:18:35 +020022
23
24class Manager(clients.Manager):
Sam Wanc7b7f1f2015-11-25 00:22:28 -050025 def __init__(
26 self,
27 credentials=common_creds.get_configured_credentials('user'),
28 service=None):
Marc Koderer0abc93b2015-07-15 09:18:35 +020029 super(Manager, self).__init__(credentials, service)
30 self.shares_client = shares_client.SharesClient(self.auth_provider)
Clinton Knighte5c8f092015-08-27 15:00:23 -040031 self.shares_v2_client = shares_v2_client.SharesV2Client(
32 self.auth_provider)
Marc Koderer0abc93b2015-07-15 09:18:35 +020033
34
35class AltManager(Manager):
36 def __init__(self, service=None):
37 super(AltManager, self).__init__(
Sam Wanc7b7f1f2015-11-25 00:22:28 -050038 common_creds.get_configured_credentials('alt_user'), service)
Marc Koderer0abc93b2015-07-15 09:18:35 +020039
40
41class AdminManager(Manager):
42 def __init__(self, service=None):
43 super(AdminManager, self).__init__(
Sam Wanc7b7f1f2015-11-25 00:22:28 -050044 common_creds.get_configured_credentials('identity_admin'),
Marc Koderer0abc93b2015-07-15 09:18:35 +020045 service)