Merge "zuul: Move tempest-integrated-compute to Focal"
diff --git a/.zuul.yaml b/.zuul.yaml
index c682fd4..2fa0fe1 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -472,6 +472,11 @@
USE_PYTHON3: true
- job:
+ name: tempest-full-victoria-py3
+ parent: tempest-full-py3
+ override-checkout: stable/victoria
+
+- job:
name: tempest-full-ussuri-py3
parent: tempest-full-py3
nodeset: openstack-single-node-bionic
@@ -671,6 +676,8 @@
- tempest-full-py3-ipv6:
voting: false
irrelevant-files: *tempest-irrelevant-files
+ - tempest-full-victoria-py3:
+ irrelevant-files: *tempest-irrelevant-files
- tempest-full-ussuri-py3:
irrelevant-files: *tempest-irrelevant-files
- tempest-full-train-py3:
@@ -719,6 +726,7 @@
voting: false
irrelevant-files: *tempest-irrelevant-files
- neutron-tempest-dvr:
+ voting: false
irrelevant-files: *tempest-irrelevant-files
- interop-tempest-consistency:
irrelevant-files: *tempest-irrelevant-files
@@ -762,6 +770,7 @@
irrelevant-files: *tempest-irrelevant-files
periodic-stable:
jobs:
+ - tempest-full-victoria-py3
- tempest-full-ussuri-py3
- tempest-full-train-py3
- tempest-full-stein-py3
diff --git a/releasenotes/notes/Remove-test_reboot_server_soft-48fa786f38cd94dc.yaml b/releasenotes/notes/Remove-test_reboot_server_soft-48fa786f38cd94dc.yaml
new file mode 100644
index 0000000..fb84d25
--- /dev/null
+++ b/releasenotes/notes/Remove-test_reboot_server_soft-48fa786f38cd94dc.yaml
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ The test_reboot_server_soft has been skipped for more than 6 years.
+ Take into account that the minimum scenario test uses soft reboot
+ and the nova functional test also covers reboot.
diff --git a/releasenotes/notes/add-show-default-volume-types-api-to-v3-types-client-44b2676f217d78dc.yaml b/releasenotes/notes/add-show-default-volume-types-api-to-v3-types-client-44b2676f217d78dc.yaml
new file mode 100644
index 0000000..2cd5af6
--- /dev/null
+++ b/releasenotes/notes/add-show-default-volume-types-api-to-v3-types-client-44b2676f217d78dc.yaml
@@ -0,0 +1,6 @@
+---
+features:
+ - |
+ Add show type API to v3 types_client library.
+
+ * default_volume_type
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 4db6987..343d3ee 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -160,15 +160,6 @@
"""
self._test_reboot_server('HARD')
- @decorators.skip_because(bug="1014647")
- @decorators.idempotent_id('4640e3ef-a5df-482e-95a1-ceeeb0faa84d')
- def test_reboot_server_soft(self):
- """Test soft rebooting server
-
- The server should be signaled to reboot gracefully.
- """
- self._test_reboot_server('SOFT')
-
@decorators.idempotent_id('1d1c9104-1b0a-11e7-a3d4-fa163e65f5ce')
def test_remove_server_all_security_groups(self):
"""Test removing all security groups from server"""
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index cc8778b..d84b5fe 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -124,12 +124,18 @@
raise lib_exc.DeleteErrorException(
"Server %s failed to delete and is in ERROR status" %
server_id)
+
if server_status == 'SOFT_DELETED':
# Soft-deleted instances need to be forcibly deleted to
# prevent some test cases from failing.
LOG.debug("Automatically force-deleting soft-deleted server %s",
server_id)
- client.force_delete_server(server_id)
+ try:
+ client.force_delete_server(server_id)
+ except lib_exc.NotFound:
+ # The instance may have been deleted so ignore
+ # NotFound exception
+ return
if int(time.time()) - start_time >= client.build_timeout:
raise lib_exc.TimeoutException
diff --git a/tempest/lib/api_schema/response/compute/v2_71/servers.py b/tempest/lib/api_schema/response/compute/v2_71/servers.py
index 5cf0f8a..f4c01ee 100644
--- a/tempest/lib/api_schema/response/compute/v2_71/servers.py
+++ b/tempest/lib/api_schema/response/compute/v2_71/servers.py
@@ -79,3 +79,6 @@
check_tag_existence = copy.deepcopy(servers270.check_tag_existence)
update_tag = copy.deepcopy(servers270.update_tag)
delete_tag = copy.deepcopy(servers270.delete_tag)
+attach_volume = copy.deepcopy(servers270.attach_volume)
+show_volume_attachment = copy.deepcopy(servers270.show_volume_attachment)
+list_volume_attachments = copy.deepcopy(servers270.list_volume_attachments)
diff --git a/tempest/lib/api_schema/response/compute/v2_73/servers.py b/tempest/lib/api_schema/response/compute/v2_73/servers.py
index 6e491e9..ae7ebc4 100644
--- a/tempest/lib/api_schema/response/compute/v2_73/servers.py
+++ b/tempest/lib/api_schema/response/compute/v2_73/servers.py
@@ -76,3 +76,6 @@
check_tag_existence = copy.deepcopy(servers271.check_tag_existence)
update_tag = copy.deepcopy(servers271.update_tag)
delete_tag = copy.deepcopy(servers271.delete_tag)
+attach_volume = copy.deepcopy(servers271.attach_volume)
+show_volume_attachment = copy.deepcopy(servers271.show_volume_attachment)
+list_volume_attachments = copy.deepcopy(servers271.list_volume_attachments)
diff --git a/tempest/lib/api_schema/response/volume/groups.py b/tempest/lib/api_schema/response/volume/groups.py
index cb31269..f6e4bc2 100644
--- a/tempest/lib/api_schema/response/volume/groups.py
+++ b/tempest/lib/api_schema/response/volume/groups.py
@@ -64,7 +64,10 @@
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
- 'replication_status': {'type': 'string'}
+ # TODO(zhufl): replication_status is added in 3.38, we
+ # should move it to the 3.38 schema file when microversion
+ # is supported in volume interfaces
+ 'replication_status': {'type': ['string', 'null']}
},
'additionalProperties': False,
'required': ['status', 'description', 'created_at',
@@ -129,6 +132,10 @@
'type': 'array',
'items': {'type': 'string', 'format': 'uuid'}
},
+ # TODO(zhufl): replication_status is added in 3.38, we
+ # should move it to the 3.38 schema file when
+ # microversion is supported in volume interfaces
+ 'replication_status': {'type': ['string', 'null']}
},
'additionalProperties': False,
'required': ['status', 'description', 'created_at',
diff --git a/tempest/lib/common/utils/test_utils.py b/tempest/lib/common/utils/test_utils.py
index 2a9f3a9..4cf8351 100644
--- a/tempest/lib/common/utils/test_utils.py
+++ b/tempest/lib/common/utils/test_utils.py
@@ -80,10 +80,19 @@
def call_and_ignore_notfound_exc(func, *args, **kwargs):
"""Call the given function and pass if a `NotFound` exception is raised."""
- try:
- return func(*args, **kwargs)
- except exceptions.NotFound:
- pass
+ attempt = 0
+ while True:
+ attempt += 1
+ try:
+ return func(*args, **kwargs)
+ except exceptions.NotFound:
+ return
+ except exceptions.ServerFault:
+ # NOTE(danms): Tolerate three ServerFault exceptions while trying
+ # to do this thing, and after that, assume it's legit.
+ if attempt >= 3:
+ raise
+ LOG.warning('Got ServerFault while running %s, retrying...', func)
def call_until_true(func, duration, sleep_for, *args, **kwargs):
diff --git a/tempest/lib/services/volume/v3/types_client.py b/tempest/lib/services/volume/v3/types_client.py
index 7fa24a4..1ebd447 100644
--- a/tempest/lib/services/volume/v3/types_client.py
+++ b/tempest/lib/services/volume/v3/types_client.py
@@ -65,6 +65,19 @@
self.validate_response(schema.show_volume_type, resp, body)
return rest_client.ResponseBody(resp, body)
+ def show_default_volume_type(self):
+ """Returns the details of a single volume type.
+
+ For a full list of available parameters, please refer to the official
+ API reference:
+ https://docs.openstack.org/api-ref/block-storage/v3/index.html#show-default-volume-type
+ """
+ url = "types/default"
+ resp, body = self.get(url)
+ body = json.loads(body)
+ self.validate_response(schema.show_volume_type, resp, body)
+ return rest_client.ResponseBody(resp, body)
+
def create_volume_type(self, **kwargs):
"""Create volume type.
diff --git a/tempest/scenario/test_minbw_allocation_placement.py b/tempest/scenario/test_minbw_allocation_placement.py
index 5eab1da..74d4ed9 100644
--- a/tempest/scenario/test_minbw_allocation_placement.py
+++ b/tempest/scenario/test_minbw_allocation_placement.py
@@ -178,7 +178,13 @@
for rp, resources in allocations['allocations'].items():
if self.INGRESS_RESOURCE_CLASS in resources['resources']:
bw_resource_in_alloc = True
+ allocation_rp = rp
self.assertTrue(bw_resource_in_alloc)
+ # Check that binding_profile of the port is not empty and equals with
+ # the rp uuid
+ port = self.os_admin.ports_client.show_port(valid_port['id'])
+ self.assertEqual(allocation_rp,
+ port['port']['binding:profile']['allocation'])
# boot another vm with max int bandwidth
not_valid_port = self.create_port(
@@ -196,3 +202,6 @@
server2 = self.servers_client.show_server(server2['id'])
self.assertIn('fault', server2['server'])
self.assertIn('No valid host', server2['server']['fault']['message'])
+ # Check that binding_profile of the port is empty
+ port = self.os_admin.ports_client.show_port(not_valid_port['id'])
+ self.assertEqual(0, len(port['port']['binding:profile']))
diff --git a/tempest/tests/lib/common/utils/test_test_utils.py b/tempest/tests/lib/common/utils/test_test_utils.py
index bdc0ea4..d8e3745 100644
--- a/tempest/tests/lib/common/utils/test_test_utils.py
+++ b/tempest/tests/lib/common/utils/test_test_utils.py
@@ -74,6 +74,17 @@
self.assertRaises(ValueError, test_utils.call_and_ignore_notfound_exc,
raise_value_error)
+ def test_call_and_ignore_notfound_exc_when_serverfault_raised(self):
+ calls = []
+
+ def raise_serverfault():
+ calls.append('call')
+ raise exceptions.ServerFault()
+ self.assertRaises(exceptions.ServerFault,
+ test_utils.call_and_ignore_notfound_exc,
+ raise_serverfault)
+ self.assertEqual(3, len(calls))
+
def test_call_and_ignore_notfound_exc(self):
m = mock.Mock(return_value=42)
args, kwargs = (1,), {'1': None}
diff --git a/tempest/tests/lib/services/volume/v3/test_types_client.py b/tempest/tests/lib/services/volume/v3/test_types_client.py
index 336aa32..19d6591 100644
--- a/tempest/tests/lib/services/volume/v3/test_types_client.py
+++ b/tempest/tests/lib/services/volume/v3/test_types_client.py
@@ -121,6 +121,13 @@
to_utf=bytes_body,
volume_type_id="6685584b-1eac-4da6-b5c3-555430cf68ff")
+ def _test_show_default_volume_type(self, bytes_body=False):
+ self.check_service_client_function(
+ self.client.show_default_volume_type,
+ 'tempest.lib.common.rest_client.RestClient.get',
+ self.FAKE_DEFAULT_VOLUME_TYPE_INFO,
+ to_utf=bytes_body)
+
def _test_create_volume_type(self, bytes_body=False):
self.check_service_client_function(
self.client.create_volume_type,
@@ -224,6 +231,12 @@
def test_show_volume_type_with_bytes_body(self):
self._test_show_volume_type(bytes_body=True)
+ def test_show_default_volume_type_with_str_body(self):
+ self._test_show_default_volume_type()
+
+ def test_show_default_volume_type_with_bytes_body(self):
+ self._test_show_default_volume_type(bytes_body=True)
+
def test_create_volume_type_str_body(self):
self._test_create_volume_type()
diff --git a/tox.ini b/tox.ini
index 031a400..2ea8129 100644
--- a/tox.ini
+++ b/tox.ini
@@ -279,7 +279,6 @@
[testenv:docs]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
- -r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-apidoc -f -o doc/source/tests/compute tempest/api/compute
@@ -365,7 +364,6 @@
[testenv:releasenotes]
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
- -r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build