23dab087b0
These tempest tests add coverage for all the API's related to consistency groups in Cinder. They were originally proposed for upstream tempest in https://review.openstack.org/#/c/252213/ but were not a good fit since they aren't supported by the reference driver. They have been modified to work as part of the in-tree tempest plugins for Cinder now. The tests are behind a new config option for tempest, which in turn is part of a new config group called 'cinder'. This was added to avoid any collisions with the 'volume-features-enabled' or 'volume' groups already in the upstream tempest tests. To enable them set the following in tempest.conf [cinder] consistency_group = True Then make sure to run tempest with the 'all-plugin' tox environment. Don't forget to update policy.json to allow for CG API's to be called.. Change-Id: I772ea13ca156e71620d722eee476f222a8653831 Co-Authored-By: Xing Yang <xing.yang@emc.com>
38 lines
1.4 KiB
Python
38 lines
1.4 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.tests.tempest.services import consistencygroups_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))
|