cinder-tempest-plugin/cinder_tempest_plugin/cinder_clients.py
Chandan Kumar 75511e3a85 Refactored cinder tempest tests to cinder_tempest_plugin
* As per the current codebase of cinder tempest plugin, it is getting
  dumped in the cinder/tests and the package name is setup.cfg is
  cinder_tempest_plugin which does not exists. So i refactored to
  give a proper tempest plugin shape.

Change-Id: Ia78ea53a99923844f40fb4e9fe22ec0da4b0c335
2018-01-22 12:53:28 +05:30

41 lines
1.6 KiB
Python

# Copyright (c) 2016 Pure Storage, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tempest import config
from cinder_tempest_plugin.services import consistencygroups_client
from cinder_tempest_plugin.services import volume_revert_client
CONF = config.CONF
class Manager(object):
def __init__(self, base_manager):
params = {
'service': CONF.volume.catalog_type,
'region': CONF.volume.region or CONF.identity.region,
'endpoint_type': CONF.volume.endpoint_type,
'build_interval': CONF.volume.build_interval,
'build_timeout': CONF.volume.build_timeout
}
params.update(base_manager.default_params)
auth_provider = base_manager.auth_provider
self.consistencygroups_adm_client = (
consistencygroups_client.ConsistencyGroupsClient(auth_provider,
**params))
self.volume_revert_client = (
volume_revert_client.VolumeRevertClient(auth_provider, **params))