소스 검색

Allow to run with API v3 (remove deprecated options)

Remove the usage of api_version and let the library
code use catalog_type instead.
CONF.volume_feature_enabled.{api_v2,api_v3} have been deprecated
since rocky.

See also:
- https://review.opendev.org/#/c/698754/
- https://review.opendev.org/#/c/698757/
and other reviews.

Change-Id: Ic91f38ebff96df7d38a2d8cd2447e454c385c46c
tags/0.3.1^0
Luigi Toscano 5 달 전
부모
커밋
6f0b4fcd9d
1개의 변경된 파일3개의 추가작업 그리고 21개의 파일을 삭제
  1. +3
    -21
      cinder_tempest_plugin/api/volume/base.py

+ 3
- 21
cinder_tempest_plugin/api/volume/base.py 파일 보기

@@ -20,7 +20,6 @@ from tempest import config
from tempest.lib.common import api_version_utils
from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions
from tempest import test

CONF = config.CONF
@@ -30,7 +29,6 @@ class BaseVolumeTest(api_version_utils.BaseMicroversionTest,
test.BaseTestCase):
"""Base test case class for all Cinder API tests."""

_api_version = 2
credentials = ['primary']

@classmethod
@@ -40,17 +38,6 @@ class BaseVolumeTest(api_version_utils.BaseMicroversionTest,
if not CONF.service_available.cinder:
skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
raise cls.skipException(skip_msg)
if cls._api_version == 2:
if not CONF.volume_feature_enabled.api_v2:
msg = "Volume API v2 is disabled"
raise cls.skipException(msg)
elif cls._api_version == 3:
if not CONF.volume_feature_enabled.api_v3:
msg = "Volume API v3 is disabled"
raise cls.skipException(msg)
else:
msg = ("Invalid Cinder API version (%s)" % cls._api_version)
raise exceptions.InvalidConfiguration(msg)

api_version_utils.check_skip_with_microversion(
cls.min_microversion, cls.max_microversion,
@@ -59,14 +46,9 @@ class BaseVolumeTest(api_version_utils.BaseMicroversionTest,
@classmethod
def setup_clients(cls):
super(BaseVolumeTest, cls).setup_clients()
if cls._api_version == 3:
cls.backups_client = cls.os_primary.backups_v3_client
cls.volumes_client = cls.os_primary.volumes_v3_client
else:
cls.backups_client = cls.os_primary.backups_v2_client
cls.volumes_client = cls.os_primary.volumes_v2_client

cls.snapshots_client = cls.os_primary.snapshots_v2_client
cls.backups_client = cls.os_primary.backups_client_latest
cls.volumes_client = cls.os_primary.volumes_client_latest
cls.snapshots_client = cls.os_primary.snapshots_client_latest

@classmethod
def setup_credentials(cls):


불러오는 중...
취소
저장