blob: f4c7c0eaad16b28c5de8d2137d00c84662d82875 [file] [log] [blame]
Patrick East9b434d12016-08-12 17:23:19 -07001# Copyright (c) 2016 Pure Storage, 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 config
17
Chandan Kumar75511e32018-01-22 12:52:00 +053018from cinder_tempest_plugin.services import consistencygroups_client
19from cinder_tempest_plugin.services import volume_revert_client
Patrick East9b434d12016-08-12 17:23:19 -070020
21CONF = config.CONF
22
23
24class Manager(object):
25 def __init__(self, base_manager):
26 params = {
27 'service': CONF.volume.catalog_type,
28 'region': CONF.volume.region or CONF.identity.region,
29 'endpoint_type': CONF.volume.endpoint_type,
30 'build_interval': CONF.volume.build_interval,
31 'build_timeout': CONF.volume.build_timeout
32 }
33 params.update(base_manager.default_params)
34 auth_provider = base_manager.auth_provider
35
36 self.consistencygroups_adm_client = (
37 consistencygroups_client.ConsistencyGroupsClient(auth_provider,
38 **params))
Eric Harneyb4e0dab2017-10-02 16:30:38 -040039 self.volume_revert_client = (
TommyLike589ca692017-05-10 10:13:23 +080040 volume_revert_client.VolumeRevertClient(auth_provider, **params))