Merge "Fix invalid parameter passed to create_volume"
diff --git a/releasenotes/notes/remove-some-deprecated-identity-options-0ffxd1b8db928e43.yaml b/releasenotes/notes/remove-some-deprecated-identity-options-0ffxd1b8db928e43.yaml
new file mode 100644
index 0000000..e9e9444
--- /dev/null
+++ b/releasenotes/notes/remove-some-deprecated-identity-options-0ffxd1b8db928e43.yaml
@@ -0,0 +1,11 @@
+upgrade:
+ - |
+ Remove deprecated config option ``admin_username`` from
+ ``identity`` groups. Use ``admin_username`` from ``auth`` instead.
+ Remove deprecated config option ``admin_tenant_name`` from
+ ``auth`` and ``identity`` groups. Use ``admin_project_name`` from
+ ``auth`` instead.
+ Remove deprecated config option ``admin_password`` from
+ ``identity`` groups. Use ``admin_password`` from ``auth`` instead.
+ Remove deprecated config option ``admin_domain_name`` from
+ ``identity`` groups. Use ``admin_domain_name`` from ``auth`` instead.
\ No newline at end of file
diff --git a/releasenotes/notes/support-microversion-in-scenario-test-b4fbfdd3a977fc58.yaml b/releasenotes/notes/support-microversion-in-scenario-test-b4fbfdd3a977fc58.yaml
new file mode 100644
index 0000000..4d0a3dd
--- /dev/null
+++ b/releasenotes/notes/support-microversion-in-scenario-test-b4fbfdd3a977fc58.yaml
@@ -0,0 +1,14 @@
+---
+features:
+ - |
+ Add microversion support for scenario tests. Scenario test calls
+ multiple service API within same test and many services like compute,
+ volume and placement etc support API microversion. With microversion
+ support in scenario test, we can call different service API with
+ different microvesion. Which means we can implement scenario tests
+ for microversion also.
+ Currently Scenario manager support below services microversion:
+
+ * Compute
+ * Volume
+ * Placement
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index ea68005..ef19122 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -175,7 +175,14 @@
sg_id = group_create_body['security_group']['id']
direction = 'ingress'
- protocol = 'icmp'
+ # The Neutron API accepts 'icmp', 'icmpv6' and 'ipv6-icmp' for
+ # IPv6 ICMP protocol names, but the latter is preferred and the
+ # others considered "legacy". Use 'ipv6-icmp' as the API could
+ # change to return only that value, see
+ # https://review.opendev.org/#/c/453346/
+ # The neutron-tempest-plugin API tests pass all three and verify
+ # the output, so there is no need to duplicate that here.
+ protocol = 'ipv6-icmp' if self._ip_version == 6 else 'icmp'
icmp_type_codes = [(3, 2), (3, 0), (8, 0), (0, 0), (11, None)]
for icmp_type, icmp_code in icmp_type_codes:
self._create_verify_security_group_rule(sg_id, direction,
diff --git a/tempest/config.py b/tempest/config.py
index e3ac47c..6830148 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -84,27 +84,20 @@
cfg.StrOpt('admin_username',
help="Username for an administrative user. This is needed for "
"authenticating requests made by project isolation to "
- "create users and projects",
- deprecated_group='identity'),
+ "create users and projects"),
cfg.StrOpt('admin_project_name',
help="Project name to use for an administrative user. This is "
"needed for authenticating requests made by project "
- "isolation to create users and projects",
- deprecated_opts=[cfg.DeprecatedOpt('admin_tenant_name',
- group='auth'),
- cfg.DeprecatedOpt('admin_tenant_name',
- group='identity')]),
+ "isolation to create users and projects"),
cfg.StrOpt('admin_password',
help="Password to use for an administrative user. This is "
"needed for authenticating requests made by project "
"isolation to create users and projects",
- secret=True,
- deprecated_group='identity'),
+ secret=True),
cfg.StrOpt('admin_domain_name',
default='Default',
help="Admin domain name for authentication (Keystone V3). "
- "The same domain applies to user and project",
- deprecated_group='identity'),
+ "The same domain applies to user and project"),
]
identity_group = cfg.OptGroup(name='identity',
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index aa06fd0..87d7e76 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -28,6 +28,8 @@
from tempest.common import waiters
from tempest import config
from tempest import exceptions
+from tempest.lib.common import api_microversion_fixture
+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 as lib_exc
@@ -37,12 +39,57 @@
LOG = log.getLogger(__name__)
+LATEST_MICROVERSION = 'latest'
+
class ScenarioTest(tempest.test.BaseTestCase):
"""Base class for scenario tests. Uses tempest own clients. """
credentials = ['primary']
+ compute_min_microversion = None
+ compute_max_microversion = LATEST_MICROVERSION
+ volume_min_microversion = None
+ volume_max_microversion = LATEST_MICROVERSION
+ placement_min_microversion = None
+ placement_max_microversion = LATEST_MICROVERSION
+
+ @classmethod
+ def skip_checks(cls):
+ super(ScenarioTest, cls).skip_checks()
+ api_version_utils.check_skip_with_microversion(
+ cls.compute_min_microversion, cls.compute_max_microversion,
+ CONF.compute.min_microversion, CONF.compute.max_microversion)
+ api_version_utils.check_skip_with_microversion(
+ cls.volume_min_microversion, cls.volume_max_microversion,
+ CONF.volume.min_microversion, CONF.volume.max_microversion)
+ api_version_utils.check_skip_with_microversion(
+ cls.placement_min_microversion, cls.placement_max_microversion,
+ CONF.placement.min_microversion, CONF.placement.max_microversion)
+
+ @classmethod
+ def resource_setup(cls):
+ super(ScenarioTest, cls).resource_setup()
+ cls.compute_request_microversion = (
+ api_version_utils.select_request_microversion(
+ cls.compute_min_microversion,
+ CONF.compute.min_microversion))
+ cls.volume_request_microversion = (
+ api_version_utils.select_request_microversion(
+ cls.volume_min_microversion,
+ CONF.volume.min_microversion))
+ cls.placement_request_microversion = (
+ api_version_utils.select_request_microversion(
+ cls.placement_min_microversion,
+ CONF.placement.min_microversion))
+
+ def setUp(self):
+ super(ScenarioTest, self).setUp()
+ self.useFixture(api_microversion_fixture.APIMicroversionFixture(
+ compute_microversion=self.compute_request_microversion,
+ volume_microversion=self.volume_request_microversion,
+ placement_microversion=self.placement_request_microversion))
+
@classmethod
def setup_clients(cls):
super(ScenarioTest, cls).setup_clients()